It is absolutely impossible to connect to ActiveMQ as a standalone client. The only thing you need is to add activeemq-all-5.4.1.jar and there you are ...
... prop.put(Context.SECURITY_AUTHENTICATION , "system"); prop.put(Context.SECURITY_CREDENTIALS,"manager"); prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.activemq.jndi.ActiveMQInitialContextFactory"); prop.put(Context.PROVIDER_URL,"tcp://localhost:61616"); prop.put("connectionFactoryNames", "TopicCF"); prop.put("topic.topic1", "topic1"); InitialContext ctx = new InitialContext(prop); ...
Now you want to connect to Glassfish V3.x , and it seems impossible to get the right libraries and classes to connect. Although it was still possible with Glassfish V2.x, I have not yet been able to get the equivalent code above for Glassfish!
... Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.appserv.naming.S1ASCtxFactory"); properties.put(Context.PROVIDER_URL, "iiop://localhost:3700"); InitialContext context = new InitialContext(properties) ...
Does anyone have an answer to this? No, I do not want to deploy a read-only corporate application client from the Glassfish queue. There are similar topics here, but nowhere else.
Thanks for any advice.
Sven
source share