On Aug 30, 2007, at 5:21 PM, Tomasz Mazan wrote:

David Jencks pisze:

On Aug 30, 2007, at 8:05 AM, Tomasz Mazan wrote:


My application uses JPA to persist data and JMS destinations to send requests to external systems. I want to make transaction using both JPA and JMS technologies. Over these I use SessionBeans as WebServices and this layer
should manage transaction.

Could you advice the best solution and point out documentation which could
be helpful?

As long as you use CMT or BMT with UserTransaction with your session beans and container managed persistence with your JPA beans this should all work with no additional configuration. Is something not working?

At the moment there's a problem with message driven beans not participating in recovery but it doesn't sound like you are using MDBs? In any case 2phase commit should still work with mdbs as long as nothing crashes :-)

thanks
david jencks
I've just started developing transactions within our application, so I've not found any problems yet. The only thing I need (and i must) is using XA for DataSources, Jms Connection factories - am I right?

Basically yes. Geronimo won't prevent you from using non-xa datasources and jms connection factories in JTA transactions, but if anything goes wrong your data may be left in an inconsistent state.

If you find that xa is too slow there may be ways of using non-xa jms connection factories as long as the messages are idempotent, that is sending the same message multiple times has the same effect as sending it once. I'm not an expert on this but I think there's periodic discussion on the activemq lists. I would start with xa everywhere and see if there are problems.

thanks
david jencks


Tomasz Mazan


Reply via email to