Re: Bug in OpenJPA with cascade delete

2008-07-03 Thread Roger Keays
Sounds like issue 235, which I'm also stuck on: https://issues.apache.org/jira/browse/OPENJPA-235 Beniamin Mazan wrote: I got 2 entities like below @Entity class Product { ... @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "product") private List children = new A

Re: Q: Howto set TIMESTAMP column to null?

2008-07-03 Thread Dirk Brenckmann
Tyvm - this did the trick :-) > Von: Pinaki Poddar <[EMAIL PROTECTED]> > > A viable approach. OpenJPA can 'externalize' a field value. For example, > the TIMESTAMP field can be stringified at database. See details [1]. > > [1] > http://openjpa.apache.org/docs/latest/manual/manual.html#ref_gu

Dirty checking Performance issue

2008-07-03 Thread graffer
Hi guys, Are there any limitations concerning the persistence cache in OpenJPA? I'm having an application that loads several thousand entities and then adds some using em.persist(newEntity); The problem is that persists takes extremly long (up to serveral seconds per entity on a server machine)!

Dirty checking Performance issue

2008-07-03 Thread Georg Raffer
Hi guys, Are there any limitations concerning the persistence cache in OpenJPA? I'm having an application that loads several thousand entities and then adds some using em.persist(newEntity); The problem is that persists takes extremly long (up to serveral seconds per entity on a server machine

Query to return shared data for performance reasons.

2008-07-03 Thread Gustav Trede
hello, Im interested in helping openjpa to implement that query can return shared objects from the cache. On many usage cases its only of interest to read data, no need to get a clone/copy then. (and yes its up to the user to not actually edit the returned data.) This exists in eclipselink

Re: Re-using an existing jdbc connection?

2008-07-03 Thread Patrick Linskey
Hi, What environment are you executing your code in? Is this a Java EE app? The easiest way is to put a DataSource into JNDI, configure your transaction manager appropriately, and put OpenJPA into "managed transaction" mode. In this configuration, the semantics of Connection delivery will

Re: Dirty checking Performance issue

2008-07-03 Thread Patrick Linskey
Hi, Can you describe your environment in a bit more detail? Is the OpenJPA code being called from a main() app? A Java EE app? -Patrick On Jul 3, 2008, at 6:33 AM, Georg Raffer wrote: Hi guys, Are there any limitations concerning the persistence cache in OpenJPA? I'm having an applicati

Callback to/from entity transactions

2008-07-03 Thread Dirk Brenckmann
Hi, Q: Is there a way to access/get back exceptions thrown within the persistance/transaction layer? Example: Code (pseudo): Sateless session bean::SomeEntity someMethod( SomeEntity entity ) { return this.getEntityManager().merge( entity ); } Serv

Re: Problem with foreign keys on DB and JPA delete

2008-07-03 Thread Fay Wang
Hi, From the stack trace: ... org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:73) at org.apache.openjpa.jdbc.kernel.OperationOrderUpdateManager.flushPrimaryRow(OperationOrderUpdateManager.java:162) at org.apache.openjpa.jdbc.kernel.Ope

Re: Problem with foreign keys on DB and JPA delete

2008-07-03 Thread Michael Dick
FWIW Configuring the constraint update manager can be done by adding this property to persistence.xml : -mike On Thu, Jul 3, 2008 at 11:11 AM, Fay Wang <[EMAIL PROTECTED]> wrote: > Hi, >From the stack trace: > ... > > org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(Prepar

Re: Query to return shared data for performance reasons.

2008-07-03 Thread Jeremy Bauer
Hi Gustav, This may not be exactly what you have in mind, but OpenJPA has a data cache for caching entities and a query result cache for caching certain types of query results. Properly tuned, these caches can dramatically improve the performance of cache-suitable applications. Here is a link to

Re: Query to return shared data for performance reasons.

2008-07-03 Thread Gustav Trede
hello, The situation im talking about is the current enforced cloning of the return data from the cache . Its not needed to clone data in read-only situations. This functionality is available in eclipselink. A query hint QueryHints.READ_ONLY is used to enable return of data from cache "by ref

Re: Callback to/from entity transactions

2008-07-03 Thread Craig L Russell
This is "the" reason for the EntityManager.flush() method that gives you immediate feedback if there is some application reason to fail the transaction. If flush() succeeds, the only reason for failing a transaction is outside your (application) control. Craig On Jul 3, 2008, at 8:57 AM,

Re: Bug in OpenJPA with cascade delete

2008-07-03 Thread Roger Keays
Roger Keays wrote: Sounds like issue 235, which I'm also stuck on: https://issues.apache.org/jira/browse/OPENJPA-235 Fay's patch posted to that issue fixed the problem for me. I've posted a binary at http://www.sunburnt.com.au/tmp/openjpa-1.1.0.jar You could try that version. Beniamin

Re: Dirty checking Performance issue

2008-07-03 Thread Georg Raffer
Hello Patrick Thank you for your fast reply. Sorry that I described the problem in such a short way. In detail it is a JBOSS 4.2.1 application where we try to replace Hibernate with OpenJPA. Java 5 is used. Therefore we use the runtime enhancement. As I now found in the mailing list this is the