{
resourceAdapter = newResourceAdapter();
MyBootstrapContext ctx = new MyBootstrapContext();
resourceAdapter.start(ctx);
HornetQRAConnectionManager qraConnectionManager = new HornetQRAConnectionManager();
HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory();
mcf.setResourceAdapter(resourceAdapter);
HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager);
QueueConnection queueConnection = qraConnectionFactory.createQueueConnection("testuser", "testwrongpassword");
try
{
queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE).close();
fail("should throw esxception");
}
catch (JMSException e)
{
//make sure the recovery is null
assertNull(mcf.getResourceRecovery());
}
}