debraj mallick wrote:hi hildich kilal,
did you got the any solution?
Hello Debraj,
Following are my findings after some research and readings
So few questions I have are
1) can we use JTA and Non - Jta transactions using same persistenceUnit?
No . We can not use JTA and Non JTA transactions in same PersistenceUnit. We need to create separate Persistence Unit. in J2SE application you can simply use
to create entity manager factory but not in a J2EE. In an EE container you need to inject EntityManager using Container's injection mechanisms.
2) Do I need to define a JTA data source in JTA transaction?
Yes you need to use JTA data source in JTA transaction. It helps to avoid unnecessary connection pooling handling. In fact it is strongly advisable to use Data sources (or connection pooling apps like c3p0) in non jta applications also. I did use c3p0 / Data source from Weblogic successfully to resolve connection out of limit issue in my non JTA application recently.
Hope it helps
Thanks
Hk