activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kukusz <luke.majew...@gmail.com>
Subject NullPointerException when Getting TopicConnectionFactory from JNDI
Date Wed, 07 Mar 2007 20:02:00 GMT

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:



   &lt;no-tx-connection-factory&gt;
      &lt;jndi-name&gt;jms/TopicConnectionFactory&lt;/jndi-name&gt;
      &lt;use-java-context&gt;false&lt;/use-java-context&gt;
      &lt;rar-name&gt;activemq-ra.rar&lt;/rar-name&gt;
     
&lt;connection-definition&gt;javax.jms.TopicConnectionFactory&lt;/connection-definition&gt;
      &lt;ServerUrl&gt;vm://localhost&lt;/ServerUrl&gt;
      &lt;min-pool-size&gt;1&lt;/min-pool-size&gt;
      &lt;max-pool-size&gt;200&lt;/max-pool-size&gt;
      &lt;blocking-timeout-millis&gt;30000&lt;/blocking-timeout-millis&gt;
      &lt;idle-timeout-minutes&gt;3&lt;/idle-timeout-minutes&gt;
   &lt;/no-tx-connection-factory&gt;



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 &lt;use-java-context&gt;false&lt;/use-java-context&gt;.  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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message