1 2 3 Previous Next 34 Replies Latest reply on Jan 27, 2017 12:36 AM by mnovak Go to original post
      • 30. Re: activemq exception
        mnovak

        Is the keystore type JKS and do you the correct password? It seems to be something wrong with it.

         

        I've attached script which generates client/server keystore/trustore. Password is: 123456 Could you try with it?

        • 31. Re: activemq exception
          tbw

          can you please test jms with provided test2.7z ?

          My keys is work for ejb and generated by same sh script.

          Only you need is to download wildfly and:

          1. copy wildfly standalone-full.xml to wildfly config dir (plus server.keystore in this directory too)

          2. copy Server.ejb to wildfly deploy dir

          3. start wildfly (standalone.bat -c standalone-full.xml)

           

          4. run: maven clean compile package exec:exec

          result: no exceptrions, jms is work (spam on console)

          5. then change http-remote to https-remote (lines 34, 42, 45) and you can see work of ejb and exceptions for jms

           

          no any external dependencies.

          • 32. Re: activemq exception
            mnovak

            Hi Andrew,

             

            sorry for big delay but I was ill and busy in the mean time. I finally tried your reproducer and understand where the issue is. Context created with SSL connection can be used to lookup EJB and call a method on it but the same JNDI context cannot be used to lookup JMS connection factory or queue as it fails.

             

            Only way to workaround it is to use context without SSL config to lookup connection factory and queue and then have SSL configured on JMS connection factory to create SSL connection to WF10(Artemis).

             

            I did not figure out how to have SSL connection for remote JNDI lookup of connection factory and queue from WF10. This seems to be more a missing feature than a bug. wdyt?

             

            Thanks,

            Mirek

            • 33. Re: activemq exception
              tbw

              >and then have SSL configured on JMS connection factory to create SSL connection to WF10(Artemis).

              How to do this?

               

              >This seems to be more a missing feature than a bug. wdyt?

              I don't know.

              • 34. Re: activemq exception
                mnovak

                Server config is in my comment: Re: activemq exception

                 

                JMS Connection needs trustore with client certificated so client so should like following example:

                System.setProperty("javax.net.ssl.trustStore", trustStorePath);
                System.setProperty("javax.net.ssl.trustStorePassword", password);
                
                Properties props = new Properties();
                props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
                props.put(Context.PROVIDER_URL, "http-remoting://localhost:8080");
                Context context = context = new InitialContext(props);
                QueueConnectionFactory cf = (QueueConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
                Queue queue = (Queue) context.lookup(destinationNameJndi);
                Connection con = cf.createConnection(); // this will create ssl connection
                ... // send/receive message
                

                 

                Cheers,

                Mirek

                1 2 3 Previous Next