5 Replies Latest reply on Jul 23, 2010 5:01 AM by Claus Ibsen

    Weblogic

    Phil Waldron Newbie

      Hi,

       

      Is there a plugin to connect camel to a weblogic server.

       

      I can connect to the WL server's connectionFactory using Spring(JNDI) with camel but when I try to send to a Q including username and password I get the following.

       

      Access denied to resource: type=, application=pentant_JmsModule, destinationType=queue, resource=pentantNormalInboundQueue, action=send

       

      To prove the credentials were correct I used the same credentials in Java (Not Camel) and it worked.

       

      Do you have any snippets Java or Spring, to connect to a WLserver including username & password.

       

      Thanks

       

      Phil

        • 1. Re: Weblogic
          Claus Ibsen Master

          Camel uses Spring JMS for sending JMS messages. So look in the Spring documentation how to setup secure connection factories.

          • 2. Re: Weblogic
            Phil Waldron Newbie

            Thanks for ur response but it seems I have a deeper problem.

             

            I had read the Spring documentation and searched the net for solutions to connecting to Weblogic with Credentials. This is the sticking point. The solution is to use "org.springframework.jms.connection.UserCredentials ConnectionFactoryAdapter" which I have, however I now discover this does not work with a WLserver.

             

            See:  SPR 2941 Solution

             

            All so See  Similar Problem

             

            As Per the above I have tried many combinations of Security credentials but always get the same error message:

             

            Access denied to resource: type=, application=pentant_JmsModule, destinationType=queue, resource=pentantNormalInboundQueue, action=send.

             

            As per the examples if I change the password to an invalid string, I get a standard Login Failed:

             

            The workaround is to reinitialize the JNDI context before calling the JMSTemplate.send method. So my simple question how do I do that as camel is doing the Send.

             

            I enclose a copy of my latest camel config.

             

            Thanks in advance for help or advice.

             

            Phil

            • 3. Re: Weblogic
              Claus Ibsen Master

              WebLogic claim they support Spring so its a matter between Spring and Oracle to make it work out of the box.

               

              You could maybe try with a custom connection factory where you do the JNDI trick as you posted.

               

              public interface ConnectionFactory {

                  Connection createConnection() throws JMSException;

               

                  Connection createConnection(String userName, String password)

                      throws JMSException;

              }

               

              And then use your custom connection factory, and delegate to the target connection factory.

              • 4. Re: Weblogic
                Phil Waldron Newbie

                Hi,

                 

                Thanks for your help, Oracle have agreed its their problem and will resolve.

                 

                Phil

                • 5. Re: Weblogic
                  Claus Ibsen Master

                  Ah great the giant raised to the occasion.