Hi,
I was considering using tomee for a small enterprise project of our company.
The main reason why I looked into tomee, is that our company has already
experience with the underlying technologies (tomcat, cxf, activemq, etc.)
So I was trying to set up a small pilot project to see, that all of our
project requirements are met.
The main setup of the pilot project: 2 postgres db's and tomee with 2 xa
datasources, 2 test web applications (to make a remote ejb call)
For test purposes a local EJB is injected in a simple servlet.
The local EJB executes the following sequence:
- persist a local entity to the first db
- call remote ejb which persist an entity to the second db
- throw a RuntimeException to test a rollback
The main problem is, that the remote persist isn't rolled back, despite of
the runtime exception, the second entity is always saved to the db.
Are xa transactions supported by tomee?
Actually I'm not even sure, that my xa datasource configuration is correct.
<Resource id="PG1" class-name="org.postgresql.xa.PGXADataSource">
databaseName test
serverName localhost
portNumber 5432
</Resource>
<Resource id="PG2" class-name="org.postgresql.xa.PGXADataSource">
databaseName test2
serverName localhost
portNumber 5432
</Resource>
<Resource id="TestDSXA1" type="DataSource">
XaDataSource PG1
JtaManaged true
UserName postgres
Password pass
</Resource>
<Resource id="TestDSXA2" type="DataSource">
XaDataSource PG2
JtaManaged true
UserName postgres
Password pass
</Resource>
I would be glad if somebody could point me into the right direction.
Thanks,
Csaba
--
View this message in context:
http://openejb.979440.n4.nabble.com/Postgres-XA-transaction-rollback-tp4666429.html
Sent from the OpenEJB User mailing list archive at Nabble.com.