I'm not sure the container is ready to do JMS work by the time yourSync.beforeCompletion is called.
You can try 3 tests: 1) comment out JMS; 2) replace JMS with a plain JDBC call to an XA resource (DerbyPool can be safely changed to use XA by changing res-type="javax.sql.XADataSource" and datasource-classname="org.apache.derby.jdbc.ClientXADataSource"; 3) access a SLSB for the JDBC call.
The result should narrow down the problem.
HTH,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]
http://forums.java.net/jive/thread.jspa?messageID=284094