ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » JCA Adapter reconnect problem on channel restart.

Post new topic  Reply to topic
 JCA Adapter reconnect problem on channel restart. « View previous topic :: View next topic » 
Author Message
cynw
PostPosted: Wed Mar 17, 2010 9:40 pm    Post subject: JCA Adapter reconnect problem on channel restart. Reply with quote

Newbie

Joined: 17 Mar 2010
Posts: 2

Using the IBM Resource Adapter (wmq.jmsra.rar) configured on our Jboss Server to connect to MQSeries V7, the Message Driven Bean does not get reconnected after the MQ channel restarted. I need to restart the Jboss server to get it working again. There are no messages shown in the log to indicate any reconnection ever attempts. Even messages were inserted into the queue, nothing is received by the Message Driven Bean, onMessage(), after the channel restored. I thought ra.xml in the adapter already have the required default reconnection setting. Not sure what have been missing. There is not much documentation around this area. Please help if anyone has any idea how.

IBM Resource Adapter version: 7.0.0.0 - k000-L080529
Jboss Servers tried : Jboss 4.0.3SP1, Jboss 4.2.3GA
Back to top
View user's profile Send private message
cynw
PostPosted: Wed Mar 17, 2010 9:43 pm    Post subject: JCA Adapter reconnect problem on channel restart Reply with quote

Newbie

Joined: 17 Mar 2010
Posts: 2

Here is the details of the configuration.

I use the configuration suggested in:
http://community.jboss.org/wiki/UsingWebSphereMQSeriesWithJBossASPart4
http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html

1. Jboss: server\default\deploy\xxx-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<tx-connection-factory>
<jndi-name>wmq/myCF</jndi-name>
<xa-transaction></xa-transaction>
<rar-name>wmq.jmsra.rar</rar-name>
<connection-definition>javax.jms.ConnectionFactory</connection-definition>
<config-property name="channel" type="java.lang.String">XXXDATA.COMM.SVRCONN</config-property>
<config-property name="hostName" type="java.lang.String">XXXLSTIS01</config-property>
<config-property name="port" type="java.lang.String">3434</config-property>
<config-property name="queueManager" type="java.lang.String">XXXHDA01</config-property>
<config-property name="transportType" type="java.lang.String">CLIENT</config-property>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
<max-pool-size>1</max-pool-size>
</tx-connection-factory>
</datasources>

2. In the deploy\JMS directory:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.resource.deployment.AdminObject"
name="jboss.jca:service=WASDestination,name=myQ">
<depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
<attribute name="JNDIName">myQ</attribute>
<attribute name="Type">javax.jms.Queue</attribute>
<attribute name="Properties">
baseQueueManagerName=XXXHDA01
baseQueueName=TEST.IN
</attribute>
</mbean>
</server>

3. Jboss.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">

<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>TestMDMMessageDrivenBean</ejb-name>
<invoker-bindings>
<invoker>
<invoker-proxy-binding-name>message-inflow-driven-bean</invoker-proxy-binding-name>
</invoker>
</invoker-bindings>
<resource-adapter-name>wmq.jmsra.rar</resource-adapter-name>

<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>myQ</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>channel</activation-config-property-name>
<activation-config-property-value>XXXDATA.COMM.SVRCONN</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>hostName</activation-config-property-name>
<activation-config-property-value>XXXLSTIS01</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>port</activation-config-property-name>
<activation-config-property-value>3434</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>queueManager</activation-config-property-name>
<activation-config-property-value>XXXHDA01</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>transportType</activation-config-property-name>
<activation-config-property-value>CLIENT</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>useJNDI</activation-config-property-name>
<activation-config-property-value>true</activation-config-property-value>
</activation-config-property>

</activation-config>
</message-driven>
</enterprise-beans>

</jboss>


4. ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>
<enterprise-beans>
<message-driven>
<display-name>TestMDM</display-name>
<ejb-name>TestMDMMessageDrivenBean</ejb-name>
<ejb-class>mdb.test.TestMDMMessageDrivenBean</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<res-ref-name>wmq/myCF</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>

<!-- Assembly Descriptor -->
<assembly-descriptor >

<method-permission>
<unchecked/>
<method>
<ejb-name>TestMDMMessageDrivenBean</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>

<container-transaction>
<method>
<ejb-name>TestMDMMessageDrivenBean</ejb-name>
<method-name>onMessage</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>

</assembly-descriptor>
</ejb-jar>
I also tried in jboss.xml, to define the TestMDMMessageDrivenBean to refer to my own invoker-proxy-binding, which has reconnectInterval setting, but does not make any differences:
<invoker-bindings>
<invoker>
<invoker-proxy-binding-name>wsmq-message-driven-bean</invoker-proxy-binding-name>
</invoker>
</invoker-bindings>
Where wsmq-message-driven-bean is in jboss.xml:
<invoker-proxy-bindings>

<invoker-proxy-binding>
<name>wsmq-message-driven-bean</name>
<invoker-mbean>default</invoker-mbean>
<proxy-factory>org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory</proxy-factory>
<proxy-factory-config>
<endpoint-interceptors>
<interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor</interceptor>
<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
</endpoint-interceptors>
<MinimumSize>1</MinimumSize>
<MaximumSize>1</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>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » JCA Adapter reconnect problem on channel restart.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.