Need help deploying a simple MDB in JBoss 4.0.5
rbrewster Dec 8, 2006 1:13 PMI am trying to package and deploy an EAR to JBoss 4.0.5. The application already runs in Weblogic and in JRun. I have a simple MDB that listens on a Queue. The senders are within stateless EJB's in the same VM. I need the simplest authorization and no transactional support. I have spent at least an entire day browsing forums here trying to get the MDB to deploy. The goal is simply to bind one queue and a connection factory into JNDI and deploy the MDB. I used Xdoclet to generate the deployment descriptors:
ejb-jar.xml: <!-- Message Driven Beans --> <message-driven > <description><![CDATA[EmailSendingBean]]></description> <ejb-name>EmailSending</ejb-name> <ejb-class>edu.darden.alumni.session.message.EmailSendingBean</ejb-class> <transaction-type>Bean</transaction-type> <message-driven-destination> <destination-type>javax.jms.Queue</destination-type> </message-driven-destination> </message-driven> jrun.xml: <message-driven> <ejb-name>EmailSending</ejb-name> <destination-jndi-name>queue/emailqueue</destination-jndi-name> </message-driven> jbossmq-destinations-service.xml: <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=emailqueue"> <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends> <attribute name="MessageCounterHistoryDayLimit">-1</attribute> <attribute name="SecurityConf"> <security> <role name="guest" read="true" write="true"/> <role name="publisher" read="true" write="true" create="false"/> <role name="noacc" read="false" write="false" create="false"/> </security> </attribute> </mbean> <mbean code="org.jboss.naming.NamingAlias" name="jboss.mq:service=NamingAlias,fromName=ConnectionFactory"> <attribute name="ToName">MDBQueueConnectionFactory</attribute> <attribute name="FromName">ConnectionFactory</attribute> </mbean> login-config.xml: <application-policy name = "jbossmq"> <authentication> <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule" flag = "required"> <module-option name = "unauthenticatedIdentity">guest</module-option> <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option> </login-module> </authentication> </application-policy> <application-policy name = "JmsXARealm"> <authentication> <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required"> <module-option name = "principal">guest</module-option> <module-option name = "userName">guest</module-option> <module-option name = "password">guest</module-option> <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option> </login-module> </authentication> </application-policy>
The application looks up the connection factory by the JNDI name:
"jms/MDBQueueConnectionFactory"
It looks up the queue by the JNDI name:
"jms/queue/emailqueue"
I need to bind these names to JNDI.
Some things tried so far:
In the deploy/jms directory I renamed the file hsqldb-jdbc-state-service.xml. This got rid of a ClassCastException.
I am presently getting:
2006-12-08 12:43:34,673 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Initialization failed DLQHandler
javax.naming.NameNotFoundException: XAConnectionFactory not bound
What should I try next?
Thank you.
Richard Brewster