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 » IBM MQ Java / JMS » MQ Series 6.0 with BEA Weblogic 8.1 SP4 problem

Post new topic  Reply to topic
 MQ Series 6.0 with BEA Weblogic 8.1 SP4 problem « View previous topic :: View next topic » 
Author Message
gswamin
PostPosted: Mon Mar 26, 2007 4:12 pm    Post subject: MQ Series 6.0 with BEA Weblogic 8.1 SP4 problem Reply with quote

Newbie

Joined: 26 Mar 2007
Posts: 2

Hi all,
I am trying to leverage the BOTHRESH feature on the MQ level with MDB deployed in Weblogic 8.1 sp5. On the MQ Queue side, i have set "Backout requeue queue" as an "<Some error Queue>" , "Backout threshold" as "2" and "Harden get backout" as "Not Hardened".
I have got the following setting on my MDB side for its ejb-jar.xml

---------------------------- 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'>


<!-- Generated XML! -->

<ejb-jar>
<description><![CDATA[This is the deployment descriptor for the auto-dialer Message driven bean]]></description>
<display-name>MQ Series Message Pull Message Driven Bean</display-name>
<enterprise-beans>
<message-driven>
<description><![CDATA[This bean pulls message from a queue and passes it on to a handler.]]></description>
<ejb-name>MQSeriesMessagePullMDB</ejb-name>
<ejb-class>com.capitalone.ccs.mqseries.ejb.MQSeriesMessagePullMDB</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>

<env-entry>
<description><![CDATA[The user name to be used to invoke a Chordiant Service]]></description>
<env-entry-name>username</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>service</env-entry-value>
</env-entry>
<env-entry>
<description><![CDATA[The password to be used to invoke a Chordiant Service]]></description>
<env-entry-name>password</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>service</env-entry-value>
</env-entry>
<env-entry>
<description><![CDATA[The no of retry attempts.]]></description>
<env-entry-name>retry_count</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>2</env-entry-value>
</env-entry>
<resource-ref>
<res-ref-name>MQSeriesXAQCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>MQSeriesAutoDialerQueue</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
</message-driven>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MQSeriesMessagePullMDB</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>

</method>
<method>
<ejb-name>MQSeriesMessagePullMDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>

</ejb-jar>

--------------------------- end of ejb-jar.xml ---------------------------------

The weblogic-ejb-jar.xml file is

--------------------------- Start of weblogic-ejb-jar.xml-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>


<!-- Generated XML! -->

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MQSeriesMessagePullMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>10</max-beans-in-free-pool>
<initial-beans-in-free-pool>3</initial-beans-in-free-pool>
</pool>

<destination-jndi-name>AUTODIALER_LOCAL</destination-jndi-name>
<initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
<provider-url>file:C:/JNDI-Directory</provider-url>
<connection-factory-jndi-name>XA_DLOCAL</connection-factory-jndi-name>
</message-driven-descriptor>

<transaction-descriptor>
<trans-timeout-seconds>300</trans-timeout-seconds>
</transaction-descriptor>

<reference-descriptor>
<resource-description>
<res-ref-name>MQSeriesXAQCF</res-ref-name>
<jndi-name>jms/MQSeriesXAQCF</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>MQSeriesAutoDialerQueue</res-ref-name>
<jndi-name>jms/MQSeriesAutoDialerQueue</jndi-name>
</resource-description>
</reference-descriptor>

<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>ejb/MQSeriesMessagePullMDB</jndi-name>
<local-jndi-name>MQSeriesMessagePullMDBLocal</local-jndi-name>
<remote-client-timeout>0</remote-client-timeout>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>

------------------------------End of weblogic-ejb-jar.xml ----------------------

The problem is when my MDB throws an IllegalStateException on any failure. I see on my weblogic logs that the same message is delivered to the MDB twice and is backed out after two times (since backout count is set to 2 at MQ side). But after backing out, i see the queue depth of the Error destination incremented by 1, but the actual message itself is not visible. When i try to clear the message in the Error Queue, i get an error saying that there are uncommitted messages hence cannot be cleared up.

