[Messaging, JMS & JBossMQ] - Error persisting message in DB2
by kaobe
Hi there!
I have a JBoss 4.0.3 SP1 that does JMS with MDBs. The persistance is done with DB2. There is a message sent to a topic, an MDB reacts and - as a result - sends another message to a Queue. The first message is being sent and received, it is being saved in the database (jms_messages). When the answer message should be saved it is being sent and JBoss tries to store it, but gets an SQL error from DB2, because the unique index defined in deploy/jms/-jdbc2-service.xml for the fields txop and txid is being violated. There is no transaction running, that's why the values are null and 'A' both for the already stored message for the topic and the new one for the queue.
No my question: is this unique index neccessary? I have dropped it from the database for a test and it seemed to work. So I would like to know why there is such an index.
The funny thing is, it worked with hsqldb (with the index). Does that mean hsqldb violates the index definition or is there some other reason for this behaviour?
Thanks a lot for your help!
I wish everyone of you merry christmas and a happy new year!
Bye,
Peter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995808#3995808
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995808
19 years, 4 months
[Messaging, JMS & JBossMQ] - Howto connect a EJB3 MDB to a remote queue?
by estiedi
Hi,
I need to make a EJB3 MDB that listens for messages coming from another JBoss server.
I'm pretty new to JBoss and an intense googling for examples and tutorials wasn't very helpful for me. Especially the possibility of doing things several different ways is confusing. Also it looks like it changes quite a lot between minor versions? (I'm currently using JBoss 4.0.5)
Anyway, so far I configured a JMSProviderLoader in jms-ds.xml:
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
| name="jboss.mq:service=JMSProviderLoader,name=RemoteMQProvider,server=192.168.100.10">
| <attribute name="ProviderName">ISJMSProvider</attribute>
| <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
| <attribute name="QueueFactoryRef">XAConnectionFactory</attribute>
| <attribute name="TopicFactoryRef">XAConnectionFactory</attribute>
| <attribute name="Properties">
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.factory.url.pkgs=org.jnp.interfaces
| java.naming.provider.url=192.168.100.10:25199
| </attribute>
| </mbean>
and an invoker proxy in the ejb jboss.xml:
| <message-driven>
| <ejb-name>TestMDB</ejb-name>
| <destination-jndi-name>queue/remotequeue</destination-jndi-name>
| <invoker-bindings>
| <invoker>
| <invoker-proxy-binding-name>TextMDBInvoker</invoker-proxy-binding-name>
| </invoker>
| </invoker-bindings>
| </message-driven>
| </enterprise-beans>
|
| <invoker-proxy-bindings>
| <invoker-proxy-binding>
| <name>TextMDBInvoker</name>
| <invoker-mbean>does-not-matter</invoker-mbean>
| <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
| <proxy-factory-config>
| <JMSProviderAdapterJNDI>ISJMSProvider</JMSProviderAdapterJNDI>
| <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
| <MinimumSize>1</MinimumSize>
| <MaximumSize>15</MaximumSize>
| <KeepAliveMillis>30000</KeepAliveMillis>
| <MaxMessages>1</MaxMessages>
| <MDBConfig>
| <ReconnectIntervalSec>5</ReconnectIntervalSec>
| <DLQConfig>
| <DestinationQueue>queue/DLQ</DestinationQueue>
| <MaxTimesRedelivered>10</MaxTimesRedelivered>
| <TimeToLive>0</TimeToLive>
| </DLQConfig>
| </MDBConfig>
| </proxy-factory-config>
| </invoker-proxy-binding>
| </invoker-proxy-bindings>
|
But now, how do I configure my EJB3 MDB to connect to this remote queue?
Also the remote JBoss server is version 3. I have been told that this should be no problem. But is it really no problem when using EJB3?
All tips and hints are greatly appreciated.
D.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995806#3995806
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995806
19 years, 4 months