[jboss-user] [Messaging, JMS & JBossMQ] - ActiveMQ 4.1.1 JBoss4.2 EJB3 MDB .NET Client
jim.hitchcock@sensus.com
do-not-reply at jboss.com
Thu Sep 27 15:41:26 EDT 2007
I have been following this link:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=95974&postdays=0&postorder=asc&start=0
ActiveMQ 4.1.1 is running fine
ActiveMQ .NET client can post messages to it fine, when I turn on the ActiveMQ example consumer, I collect from client great.
using EJB3 MDB on JBoss4.2, my Message Driven Beans do not fire!
Log file at startup (connections bound)
15:24:41,943 INFO [ConnectionFactoryBindingService] Bound ConnectionManager jboss.jca:service=ConnectionFactoryBinding,name=activemq/QueueConnectionFactory' to JNDI name 'java:activemq/QueueConnectionFactory'
15:24:41,943 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=activemq/TopicConnectionFactory' to JNDI name 'java:activemq/TopicConnectionFactory'
15:24:41,959 INFO [AdminObject] Bound admin object 'org.apache.activemq.command.ActiveMQTopic' at 'activemq/topic/outbound'
TWO Message Driven Beans startup
15:24:43,303 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=arweb.ear,jar=arweb-ejb.jar,name=SimpleMessageReceiverBean,service=EJB3 with dependencies:
15:24:43,443 INFO [EJBContainer] STARTED EJB: com.sensus.arweb.mdb.SimpleMessageReceiverBean ejbName: SimpleMessageReceiverBean
15:24:43,521 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.mdb.MDB
15:24:43,521 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=arweb.ear,jar=arweb-ejb.jar,name=testBean,service=EJB3 with dependencies:
15:24:43,521 INFO [EJBContainer] STARTED EJB: com.sensus.arweb.mdb.testBean ejbName: testBean
-ds.xml file from deploy folder
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE connection-factories
| PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
|
| <connection-factories>
| <tx-connection-factory>
| <jndi-name>activemq/QueueConnectionFactory</jndi-name>
| <xa-transaction/>
| <track-connection-by-tx/> <!-- Thanks to Adrian Brock for pointing this one out! -->
| <rar-name>activemq-rar-4.1.1.rar</rar-name>
| <connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| </tx-connection-factory>
| <tx-connection-factory>
| <jndi-name>activemq/TopicConnectionFactory</jndi-name>
| <xa-transaction/>
| <track-connection-by-tx/> <!-- Thanks to Adrian Brock for pointing this one out too! -->
| <rar-name>activemq-rar-4.1.1.rar</rar-name>
| <connection-definition>javax.jms.TopicConnectionFactory</connection-definition>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| </tx-connection-factory>
|
| <mbean code="org.jboss.resource.deployment.AdminObject" name="activemq.topic:name=arwClientStatusIn">
| <attribute name="JNDIName">activemq/topic/outbound</attribute>
| <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-rar-4.1.1.rar'</depends>
| <attribute name="Type">javax.jms.Topic</attribute>
| <attribute name="Properties">PhysicalName=topic.arwClientStatusIn</attribute>
| </mbean>
| </connection-factories>
|
Message Driven Bean
| package com.sensus.arweb.mdb;
|
| import javax.ejb.ActivationConfigProperty;
| import javax.ejb.MessageDriven;
| import javax.jms.Message;
| import javax.jms.MessageListener;
| import org.jboss.logging.Logger;
| import org.jboss.annotation.ejb.ResourceAdapter;
|
| @MessageDriven(mappedName = "jms/SimpleMessageReceiverBean", activationConfig = {
| @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic.arwClientStatusIn")
| })
| @ResourceAdapter("activemq-rar-4.1.1.rar")
| public class SimpleMessageReceiverBean implements MessageListener {
| private Logger logger = Logger.getLogger(SimpleMessageReceiverBean.class);
|
| public void onMessage(Message message) {
| logger.info("received message");
| }
| }
|
| BEAN #2
| package com.sensus.arweb.mdb;
|
| import org.jboss.logging.Logger;
| import javax.ejb.ActivationConfigProperty;
| import javax.ejb.MessageDriven;
| import javax.jms.Message;
| import javax.jms.MessageListener;
| import org.jboss.annotation.ejb.ResourceAdapter;
|
| /**
| *
| * @author Jim.Hitchcock
| */
| @MessageDriven(mappedName = "jms/testBean", activationConfig = {
| @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic.arwClientStatusIn")
| })
| @ResourceAdapter("activemq-rar-4.1.1.rar")
| public class testBean implements MessageListener {
|
| private Logger logger = Logger.getLogger(testBean.class);
| public void onMessage(Message message) {
| logger.info("Here I am");
| System.out.println("test out......");
| }
| }
|
FROM JMX console
-----------------------------
activemq.topic
* name=arwClientStatusIn
-----------------------------
jboss.j2ee
* ear=arweb.ear,jar=arweb-ejb.jar,name=SimpleMessageReceiverBean,service=EJB3
* ear=arweb.ear,jar=arweb-ejb.jar,name=testBean,service=EJB3
* module=arweb-ejb.jar,service=EJB3
------------------------------
jboss.jca
* name='activemq-rar-4.1.1.rar',service=RARDeployment
------------------------------
jboss.management.local
* J2EEApplication=null,J2EEServer=Local,ResourceAdapterModule=activemq-rar-4.1.1.rar,j2eeType=ResourceAdapter,name=ActiveMQ JMS Resource Adapter
------------------------------
SOMEONE PLEASE HELP ME, WHAT AM I MISSING? My MDBs act like nothing is happening when I fire a message from the client.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089465#4089465
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089465
More information about the jboss-user
mailing list