Does anyone know why this is happenning and what i need to get those messages be commited and viewable. Is there any setting that is required on the MQ Queue Manager or on Weblogic side. Please help me, i have spent a lot of time getting this work and is totally lost as to how to get it. Appreciate any suggestions or inputs on this.

Thanks
Swami
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 27, 2007 3:00 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you tried with hardened backout ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gswamin
PostPosted: Tue Mar 27, 2007 5:04 am    Post subject: MQ Series 6.0 with BEA Weblogic 8.1 SP4 problem Reply with quote

Newbie

Joined: 26 Mar 2007
Posts: 2

yes, i have tried with Hardened back out setting too. It does not work

Another important information i would like to share is i am testing this in Java Bindings mode and leveraging the two-phase commit of Weblogic. Also, noticed from the logs that when i deploy the MDB as non-transactional, the Thread class com.ibm.mq.jms.contact admin is started. But when the same MDB is deployed as transactional the Thread weblogic.kernel.ExecuteThread is called. I think it has something to do with the <dispatch-policy> on the MDB, but i dont know how i can configure my transactional MDB to invoke the thread com.ibm.mq.jms.contact admin.

As per the weblogic's documentation for the dispatch policy it says
"If a message-driven bean (MDB) is driven by a foreign (non-WebLogic) destination source, WebLogic Server might ignore dispatch-policy, as the MDB may instead run in the foreign provider's threading mechanism. For example, for the IBM WebSphere MQSeries messaging software, dispatch-policy is not honored for non-transactional queues; instead the application code runs in an MQSeries thread. For MQSeries transactional queues, and both non-transactional and transactional topics, dispatch-policy is honored.".

The glitch here i feel is, Weblogic is using the dispatch policy of foreign provider's threading mechanism for non transactional MDB with no dispatch policy defined in DD. But for the transactional case again with no dispatch policy defined in DD, it is assigning the default weblogic Kernel thread. This is just my gut feeling. Any other pointers/suggestions/help will be appreciated. Thanks in advance.

Swami
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Mar 28, 2007 1:17 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If I remember well the threshold handling of the MDB is described in something like the following in the WAS manual:
If you are using WAS application server the mechanism to put the message to the backout queue, or the DLQ, when the BO threshold is triggered, is being handled for you. ANY OTHER provider (non IBM = Weblogic) you (as in app/MDB developer) are responsible for it.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
martinevans
PostPosted: Mon Feb 25, 2008 9:53 am    Post subject: Reply with quote

Newbie

Joined: 25 Feb 2008
Posts: 4

Hi,

Did you come up with a fix for this? I've just raised a PMR with IBM for the same issue, I didn't interpret the docs in the same way as the last comment, looks to me like Weblogic should implement ASF and do the re-queue, it's partly doing it so there must be some code there?

Martin
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 25, 2008 2:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you guys tried making the queues / MDBs transactional??


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
martinevans
PostPosted: Mon Feb 25, 2008 3:11 pm    Post subject: Reply with quote

Newbie

Joined: 25 Feb 2008
Posts: 4

We are using XA container managed transactions, we had to put a whole load of deployment descriptors together to get all queues enlisted in the transaction (BEA advised), without the resource-ref deployment descriptors only the input queue was enlisted. I'm wondering if this is related, I've just opened a call with BEA also, I would have thought that wl would have known that the input queue was enlisted and enlisted the ErrorDestination also.
Back to top
View user's profile Send private message
martinevans
PostPosted: Thu Feb 28, 2008 10:16 am    Post subject: Reply with quote

Newbie

Joined: 25 Feb 2008
Posts: 4

I have had a response from both IBM and BEA.

IBM handle the re-queue in the MQ/JMS library, the WMQ consumer doesn't commit the bad message to the fail queue until a good message comes along. I put 10 bad messages on the input queue and then 14 good messages, the 10 bad messages were committed to the backout queue.

BEA support recalled a similar case/conf call with IBM where IBM told them that this is what they do.

Martin.
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 » IBM MQ Java / JMS » MQ Series 6.0 with BEA Weblogic 8.1 SP4 problem
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.