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 ...

 
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 ...

 
forum_thread

problem with lazy loading - unittest project attached

hi, i'm still testing objectdb together with spring-data-jpa. i made a test which should simulate 4 requests 1. save entity 2. read an existing entity, add onetomany relation 3. read an existing entity, add another onetomany relation 4. read entity, get relations. i have the feeling this is not the optional way to test this, because of the differnt transaction behavior. the test is not transactional, but the spring repository methods are. ... not annotated with  @Transactional - an ad hoc EntityManager instance is prepared for running findOne , and when the query execution completes that EntityManager is closed and the result object becomes detached. Since ...

 
release

2.7.3_01

... 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.7.3

... 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 ...

 
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

One transaction or two?

If I have a large number of objects to delete and then add to a PersistenceManager is it more efficient to do everything in one transaction or two? Currently my code looks like this: ... The overhead of creating an EntityManager / PersistenceManager is low. ObjectDB already manages a ... But ObjectDB doesn't use a pool of  EntityManager / PersistenceManager instances (just of some underlying ...

 
forum_thread

OneToMany and cascade delete problem

Hi, I don't really know if this is a bug or maybe model that I make is bad. I have a problem with with two different classes with OneToMany relation to one, shared class. For example (first class): @Entity public static class Store { @OneToMany(targetEntity = Offer.class, mappedBy = "store") private List<Offer> offers; } second class: ... broken relationship). When using a short term EntityManager for updating the owner side without working with the mapped by ... be updated when it is later retrieved using another  EntityManager . But if the same  EntityManager is used for operations ...

 
issue

Named Query Exception

[ObjectDB 2.4.6_06] Unexpected exception (Error 990)   Generated by Java HotSpot(TM) Client VM 1.6.0_25 (on Windows 7 6.1). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: java.lang.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.LFL.X(LFL.java:1154) at com.objectdb.o.LFL.P(LFL.java:934) at com.objectdb.o.FIW.af(FIW.java:94) at com.objectdb.o.FIW.ad(FIW.java:55) at com.objectdb.o.SSS.aj(SSS.java:907)... indicate an attempt to create a query using a closed EntityManager . If this is the case, a better error message should be ... Please make sure that you are using an open EntityManager. ObjectDB Support ObjectDB - Fast ...