About EntityManager

forum_thread

Embedded mode usage question

Hi there ! ... multi threading you just have to use a separate EntityManager for every thread (e.g. EntityManager per request in a web application, as demonstrated in that ...

 
forum_thread

connection pooling

how do you handle connection pooling?  I don't understand how to open and close connection, or reconnect. I've referenced the manual here, but where does this go:   The <connection> element   <connection port="6136" max="100" /> The <connection> element specifies how clients can connect to the server: ... pool of connections and reuses them when it creates new EntityManager instances. See this manual page for more information on ...  (which manages the connection pool) and EntityManager (which represents a connection). By default the maximum ...

 
release

2.6.5

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

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

Caching/Paging Questions...

Greetings ObjectDB team, All below questions assume a very large database (~1,000,000,000 objects): Q1: Two queries with a big overlap between their result sets. If I query the first set and hold the results in memory somehow, would that speed up the execution of the second query since many of its result objects already created and reside in memory ?... What is the maximum memory size of ObjectDB L2 cache or EntityManager context ? Q4: Would paging result sets via setFirstResult ... directly by the content of the persistence context (the EntityManager L1 cache) but instantiation of the results (if they contain ...

 
forum_thread

Storing Images and Object Pooling

Hello we have heard your product and we will plan to use your product on image database. Is it good to use ObjectDB as image database? Image database just screenshots of desktops.   2- ) On JPA as we know getting Result list returns ArrayList         List<SomeClass> xxx = query.getResultList(); ... However, notice that objects are cached as objects per EntityManager , so you will have to use long term shared EntityManager to benefit from this object pooling. ...

 
forum_thread

Memory leak

Hi, We have a memory leak in our application which seems to be related with ObjectDB. Basically, we use single instance of EntityManager, which is opened on aplication initialization and closed when the user logs out, as well as EntityManagerFactory. We use em.clear() after every commit and after execution of query. Our classes are enhanced with ObjectDB enhancer. However, used memory is growing overtime until OutOfMemoryException is thrown on JBoss server. We use JBoss 7.1.1. and latest ObjectDB version. ... ObjectDB. Basically, we use single instance of EntityManager, which is opened on aplication initialization and closed when the ... runned. Our suspect is that nothing from the EntityManager was released to the GC, even after em.close(), and emf.close() ...

 
forum_thread

Detecting ObjectDB alive

Hi, I'm wondering how best to be able to detect if ObjectDb Server is alive? For: a) from a java process - I'm guessing you could try and grab a Persistence Manager and/or listen for a Disconnection Exception?? b) from a NodeJs runtime - I'm guessing you could either try and grab the ObjectDb server port and that won't be possible as long as the Objectdb Server is running. Is there a way to polling server from TCP and/or HTTP ?   ... a port) is to test it periodically, e.g. by obtaining an EntityManager , making some operation against the database and then closing the  EntityManager . ObjectDB Support ObjectDB - Fast ...

 
forum_thread

Delete object from collection versus delete from JPQL

I'm a newbie, so this is a pretty fundamental question. I'm not sure if there is a bi-directional relationship between the objects in memory and ObjectDB.  I know I can modify the objects and use persist() to write them to the database.  But does running a JPQL update or delete alter the in-memory objects? There are cases where the JPQL syntax is more expressive than operating on a collection, but I'm not sure if that will alter my program state.  Will it? Thanks, Lee  ... UPDATE and DELETE queries bypass the EntityManager entity object management, and accordingly break the ... may use refresh , or discard cached objects in the EntityManager and in the L2 cache.  ObjectDB ...

 
forum_thread

Attempt to refresh a non managed entity object (error 635)

Just ran into a problem that I've not seen in 10 years of running ObjectDb: java.lang.IllegalArgumentException Attempt to refresh a non managed entity object (error 635) Nothing changed in my code, but I'm wondering if there is a problem with the config file, and /or my recent experiments with Intellij's JPA database explorer, which required me to use a JPA persistence.xml configuration file. (I was able to use to run objectdb queries from inside Intellij). ... the best practise is with this issue in general, and with EntityManager in particular. Specifically: is it advised to use a new EntityManager with every transaction, or to use one, and clear() it with every ...