About SECOND

forum_thread

using DbUnit with ObjectDb

Are there any examples about how to use DbUnit with ObjectDB? DbUnit requires access to a jdbc connection .. with other providers it's possible to extract the jdbc connection from the EntityManager, e.g. for Eclipselink / Postgres combination you can use the rather long-winded: IDatabaseConnection connection = new DatabaseConnection(((EntityManagerImpl) (em2.getDelegate())).getServerSession().getAccessor().getConnection(), "PUBLIC"); but with objectDb this gives: ... image" /> .. </dataset >   second example: <?xml version = '1.0' encoding = 'UTF-8' ...

 
forum_thread

java.sql.Date equals comparison not working with CriteriaAPI

Hello, Using ODB 2.4.5 and the Criteria API, doing a simple equals comparison with java.sql.Date value doesn't match any results in the database. Our code looks like this: ... 0 ) ; cal. set ( Calendar. SECOND , 0 ) ; cal. set ( Calendar. ... 0 ) ; cal. set ( Calendar. SECOND , 0 ) ; cal. set ( Calendar. ...

 
manual

Locking in JPA

Explains how to use optimistic locking and pessimistic locking in JPA.... ; The first argument is an entity object. The second argument is the requested lock mode. A ... rollback. See JavaDoc Reference Page... (on the second lock request). Pessimistic Lock Timeout By default, when ...

 
forum_thread

Java 6/7 Performance Comparison

Hey, I've been using ObjectDB for a small scale home project to gain some familiarity before proposing it in a commercial project at work. What I've noticed though is that when using objectdb in embedded mode based on the console tutorial, there seems to be a bit of a performance gap running the same code between Java 6 & 7 Tracing it through I can see the bottle neck seems to be at the creation of the entity manager and I was wondering if there are any additional configuration options I may have missed while running under java 7. ... when running ObjectDB Explorer as there is roughly a 30 second delay each time I open the jar/switch connections while running with ...

 
forum_thread

Join performance in Objectdb

select count(e) from Meta e, ImageNet i, Page p where e.idImage=i.id and e.idPage=p.id; So simple a command cause me half an hour and is running now! Each table has about 160K records. What formula can predict the time for such counting? TIA ... a JOIN on ID fields, similarly to your original query. The second query uses JOIN on direct references. The second form is simpler, faster and more appropriate when using JPA. ...

 
forum_thread

Exception on creation when running multithreaded

Hi, I'm trying to test the creation of an object from my datamodel(Organisation) and the creation process includes the creation of an acl for the newly created organisation all in the same transaction. The process is as followed: 1. The organisation gets created 2. The acl is being searched to check if it already exists 3. if it exists it will be updated, otherwise it will be created   ... fine when running with one thread, however, when adding a second thread some the of the creations fail with the following exception: ... count before it shows there are 800 objects and then the second query for the organisations returns 800 objects as expected. ...

 
issue

Use temporary files to enable very large transactions

We have transactions in which many objects are created. These objects are no longer needed in the current transaction after creation. Unfortunately, we will receive an OutOfMemory exception because the objects are kept in the first level cache of ObjectDB. In the forum thread http://www.objectdb.com/database/forum/921 on post #4 you wrote, that ObjectDB should support very large transactions in further version. Can you implement it that ObjectDB used temporary files? ... are sufficient. For a special use case, we now use a second database. Within the real transaction we work with a copy of this database. This enables us to repeatedly commit on the second database and in case of a fault we can still recover a consistent ...

 
forum_thread

Attempt to open a non existing file '/tmp/objectdb_xxxx/SortQueryItr_6.mrg'

Hi, I came across an error - but i have not been able to create a simple reproducible case - the error does not happen often and does not happen always -  Let me explain: 1/ I run 5 java applications at the same time on one machine - each application is using an ODB file (each one is using a different one). Basically each application does a sorted query ( qqq = em.createQuery("SELECT bk FROM OBN bk ORDER BY bk.time ASC", OBN); ) 2/ after a little while - some of the applications throws this error message: ... delete the lock and then the folder - what happen to the second process which was waiting for the lock? does the second process continue and try to delete the (already deleted) folder as ...

 
forum_thread

EntityManager JPA or JDO impl and different behavior

Hi, I have an issue with the EntityManager. My persistance XML looks like: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> ... it all fails horribly. Have a look at the output from the second junit test, you will see heaps of calls like: AttributeName ... to look only at the database id.   Second issue. The docs at: http://www.objectdb.com/api/java/jpa/OneToMany ...

 
issue

objectdb-2.6.9_06: Extended Persistence Context fails: 'Attempt to begin a new transaction when a transaction is active'

objectdb-2.6.9_01 NetBeans8.1+Glassfish4.1.1 Mac OS X Possibly related: How to Use a SF with extended Persistence Context? Test mini web app at: https://www.webel.com.au/downloads/objectdb/GreensoftObjectdbTestWebMini3683.2016-09-29.tgz ... the attempt to use the buildProject(String name) method a second time in a row (in recent versions of ObjectDB only): Info: ... But then, when the commit() is executed on the second build pass, I get a new error (one that does not prevent the building of ...