Xid xid = new XidImpl("xa1".getBytes(), 1, UUIDGenerator.getInstance().generateStringUUID().getBytes());
resourceAdapter = new HornetQResourceAdapter();
resourceAdapter.setConnectorClassName(InVMConnectorFactory.class.getName());
MyBootstrapContext ctx = new MyBootstrapContext();
resourceAdapter.start(ctx);
HornetQRAConnectionManager qraConnectionManager = new HornetQRAConnectionManager();
HornetQRAManagedConnectionFactory mcf = new HornetQRAManagedConnectionFactory();
mcf.setResourceAdapter(resourceAdapter);
HornetQRAConnectionFactory qraConnectionFactory = new HornetQRAConnectionFactoryImpl(mcf, qraConnectionManager);
XAQueueConnection queueConnection = qraConnectionFactory.createXAQueueConnection();
XASession s = queueConnection.createXASession();