public void testTxPropegation() throws Exception
{
InitialContext ctx = getInitialContext();
Object obj = ctx.lookup("TxTesterBean/remote");
TxTester session = (TxTester) PortableRemoteObject.narrow(obj, TxTester.class);
assertNotNull(session);
UserTransaction tx;
try
{
tx = (UserTransaction) PortableRemoteObject.narrow(ctx.lookup("UserTransaction"), UserTransaction.class);
}
catch(NameNotFoundException e)
{
log.warn("Corba Transaction Service is not installed (not available with Arjuna, only with JBossTS)");
return;
}
tx.begin();
try
{
session.txMandatoryMethod();
}
finally
{
tx.rollback();
}