Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

1st level cache and query statistics?

graffer

2008-07-04

Replies: Find Java Web Hosting

Author LoginPost Reply

Hello guys,

My environment: JBOSS 4.2.1, OpenJPA 1.1, Java 5, EJB 3 (+JPA), build time
enhancement, many entities

I currently try to get some statistics of the entity manger usage. JPA
provides no standardized way to find out how many entities are in the 1st
level cache. I only know it from Hibernate, it has a Session.getStatistics()
which returns basic information about the current session. More detailed
information is available on the SessionFactoy.

So now my question: Is there a similar way in OpenJPA? I would need the
following statistics:

1) EntityManager: how many entities (and collections) are in 1st level
cache?
2) EntityManagerFactory: how many select / insert / update statements were
executed within that SessionFactory?

If those informations are not available via API, how can I access them? Is
the 1st level cache in org.apache.openjpa.kernel.Broker?

Thank you for your help.

bye, Georg
--
Sent from the OpenJPA Users mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.