Context initial = new InitialContext();
ConnectionFactory cf = (ConnectionFactory)initial.lookup("ConnectionFactory");
where jndi.properties contains:
The standard way in JMS to get a connection factory is to look it up from JNDI (see JMS spec).
ActiveMQ is different in that it also allows you to instantiate one directly which is what you have done in the past.
JBM 1.x does not support direct instantiation of connection factories, but JBM 2.0 does.