openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Weiss <christoph.we...@de.ibm.com>
Subject Re: Container Managed EntityManager - is there a chance to control flush calls ?
Date Mon, 11 Aug 2014 18:55:04 GMT
Hi Rick, 

Thanks for your reply! 
Well actually we do not have any "unwanted flush calls" but we are scared 
that they might happen ; ) 

But let's take about the details: 
We try to upgrade an old JEE application (with an custom developed 
PersistenceFramework) to JPA. 
Because of effort and QA reason we want to maintain the old "business 
logic".  Here we had objects which are created, modified but never stored 
in the database. 
However those objects are now becoming JPAEntities and so we implemented 
our own UpdateManager. This UpdateManager is taking care that only 
"selected" objects are flushed. 
(as written in one of the previous posts).

The complete concept and implementation is working fine as long as we can 
control when the flush is executed (--> goal "at the end of our EJB 
transaction") 
However talking to colleagues I understand that the EntityManager might do 
flush operations beside the transactions.  Reason could be e.g. to free up 
cache or memory. 
And that is something we want to avoid. 

Now I am not sure if this are just "rumors" from the colleagues or if 
there are cases where the EntityManager might execute a flush w/o any 
association / trigger from a transaction. 
Can you help on this topic? 

Cheers
Christoph 










From:   Rick Curtis <curtisr7@gmail.com>
To:     users <users@openjpa.apache.org>
Date:   11.08.2014 20:38
Subject:        Re: Container Managed EntityManager - is there a chance to 
control flush calls ?



Nothing immediately comes to my mind. Perhaps a better explanation of what
you are trying to do will expose some other solution. One question though,
what is currently driving the unwanted flush() calls?

Thanks,
Rick


On Mon, Aug 11, 2014 at 1:24 PM, Christoph Weiss 
<christoph.weiss@de.ibm.com
> wrote:

> Dear Community,
>
> We are running OpenJPa with "container managed" EntityManagers (using
> WebSphere Application Server).
> Because of technical reasons we want to explicitly control when the
> EntityManager executes the flush.
>
> First I thought that the parameter "FlushMode" could be a solution, but
> reading the documentation I understood it isn't.
> So is there any other way to really control when the flush is executed?
>
> Any reply is appreciated. Thanks for your help in advance!
>
> Cheers
> Christoph Weiss
>



-- 
*Rick Curtis*


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message