activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tnine <todd.n...@gmail.com>
Subject Active MQ Integration with JBoss DS
Date Mon, 30 Apr 2007 18:24:18 GMT

Hi all,
  I'm using Active MQ 4.1.1 and JBoss 4.0.5.  I've followed the instructions
for the installation of the rar, and I'm receiving the following error.  It
can't find the jdbc connection via JNDI, do I need to tell it to connect to
port 1099 for JNDI lookup, or should it find the default JNDI tree since its
running as an mbean?  Thanks in advance for any help

[code]--- MBeans waiting for other MBeans ---
ObjectName: jboss.jca:service=RARDeployment,name='activemq-rar-4.1.1.rar'
  State: FAILED
  Reason: javax.resource.spi.ResourceAdapterInternalException: Failed to
startup an embedded broker: xbean:broker-config.xml
, due to: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'mysql-jndi' defined in cla
ss path resource [broker-config.xml]: Invocation of init method failed;
nested exception is javax.naming.NameNotFoundExcepti
on: jdbc not bound
  Depends On Me:
   
jboss.jca:service=ManagedConnectionFactory,name=activemq/QueueConnectionFactory
   
jboss.jca:service=ManagedConnectionFactory,name=activemq/TopicConnectionFactory
    activemq.queue:name=outboundQueue
[/code]

As you can see, I have configured the spring to lookup the datasource via
JNDI.  I need this configuration for failover once I get this working for a
single node.  Below is my broker config, as well as my datasource.

broker-config.xml
[code]
<beans>

  <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>


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

    <transportConnectors>
      <!-- prefixing a connector with discovery: causes the connector to be
advertiesed over rendezvous -->
      <transportConnector 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="mysql-jndi"
class="org.springframework.jndi.JndiObjectFactoryBean">
	<property name="jndiName" value="java:/jdbc/ActiveMQDS"/>
  </bean>

</beans>

[/code]

mysql-ds.xml
[code]
<datasources>
  <local-tx-datasource>
    <jndi-name>jdbc/ActiveMQDS</jndi-name>
   
<connection-url>jdbc:mysql://localhost/activemq?relaxAutoCommit=true</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>activemq</user-name>
    <password>mytemppassword</password>    
    <min-pool-size>20</min-pool-size>
    <max-pool-size>100</max-pool-size>    

        <!-- The time before an unused connection is destroyed -->
      <idle-timeout-minutes>5</idle-timeout-minutes>
      
      <!-- Whether to check all statements are closed when the connection is
returned to the pool,
           this is a debugging feature that should be turned off in
production -->
      <track-statements/>
      
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml
(optional) -->
      <metadata>
         <type-mapping>MySQL</type-mapping>
      </metadata>
    </local-tx-datasource>
</datasources>
[/code]
-- 
View this message in context: http://www.nabble.com/Active-MQ-Integration-with-JBoss-DS-tf3671136s2354.html#a10258207
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message