activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wconroy <wcon...@gmail.com>
Subject JBoss Integration
Date Wed, 21 Jun 2006 20:02:06 GMT

I am trying to create an MDB in jboss that runs off an ActiveMQ queue.

To do this, you apparently need add something like the following into the
jms-ds.xml file, then you can say in your mdb what provider to use.

  <!-- The ActiveMQ JMS provider loader -->
  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
	 name="jboss.mq:service=JMSProviderLoader,name=ActiveMQJMSProvider">
    <attribute name="ProviderName">ActiveMQJMSProvider</attribute>
    <attribute name="ProviderAdapterClass">
      org.jboss.jms.jndi.JNDIProviderAdapter
    </attribute>
    <!-- The combined connection factory -->
    <attribute
name="FactoryRef">java:/activemq/QueueConnectionFactory</attribute>
    
    <!-- The queue connection factory -->
    <attribute
name="QueueFactoryRef">java:/activemq/QueueConnectionFactory</attribute>
    
    <!-- The topic factory -->
    <attribute
name="TopicFactoryRef">java:/activemq/QueueConnectionFactory</attribute>
    
    <!-- Uncomment to use HAJNDI to access JMS
    <attribute name="Properties">
       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
       java.naming.provider.url=localhost:1100
    </attribute>
    -->
  </mbean>

So my mdb is annotated with the following.
@MessageDriven(activationConfig = 
{
        @ActivationConfigProperty(propertyName="destinationType",
                     propertyValue="javax.jms.Queue"),
        @ActivationConfigProperty(propertyName="destination",
                     propertyValue="activemq/queue/SecurityChanged"),
        @ActivationConfigProperty(propertyName="connectionFactoryName",
                     propertyValue="activemq/QueueConnectionFactory"),
        @ActivationConfigProperty(propertyName="resourceAdaptorName",
                     propertyValue="activemq-ra-4.0.rar"),
        @ActivationConfigProperty(propertyName="providerAdapterJNDI", 
                     propertyValue="java:/ActiveMQJMSProvider")
})

I get the following exception when running I run my jboss server.

javax.jms.JMSException: Not Supported.
        at
org.apache.activemq.ra.ManagedConnectionProxy.createConnectionConsumer(ManagedConnectionProxy.java:221)
        at org.jboss.ejb3.mdb.MDB.innerCreateQueue(MDB.java:530)
        at org.jboss.ejb3.mdb.MDB.innerCreate(MDB.java:454)
        at org.jboss.ejb3.mdb.MDB.innerStart(MDB.java:267)
        at org.jboss.ejb3.mdb.MDB.start(MDB.java:256)

Is there a differenct connection factory i should be using that supports the
createConnectionConsumer method?  I just have the standard of what comes in
the activemq-4.0-ra.xml.

Thanks,

Bo
--
View this message in context: http://www.nabble.com/JBoss-Integration-t1826263.html#a4981475
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message