public void testLazyUserTransactionCommit() throws Exception
{
ccm.pushMetaAwareObject(this, null);
try
{
TestConnection c = (TestConnection)cm.allocateConnection(mcf, cri);
assertNotNull(c);
try
{
assertEquals(TestManagedConnection.LOCAL_NONE, c.getLocalState());
ut.begin();
try
{
assertEquals(TestManagedConnection.LOCAL_TRANSACTION, c.getLocalState());
}
finally
{
ut.commit();
assertEquals(TestManagedConnection.LOCAL_COMMITTED, c.getLocalState());
}
}
finally
{
c.close();
assertEquals(TestManagedConnection.LOCAL_COMMITTED, c.getLocalState());
}
}
finally
{
ccm.popMetaAwareObject(null);