[ajug-members] Issue when moving from EJB 2.x to EJB 3.0 entities under WebLogic

Rob Worsnop rworsnop at gmail.com
Mon Mar 24 18:27:28 EDT 2008


To force updates past the write-behind cache, you can call
EntityManager.flush. I'm not aware of a way of disabling the
write-behind cache globally in either Hibernate or OpenJPA. I suppose
you could proxy the entity manager and have the proxy call flush after
delegating each update call.

Why you would want to do this is another matter. :)

On Mon, Mar 24, 2008 at 1:29 PM, SilverAnvil <silveranvil at gmail.com> wrote:
> Hello fellow AJUGers,
>
> I'm working on a project where we're updating an existing code base from EJB
> 2 to EJB 3 and ran into a problem that I'm hoping someone here has already
> solved.
>
> In our 2.x beans, we're using the delay-updates-until-end-of-tx element in
> our weblogic-ejb-jar.xml file and setting the value to FALSE so that the
> WebLogic server will call ejbStore() after each method call, which updates
> the database but doesn't commit the data so we can still roll back if
> necessary.
>
> Is there an equivalent under JPA? We're currently using OpenJPA, which is
> the default for WebLogic 10, but can probably switch to Hibernate if
> necessary.
>
> Thanks for any help you can give,
> Burk Hufnagel
>  (Speaker at our next meeting. And no, the topic isn't EJB 3.0 or JPA.)
>
> --
> "The only rules that really matter are these: what a man can do and what a
> man can't do." Captain Jack Sparrow
> _______________________________________________
>  ajug-members mailing list
>  ajug-members at ajug.org
>  http://www.ajug.org/mailman/listinfo/ajug-members
>
>



More information about the ajug-members mailing list