Great thanks for letting us know
On 3/8/07, kukusz <luke.majewski@gmail.com> wrote:
>
> Exactly what I did, worked great. Apparently you cannot use datasources from
> remote VMs. I have not been able to find a satisfactory explanation for
> this, however. For anyone facing this problem in the future, using
> http://activemq.apache.org/jndi-support.html
> http://activemq.apache.org/jndi-support.html is exactly what you need.
>
>
>
> James.Strachan wrote:
> >
> > Is your standalone app still using JBoss JNDI? If not it sounds like
> > you need to setup a JNDI context.
> >
> > http://activemq.apache.org/jndi-support.html
> >
> > On 3/7/07, kukusz <luke.majewski@gmail.com> wrote:
> >>
> >> I've looked almost everywhere for the solution to this particular problem
> >> and
> >> have had no luck, perhaps someone has seen this.
> >>
> >>
> >> I have integrated ActiveMQ with JBoss and it works great when JNDI grabs
> >> the
> >> Topic and TopicConnectionFactory from jboss. The test code looks like:
> >>
> >>
> >>
> >>
> >> System.out.println(context.lookup("jms/TopicConnectionFactory"));
> >>
> >> System.out.println((Topic) context.lookup("jms/topic"));
> >>
> >>
> >>
> >>
> >> Both of those lines of code give me something in the log when running
> >> code
> >> deployed in a WAR in JBoss. However, a standalone app return a null
> >> connection factory. Furthermore, additional logging using
> >> context.listBindings shows the connection factory listed with the correct
> >> class type.
> >>
> >>
> >> Here is the connection factory as defined in the datasource:
> >>
> >>
> >>
> >> <no-tx-connection-factory>
> >> <jndi-name>jms/TopicConnectionFactory</jndi-name>
> >> <use-java-context>false</use-java-context>
> >> <rar-name>activemq-ra.rar</rar-name>
> >>
> >> <connection-definition>javax.jms.TopicConnectionFactory</connection-definition>
> >> <ServerUrl>vm://localhost</ServerUrl>
> >> <min-pool-size>1</min-pool-size>
> >> <max-pool-size>200</max-pool-size>
> >>
> >> <blocking-timeout-millis>30000</blocking-timeout-millis>
> >> <idle-timeout-minutes>3</idle-timeout-minutes>
> >> </no-tx-connection-factory>
> >>
> >>
> >>
> >> I essentially followed this
> >> http://devzone.logicblaze.com/site/integrating-apache-activemq-with-jboss.html
> >> jboss integration documentation with some minor modifications, such as
> >> setting <use-java-context>false</use-java-context>.
I also
> >> tried changing "vm://" to "tcp://" in case that would help. Any ideas
> >> would
> >> be greatly appreciated.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/NullPointerException-when-Getting-TopicConnectionFactory-from-JNDI-tf3364562s2354.html#a9360907
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >
> >
> > --
> >
> > James
> > -------
> > http://radio.weblogs.com/0112098/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/NullPointerException-when-Getting-TopicConnectionFactory-from-JNDI-tf3364562s2354.html#a9381352
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/
|