activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tnine <todd.n...@gmail.com>
Subject Re: Active MQ Integration with JBoss DataSource. JNDI Lookup fails
Date Wed, 02 May 2007 20:28:14 GMT

I've solved my other issues with my active MQ issue.  I haven't pointed to
the data source in my config, only added the spring bean, and I'm still
getting failures on the JNDI lookup.  So, does a JNDI DS lookup work or not
with a RAR?  If so, how does it work?  I can't seem figure out what else I
need to do.  I've also tried adding the JNDI template to bind to the JNDI at
localhost:1099 via TCP, this doesn't work either.  Here is my broker config.

[code]
<beans>

  <broker xmlns="http://activemq.org/config/1.0" brokerName="pefcu.broker"
useJmx="true">

	<!-- In ActiveMQ 4, you can setup destination policies. note: this xml
format may still change a bit -->
    <destinationPolicy>
      <policyMap><policyEntries>

          <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>

	<destinations>
		<queue physicalName="STATEMENT.INPUT" />
		<queue physicalName="STATEMENT.OUTPUT" />
	</destinations>

    <persistenceAdapter>
      <journaledJDBC journalLogFiles="5" dataDirectory="activemq-data"/>
      <!-- To use a different datasource, use th following syntax : -->
      <!--
      <journaledJDBC journalLogFiles="5" dataDirectory="../data"
dataSource="#postgres-ds"/>
       -->
    </persistenceAdapter>

    <transportConnectors>
      <!-- prefixing a connector with discovery: causes the connector to be
advertiesed over rendezvous -->
      <transportConnector name="pefcu.broker" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
    </transportConnectors>

    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
      <networkConnector uri="multicast://default"/>
      <!--
      <networkConnector
uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
      -->
    </networkConnectors>

  </broker>


  <bean id="activemq-ds"
class="org.springframework.jndi.JndiObjectFactoryBean">
	<property name="jndiName" value="ActiveMQDS"/>
  </bean>
</beans>
[/code]

James.Strachan wrote:
> 
> If you're using Spring to configure the data source, why not just drop
> JNDI altogether & use Spring?
> 
> On 5/1/07, tnine <todd.nine@gmail.com> wrote:
>>
>> Just an Update.  I've also tried the following for the JNDI connection.
>> Whenever I view the jmx-console, my data source has connected and started
>> successfully, any help would be greatly appreciated.  I'm thoroughly
>> stumped
>> on this one, my knowledge of deploying RARs is minimal.
>>
>> new config snippit
>> [code]
>> <bean id="mysql-jndi"
>> class="org.springframework.jndi.JndiObjectFactoryBean">
>>         <property name="jndiName" value="jdbc/ActiveMQDS"/>
>>         <property name="jndiTemplate" ref="jndiTemplate"/>
>>         <property name="cache" value="false"/>
>>         <property name="proxyInterface" value="javax.sql.DataSource"/>
>>   </bean>
>>
>>         <bean id="jndiTemplate"
>> class="org.springframework.jndi.JndiTemplate">
>>                 <property name="environment">
>>                         <props>
>>                                 <prop
>> key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
>>                                 <prop
>> key="java.naming.provider.url">jnp://localhost:1099</prop>
>>                                 <prop
>> key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
>>                         </props>
>>                 </property>
>>         </bean>
>> [/code]
>> --
>> View this message in context:
>> http://www.nabble.com/Active-MQ-Integration-with-JBoss-DataSource.--JNDI-Lookup-fails-tf3671136s2354.html#a10271819
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Active-MQ-Integration-with-JBoss-DataSource.--JNDI-Lookup-fails-tf3671136s2354.html#a10294077
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message