You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sL07 <lu...@asteriski.com> on 2006/05/30 09:07:27 UTC
weblogic jndi.properties
hi all,
trying to get my weblogic servlet to looking up an ActiveMQ queue that is
specfiied in the jndi.properties.
However the a javax.naming.NameNotFoundException: is thrown when looking up
my connection factory. I have used all types of name prefix's with and
without the java:comp/env. It just seems that my jndi.properties is not
being read.
-------------code that throws---------------------------
InitialContext ctx = new InitialContext();
QueueConnectionFactory qcf =
(QueueConnectionFactory)ctx.lookup("java:comp/env/FirePayQueueConnectionFactory");
QueueConnection connection = qcf.createQueueConnection();
Queue queue = (Queue)ctx.lookup("java:comp/env/FirePayQueue")
-----------------------------------------------------
i have read the jndi tutorial at http://activemq.org/site/jndi-support.html
but i can't get this weblogic junk to work.
The application is deployed as a war.
The jndi.properties is in the web-ing/classes
The jndi.properties is below
-------------------------------------------------
java.naming.factory.initial =
org.activemq.jndi.ActiveMQInitialContextFactory
# use the following property to configure the default connector
#java.naming.provider.url = tcp://localhost:61616
java.naming.provider.url = vm://localhost
# use the following property to embed a broker inside this JVM
#useEmbeddedBroker = true
# use the following property to specify a class path resource or URL
# used to configure an embedded broker using the XML configuration file
#brokerXmlConfig = file:src/conf/sample-conf/default.xml
# use the following property to specify the JNDI name the connection
factory
# should appear as.
connectionFactoryNames = FirePayQueueConnectionFactory
# register some queues in JNDI using the form
# queue.[jndiName] = [physicalName]
queue.FirePayQueue = nebo.FirePayQueue
-------------------------------------------------
any help is most appreciated.
-lp
--
View this message in context: http://www.nabble.com/weblogic+jndi.properties-t1703005.html#a4622093
Sent from the ActiveMQ - User forum at Nabble.com.
Re: weblogic jndi.properties
Posted by James Strachan <ja...@gmail.com>.
BTW are you even sure that ActiveMQ's JNDI provider is being found on
the classpath? Maybe printing out the class used for the context might
help
On 5/30/06, James Strachan <ja...@gmail.com> wrote:
> If you are deployed in WebLogic then it might make more sense to use
> WebLogic's JNDI provider to setup the administered objects? WebLogic
> comes with a UI for setting up the JNDI context for a WAR/EAR
>
> On 5/30/06, sL07 <lu...@asteriski.com> wrote:
> >
> > hi all,
> >
> > trying to get my weblogic servlet to looking up an ActiveMQ queue that is
> > specfiied in the jndi.properties.
> >
> > However the a javax.naming.NameNotFoundException: is thrown when looking up
> > my connection factory. I have used all types of name prefix's with and
> > without the java:comp/env. It just seems that my jndi.properties is not
> > being read.
> >
> > -------------code that throws---------------------------
> > InitialContext ctx = new InitialContext();
> > QueueConnectionFactory qcf =
> > (QueueConnectionFactory)ctx.lookup("java:comp/env/FirePayQueueConnectionFactory");
> > QueueConnection connection = qcf.createQueueConnection();
> >
> > Queue queue = (Queue)ctx.lookup("java:comp/env/FirePayQueue")
> >
> > -----------------------------------------------------
> >
> > i have read the jndi tutorial at http://activemq.org/site/jndi-support.html
> > but i can't get this weblogic junk to work.
> >
> > The application is deployed as a war.
> > The jndi.properties is in the web-ing/classes
> >
> > The jndi.properties is below
> >
> > -------------------------------------------------
> > java.naming.factory.initial =
> > org.activemq.jndi.ActiveMQInitialContextFactory
> >
> > # use the following property to configure the default connector
> > #java.naming.provider.url = tcp://localhost:61616
> > java.naming.provider.url = vm://localhost
> > # use the following property to embed a broker inside this JVM
> > #useEmbeddedBroker = true
> >
> > # use the following property to specify a class path resource or URL
> > # used to configure an embedded broker using the XML configuration file
> > #brokerXmlConfig = file:src/conf/sample-conf/default.xml
> >
> > # use the following property to specify the JNDI name the connection
> > factory
> > # should appear as.
> > connectionFactoryNames = FirePayQueueConnectionFactory
> >
> > # register some queues in JNDI using the form
> > # queue.[jndiName] = [physicalName]
> > queue.FirePayQueue = nebo.FirePayQueue
> > -------------------------------------------------
> >
> > any help is most appreciated.
> >
> > -lp
> > --
> > View this message in context: http://www.nabble.com/weblogic+jndi.properties-t1703005.html#a4622093
> > Sent from the ActiveMQ - User forum at Nabble.com.
> >
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
--
James
-------
http://radio.weblogs.com/0112098/
Re: weblogic jndi.properties
Posted by James Strachan <ja...@gmail.com>.
If you are deployed in WebLogic then it might make more sense to use
WebLogic's JNDI provider to setup the administered objects? WebLogic
comes with a UI for setting up the JNDI context for a WAR/EAR
On 5/30/06, sL07 <lu...@asteriski.com> wrote:
>
> hi all,
>
> trying to get my weblogic servlet to looking up an ActiveMQ queue that is
> specfiied in the jndi.properties.
>
> However the a javax.naming.NameNotFoundException: is thrown when looking up
> my connection factory. I have used all types of name prefix's with and
> without the java:comp/env. It just seems that my jndi.properties is not
> being read.
>
> -------------code that throws---------------------------
> InitialContext ctx = new InitialContext();
> QueueConnectionFactory qcf =
> (QueueConnectionFactory)ctx.lookup("java:comp/env/FirePayQueueConnectionFactory");
> QueueConnection connection = qcf.createQueueConnection();
>
> Queue queue = (Queue)ctx.lookup("java:comp/env/FirePayQueue")
>
> -----------------------------------------------------
>
> i have read the jndi tutorial at http://activemq.org/site/jndi-support.html
> but i can't get this weblogic junk to work.
>
> The application is deployed as a war.
> The jndi.properties is in the web-ing/classes
>
> The jndi.properties is below
>
> -------------------------------------------------
> java.naming.factory.initial =
> org.activemq.jndi.ActiveMQInitialContextFactory
>
> # use the following property to configure the default connector
> #java.naming.provider.url = tcp://localhost:61616
> java.naming.provider.url = vm://localhost
> # use the following property to embed a broker inside this JVM
> #useEmbeddedBroker = true
>
> # use the following property to specify a class path resource or URL
> # used to configure an embedded broker using the XML configuration file
> #brokerXmlConfig = file:src/conf/sample-conf/default.xml
>
> # use the following property to specify the JNDI name the connection
> factory
> # should appear as.
> connectionFactoryNames = FirePayQueueConnectionFactory
>
> # register some queues in JNDI using the form
> # queue.[jndiName] = [physicalName]
> queue.FirePayQueue = nebo.FirePayQueue
> -------------------------------------------------
>
> any help is most appreciated.
>
> -lp
> --
> View this message in context: http://www.nabble.com/weblogic+jndi.properties-t1703005.html#a4622093
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/