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);
QueueConnection queueConnection = qraConnectionFactory.createQueueConnection();
Session s = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Queue q = HornetQJMSClient.createQueue(MDBQUEUE);
MessageProducer mp = s.createProducer(q);