activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: ConnectionFactory Lookup not found
Date Thu, 01 Jun 2006 11:24:50 GMT
Whats the type of the object available that you look up via name
"ConnectionFactory"? i.e. are you sure that you are using the ActiveMQ
JNDI provider and not the WL one?

Note that you can use any JNDI provider and just put the ActiveMQ
POJOs in there that you want to be available -whether its an instance
of ActiveMQConnectionFactory or ActiveMQQueue & ActiveMQTopic objects.

Though by all means use our JNDI provider which makes it easy to
populate all the JMS objects you need in a JNDI context using a simple
properties file.

If you're having trouble I suspect its a classpath issue - not finding
your jndi.properties file but inheriting it from a WL area. You could
try explicitly creating a Hashtable with all the properties in it if
you want?


On 6/1/06, sL07 <lucio@asteriski.com> wrote:
>
> WLS 7.x
> Jdk1.4.2
> activeMQ-4-RC2
>
>
> Hi all,
>
> having problems using the JNDI connectionfactory lookup with a WEB app on
> weblogic.
>
> When using the
> javax.jms.TopicConnectionFactory factory =
> (javax.jms.TopicConnectionFactory)ctx.lookup("ConnectionFactory");
>
> only the name "ConnectionFactory" can be found. Anything else is not found.
> When i have another name in the lookup string it is not found despite it
> being in the jndi.properties file.
>
> I am using the jndi.properties from
> http://www.activemq.org/site/jndi-support.html
>
> which is  below. As can be seen the connectionFactoryNames field is
> commented out.
>
> How is the above code finding the "ConnectionFactory" ?
>
> Why is there a need for specific factory's?
>
>
> ---------jndi.properties------------------
>
> java.naming.factory.initial =
> org.apache.activemq.jndi.ActiveMQInitialContextFactory
>
> # use the following property to configure the default connector
> java.naming.provider.url = vm://localhost
>
> # 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 = connectionFactory, queueConnectionFactory,
> topicConnectionFactry
>
> # register some queues in JNDI using the form
> # queue.[jndiName] = [physicalName]
> queue.MyQueue = example.MyQueue
>
>
> # register some topics in JNDI using the form
> # topic.[jndiName] = [physicalName]
> topic.MyTopic = example.MyTopic
>
> -------------end jndi.properties----------------
>
> --
> View this message in context: http://www.nabble.com/ConnectionFactory+Lookup+not+found-t1713667.html#a4653507
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message