JMS and https

From: Abraham Khalil (akhalil_at_pacific.net.au)
Date: 01/24/04


Date: 24 Jan 2004 07:02:36 -0800

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