Seam MDB with remote topic
tonylmai Apr 4, 2008 9:29 PMHello all,
I have a Seam component modeled as a MDB. I tried to hook this MDB to a remote topic (JBoss MQ). Yet I do not receive messages sent from the remote server.
Can someone please help? I've been looking at this code for quite sometimes now and I am not sure what could go wrong. How could I go about debugging this?
I have the bean as followed:
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Topic") , @ActivationConfigProperty(propertyName="destination", propertyValue="topic/brkr-ovd-private") }) @Name("tdQualifyOrdListener") public class QualifyingOrdersListener implements javax.jms.MessageListener {
And I declared the following JMSProviderLoader in jms-ds.xml, deployed on JBoss server (deploy directory) that hosts Seam app.
<server> <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=RemoteJMSProvider,server=SF-CORP-QA-03"> <attribute name="ProviderName">IBS_JMSProvider</attribute> <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute> <attribute name="FactoryRef">XAConnectionFactory</attribute> <!-- The queue connection factory --> <attribute name="QueueFactoryRef">XAConnectionFactory</attribute> <!-- The topic factory --> <attribute name="TopicFactoryRef">XAConnectionFactory</attribute> <!-- Connect to JNDI on the host "queuehost" port 1099 --> <attribute name="Properties"> java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jnp.interfaces java.naming.provider.url=remote-server:1099 java.naming.security.principal=loginId java.naming.security.credentials=loginPwd </attribute> </mbean> </server>
I also have the following jboss.xml packaged with Seam app (/META-INF)
<jboss xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" version="3.0"> <invoker-proxy-bindings> <invoker-proxy-binding> <name>IBS-TD-MDB-Invoker</name> <invoker-mbean>does-not-matter</invoker-mbean> <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory> <proxy-factory-config> <JMSProviderAdapterJNDI>IBS_JMSProvider</JMSProviderAdapterJNDI> <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI> <MinimumSize>1</MinimumSize> <MaximumSize>15</MaximumSize> <KeepAliveMillis>30000</KeepAliveMillis> <MaxMessages>1</MaxMessages> <MDBConfig> <ReconnectIntervalSec>10</ReconnectIntervalSec> <DLQConfig> <DestinationQueue>queue/DLQ</DestinationQueue> <MaxTimesRedelivered>10</MaxTimesRedelivered> <TimeToLive>0</TimeToLive> </DLQConfig> </MDBConfig> </proxy-factory-config> </invoker-proxy-binding> </invoker-proxy-bindings> <enterprise-beans> <message-driven> <ejb-name>BankTransactionsListener</ejb-name> <destination-jndi-name>topic/brkr-ovd-private</destination-jndi-name> <invoker-bindings> <invoker> <invoker-proxy-binding-name>IBS-TD-MDB-Invoker</invoker-proxy-binding-name> </invoker> </invoker-bindings> </message-driven> </enterprise-beans> ...
Sorry for the long post. Much appreciated.
-tony