JMS and https

A

Abraham Khalil

Hi all,
Have JMS to use with https

It says in documentation to supply these four arguments,
javax.net.ssl.trustStore, javax.net.ssl.keyStore,
javax.net.ssl.keyStoreType and javax.net.ssl.keyStorePassword

Here's my sample below:

System.setProperty("javax.net.ssl.trustStore", "C:\\Program
Files\\Java\\j2re1.4.2_03\\lib\\security\\cacerts");
System.setProperty("javax.net.ssl.keyStore",
"D:\\Projects\\certificates\\tomcat.keystore");
System.setProperty("javax.net.ssl.keyStoreType", "jks");
System.setProperty("javax.net.ssl.keyStorePassword",
"changeit");

Properties properties = new Properties();

properties.put(Context.INITIAL_CONTEXT_FACTORY,

"org.exolab.jms.jndi.InitialContextFactory");

properties.put(Context.PROVIDER_URL,
"https://localhost:8443/");

jndiContext = new InitialContext(properties);


For some reason after creating the new initial context, its reporting:
Default SSL context init failed: null

Did I set my trustStore path correctly?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top