Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gemini-dev] Different jpa persistence bundles in same transaction

Hi Florian,

It is possible to have multiple entity managers registering with the same transaction, but you would want to make sure that there is no entity overlap across them or you may be at risk for data inconsistency.

In theory it should be possible to have persistence units with different persistence providers (Gemini JPA and Aries JPA). I have not tried it, but I don't expect there to be any problems.

-Mike
PS  Please use the forum rather than this list for Gemini questions. That way people can post their own experiences in response to the question, and there is a more searchable record for others to see the questions/answers in the future.

On 18/05/2013 10:42 AM, Florian Pirchner wrote:
Hi,

i now, that jpa entities from a persistent bundle must not become used in a entity manager from a different bundle.


So
i try to figure out a way to persist entities from different persistent bundles in the same transaction. Even if they are using different entity manager.
Eg:

txn.begin
modul1.persist(someBean)
module2.persist(someBean)
txn.rollback // will rollback modul1 and module2


1) Would OSGi JTA specification handle that stuff properly?
2) Can i use gemini JPA and apache aries JTA together?


Thanks a lot for your answers.


-- 
Mit besten Grüßen
Florian Pirchner
Fohlenweg 22
2301 Probstdorf
Tel: +43 650 7772338
florian.pirchner@xxxxxxxxx


_______________________________________________
gemini-dev mailing list
gemini-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gemini-dev


Back to the top