activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mrich <matthew.r...@qxlva.com>
Subject Instantiating ActiveMQSslConnectionFactory via JNDI (SSL)
Date Mon, 04 Nov 2013 10:49:11 GMT
Hi,

I am trying to create a secure ActiveMQ connection, using
ActiveMQSslConnectionFactory that I want instantiated from JNDI.
	
I have got JNDI working to lookup a standard ActiveMQ connection factory,
however I am having problems updating this to create an
ActiveMQSslConnectionFactory, whereby I can then programatically set
keystore/truststore information.


A sample of my code is:

/Hashtable<String, String> environmentVariables = new Hashtable<String,
String>();
environmentVariables.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
environmentVariables.put(Context.PROVIDER_URL, "ssl:/...");

initialContext = new InitialContext(environmentVariables);
QueueConnectionFactory connectionFactory =
initialContext.lookup("QueueConnectionFactory");/

This works fine, but I end up with a 'QueueConnectionFactory'. I can use the
other 'lookup' options but that just gives me an ActiveMQConnectionFactory
or the TopicConnectionFactory... but not the ActiveMQSslConnectionFactory
that I require.


Any guidance is appreciated.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Instantiating-ActiveMQSslConnectionFactory-via-JNDI-SSL-tp4673824.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message