-
15. Re: Messaging bridge question
clebert.suconic Aug 30, 2007 5:06 PM (in response to chipschoch)Maybe the CR2 would fix that...
If you could try that first... I will help you after you have tested the CR2. -
16. Re: Messaging bridge question
chipschoch Aug 31, 2007 2:50 PM (in response to chipschoch)I am trying CR2 but after the first time I start the server, whenever I restart I get a duplicate key exception on JBM_DUAL. It looks like it is executing the insert on startup and the insert is :
INSERT_DUAL=INSERT INTO JBM_DUAL VALUES (1)
The table creation:
CREATE_DUAL=CREATE TABLE JBM_DUAL (DUAL_DUMMY INTEGER, PRIMARY KEY (DUAL_DUMMY))
I don't know what the objective of this is so I really don't know how
INSERT_MESSAGE_CONDITIONAL=INSERT INTO JBM_MSG (MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, TYPE) SELECT ?, ?, ?, ?, ?, ? FROM JBM_DUAL WHERE NOT EXISTS (SELECT MESSAGE_ID FROM JBM_MSG WHERE MESSAGE_ID = ?)
would work.
This is from the sybase-persistenc.xml file.
I anticipate being enlightened.
Thanks -
17. Re: Messaging bridge question
clebert.suconic Aug 31, 2007 5:10 PM (in response to chipschoch)We are inserting a value into JBM_DUAL, and we should be ignoring a duplicate key on JBM_DUAL...
If you take a look on the sybase persistance.xml,
http://anonsvn.jboss.org/repos/messaging/tags/JBossMessaging_1_4_0_CR2/src/etc/server/default/deploy/sybase-persistence-service.xml
there is a SQLSTATE code for the duplicate key (DUPLICATE_KEY_STATE)
... maybe the code is different on sybase, on that case you should just replace by a valid code and you won't have the duplicate key exception any more.
I have tested sybase, and I got successful runs, but maybe there is some problem with restarts.
Please, let me know how it goes... and I will replace the valid DUPLICATE SQLSTATE on sybase at our SVN.
Thanks -
18. Re: Messaging bridge question
clebert.suconic Aug 31, 2007 5:12 PM (in response to chipschoch)
I don't know what the objective of this is so I really don't know how
INSERT_MESSAGE_CONDITIONAL=INSERT INTO JBM_MSG (MESSAGE_ID, RELIABLE, EXPIRATION, TIMESTAMP, PRIORITY, TYPE) SELECT ?, ?, ?, ?, ?, ? FROM JBM_DUAL WHERE NOT EXISTS (SELECT MESSAGE_ID FROM JBM_MSG WHERE MESSAGE_ID = ?)
a non persistence message, would be eventually persisted if the memory is full, on that case a pageReference will insert the message *if* the message is not inserted yet.
To avoid a select before the insert, we do the INSERT with SELECT, and we use a dual table (on that case, called JBM_DUAL) as an intermediator on the insert. -
19. Re: Messaging bridge question
chipschoch Sep 4, 2007 8:50 AM (in response to chipschoch)The error code for Sybase ASE for the duplicate key exception is S1000. Setting DUPLICATE_KEY_STATE value to S1000 eliminates the problem with restarts.
-
20. Re: Messaging bridge question
chipschoch Sep 4, 2007 4:24 PM (in response to chipschoch)OK. I set up two servers, JBossAs 4.2.0.GA with JBM 1.4.0.CR2.
I configured a bridge that successfully deployed.
I posted a message to server1 then listed all messaged from server1 jmx-console. No messages listed.
I listed all messages from server2 jmx-console. No messages listed.
I undeployed my bridge ( removed the service xml). Then I listed all messages from server1 jmx-console. My message listed.
I restratesd the bridge and listed the server1 messages. No message listed.
Shut down the bridge. The message listed. -
21. Re: Messaging bridge question
chipschoch Sep 5, 2007 9:38 AM (in response to chipschoch)DOH!!
I traced through the code with the debugger and found that I had overlooked the parameters in the xml. I had MaxBatchSize set to 5 and MaxBatchTime set to -1. I never had more than 4 messages on my queue at a time. When I changed these it worked.
Sorry to waste your time. I appreciate the feedback. -
22. Re: Messaging bridge question
kmajeed Dec 24, 2010 11:36 AM (in response to chipschoch)Guys,
Were you able to resolve this issue? I am also getting the same exception which Chip got? Can you guys please help me in this?
JBoss.xml
======================================================
stat.deployment.cluster.jnp.url = jnp://node2_ip_address:1100/
<message-driven>
<ejb-name>OutBoundMDB</ejb-name>
<destination-jndi-name>${stat.deployment.cluster.jnp.url:}topic/OutboundIntegrationTopic</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/ConnectionFactory</res-ref-name>
<jndi-name>${stat.deployment.cluster.jnp.url:}ConnectionFactory</jndi-name>
</resource-ref>
</message-driven>======================================================
jms-ds.xml
======================================================
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">
<attribute name="ProviderName">DefaultJMSProvider</attribute>
<attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
<attribute name="FactoryRef">/XAConnectionFactory</attribute>
<attribute name="QueueFactoryRef">/XAConnectionFactory</attribute>
<attribute name="TopicFactoryRef">/XAConnectionFactory</attribute>
<attribute name="Properties">
jnp.partitionName=StatPartition
</attribute>
</mbean><!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
<tx-connection-factory>
<jndi-name>JmsXA</jndi-name>
<xa-transaction/>
<rar-name>jms-ra.rar</rar-name>
<connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
<config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
<config-property name="JmsProviderAdapterJNDI" type="java.lang.String">/DefaultJMSProvider</config-property>
<max-pool-size>20</max-pool-size>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
<depends>jboss.messaging:service=ServerPeer</depends>
</tx-connection-factory>======================================================
I have deployed the application on 2 nodes, first nodes starts smoothly but this exception comes up when 2nd node is started. I have checked that node has joined the cluster
======================================================
[GroupMember] New Members : 2 ([192.168.128.215:55200, 192.168.128.131:55200])
[GroupMember] All Members : 2 ([192.168.128.215:55200, 192.168.128.131:55200])======================================================
Can you please help me in this regard?
Khurram