質問

What is the correct way to create JNDI for JMS in jdeveloper 11g so my application can lookup them successfully like this:

        public static TopicConnection getTopicConnection( String connectionFactoryName ) throws NamingException, JMSException{

            TopicConnectionFactory  connectionFactory   = null;
            Context                 initCtx             = new InitialContext();

            connectionFactory = (TopicConnectionFactory) initCtx.lookup("java:comp/env/" + connectionFactoryName);

            return connectionFactory.createTopicConnection();
        }

One of the JNDI name is jms/Topic. Additionally when I start my WebLogic server it start looking for JMS jndi's with the string "JNDI" in the end of the JNDI string. For an example: I have jndi jms/Topic but bea web logic is looking for jms/TopicJNDI. The jndi's are declared in my web.xml

Thanks in advance.

役に立ちましたか?

解決

The reason why I can't config the jms jndi's is because I have to declare them in the web.xml and in the weblogic.xml.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top