About EntityManager

forum_thread

Exceeding max connections and crashing

Hi, we have severe problems with ObjectDB crashing frequently. We can’t find the exact cause but we suspect several things. We use 2.5.3_03 version and we use it in production. The same setup in test environment hasn’t have these kind of problems First crash occurred when network went down and database lost connection with the JBOSS AS, several restarts got it up and running finally.  It seems when the database loses network connection it shutdowns but we cant be sure. Usualy database stops once a day with no apperent reason. ... No need to close the connection (i.e. close the EntityManager ) after every commit, although it is a common technique to use connection per request ( EntityManager per request). However, if you do not close the connection you ...

 
manual

FROM clause (JPQL / Criteria API)

Explains how to use the FROM clause and JOIN expressions in a JPA/JPQL query.... createQuery createQuery(qlString, resultClass) EntityManager's method Create an instance of TypedQuery for executing a ...

 
release

2.7.2

... an exception when accessing an object with a closed EntityManager . Fixed a bug in viewing content of a TreeMap ... error message for creating a query with a closed EntityManager ( issue #182 ). Version 2.4.6 ...

 
forum_thread

evictAll() behavior

I'm writing a multi-user drawing tool, using objectdb as the central store.  When a user press F5, I want to pick up all the changes from the database.  So, I call evictAll() in the following ways: pmf.getDataStoreCache().evictAll();  // the factory pm.evictAll();                                 // the persistence manager A couple of questions about this: 1. the first evictAll() seems to be clearing the L2 cache -- is this correct 2. the evicts only work when they are done inside a transaction -- is this specified in the JDO spec?... The L1 cache is per EntityManager / PersistenceManager and the L2 cache is per ... / PersistenceManagerFactory , i.e. shared by multiple EntityManager / PersistenceManager instances. There are also other ...

 
issue

Null pointer exception being thrown from within ObjectDB.

EXCEPTION/DESCRIPTION:... ... CriteriaBuilder cb = entityManager. getCriteriaBuilder ( ) ; ... ; TypedQuery<ReportDownloadObject> query = entityManager. createQuery ( q ) ; ...

 
release

2.7.1

... an exception when accessing an object with a closed EntityManager . Fixed a bug in viewing content of a TreeMap ... error message for creating a query with a closed EntityManager ( issue #182 ). Version 2.4.6 ...

 
forum_thread

Query in JPA2 with LEFT JOIN on INNER JOIN

select a.description, a.id, p1.description, p2.description,p3.description from action a left join action_profile ap1 on ap1.id_action=a.id inner join profile p1 on  ap1.id_profile=p1.id  and p1.name='?' left join action_profile ap2 on ap2.id_action=a.id inner join profile p2 on  ap2.id_profile=p2.id  and p2.name='?' where a.id =?;   Thanks   ... my critera query: CriteriaBuilder cb = entityManager. getCriteriaBuilder ( ) ; ... query = entityManager. createQuery ( cq ) ; return ...

 
forum_thread

javax.persistence.PersistenceException

Hi I am trying to get a basic EclipseRCP project working with Objectdb. At the very first line in creating a View public void createPartControl(Composite parent) { EntityManagerFactory emf = Persistence.createEntityManagerFactory("$objectdb/db/pilots.odb"); I get the following "javax.persistence.PersistenceException: No Persistence provider for EntityManager named pilots.odb at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)....." ... No Persistence provider for EntityManager named pilots.odb at ... error with " No Persistence provider for EntityManager named $objectdb/db/pilots.odb" as the cause.   ...

 
release

2.7.0

... an exception when accessing an object with a closed EntityManager . Fixed a bug in viewing content of a TreeMap ... error message for creating a query with a closed EntityManager ( issue #182 ). Version 2.4.6 ...

 
release

2.6.9

... an exception when accessing an object with a closed EntityManager . Fixed a bug in viewing content of a TreeMap ... error message for creating a query with a closed EntityManager ( issue #182 ). Version 2.4.6 ...