public void testCreateNotSupportedCancelNotSupported() throws Exception
{
InitialContext iniCtx = getInitialContext();
TimerTestHome home = (TimerTestHome) iniCtx.lookup(TimerTestHome.JNDI_NAME);
TimerTest session = home.create();
try
{
int initialTimerCount;
int createdTimerCount;
int canceledTimerCount;
initialTimerCount = getTimerCount();
session.startTimerInTxNotSupported();
createdTimerCount = getTimerCount();
assertEquals("Timer not created", initialTimerCount + 1, createdTimerCount);
session.cancelTimerInTxNotSupported();
canceledTimerCount = getTimerCount();
assertEquals("Timer not canceled", createdTimerCount, canceledTimerCount + 1);
}
finally
{
session.remove();
}
}