I am guessing you are trying to access ActiveMQ from a remote client, so try:
final Properties env = new Properties();
env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
org.apache.activemq.jndi.ActiveMQInitialContextFactory");
env.setProperty(Context.PROVIDER_URL,
String.format("failover:(nio://%1$s:%2$s?soTimeout=60000&daemon=true&keepAlive=true&connectionTimeout=120000&wireFormat.tcpNoDelayEnabled=true&wireFormat.maxInactivityDuration=240000&wireFormat.maxInactivityDurationInitalDelay=120000)?timeout=15000",
"127.0.0.1", 61616));
final InitialContext jmxc = new InitialContext(env);
final ConnectionFactory cf = (ConnectionFactory)
jmxc.lookup("ConnectionFactory");
final Connection c = cf.createConnection();
....
c.close();
--
View this message in context:
http://openejb.979440.n4.nabble.com/Help-one-MDB-deploy-standalone-openejb-but-lookup-ConnectionFactory-result-is-null-tp4660275p4660287.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.