glassfish对ejb cache的监控

打开ejb监控,可以看到sessionBeans,看不到Entity Beans。下面是段精彩的回答:
"Entity Beans" is really a misnomer, specifically in the EJB context today.

In EJB2, when we had CMP and BMP Entity Beans (we still do, but...), the Beans were first class components managed by the container much like session beans.

With the JPA, Entities no longer hold that status. In fact, the EJB container really has no knowledge of a JPA Entity at all, since the container itself no longer manages them.

JPA Entities are just POJOs today with little special status, and are managed by the EntityManager.

While EJB3 gives ready access to an EntityManager for you applications, that's about as far as the container goes in terms of exposing the inner aspects of it to the administrator. The JPA and it's entities are more a component of your application than really a component of the container.

So, that's why you do not see any activity of your "Entity Beans" using the EJB monitoring -- they're simply not EJBs any more.

You would need to look at whatever monitoring capabilities are provided by your JPA provider, and how they may expose their internal cache statistics and operations to an administrator.

http://forums.java.net/jive/message.jspa?messageID=363515

你可能感兴趣的:(cache,ejb,jpa,Access,Glassfish)