Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Message stays in pending state

30 views
Skip to first unread message

Frank Eichfelder

unread,
Aug 22, 2003, 8:40:21 AM8/22/03
to

I work with BEA Weblogic 6.1 SP4 and have the following problem:
I use JMS in combination with MDB. The onMessage-method in the mdb is called and
everything looks fine, but when I monitor the Queue, I see, that the message is
still in pending state, although I use AUTO_ACKNOWLEDGE and BMT.
Therefore, every time I redeploy my application or restart the server, I get all
messages redelivered. How can I avoid this?

Here the extract from ejb-jar.xml:
<message-driven>

<display-name>MailMessageBean</display-name>

<ejb-name>MailMessageBean</ejb-name>

<ejb-class>MailMessageBean</ejb-class>
<transaction-type>Bean</transaction-type>

<acknowledge-mode>Auto-acknowledge</acknowledge-mode>

<message-driven-destination>

<destination-type>javax.jms.Queue</destination-type>

</message-driven-destination>

</message-driven>

Here the extract from weblogic-ejb-jar.xml:
<weblogic-enterprise-bean>

<ejb-name>MailMessageBean</ejb-name>

<message-driven-descriptor>

<pool>

<max-beans-in-free-pool>10</max-beans-in-free-pool>

<initial-beans-in-free-pool>1</initial-beans-in-free-pool>

</pool>

<destination-jndi-name>MailMessageQueue</destination-jndi-name>

</message-driven-descriptor>

</weblogic-enterprise-bean>


And finally the code for sending a message:

QueueConnectionFactory qconFactory = (QueueConnectionFactory) context.lookup("WorkflowMessageFactory");
QueueConnection qcon = qconFactory.createQueueConnection();
Queue queue = (Queue) context.lookup("MailMessageQueue");

QueueSession session = qcon.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
QueueSender sender = session.createSender(queue);

TextMessage message = session.createTextMessage();
message.setText("Test");
sender.send(message);

sender.close();
qcon.close();

Thanks for any help!

Eric Ma

unread,
Aug 22, 2003, 9:01:41 AM8/22/03
to

I have a very similar problem. My JMS server and topic is on WebLogic 6.1 SP4,
and my MDB is deployed on WebLogic 8.1 SP1. The ConnectionFactory is configured
to support both User and XA transactions. The MDB has a TX attribute of "Required"
and the TX is container-managed. Everything completed OK in the onMessage() method,
but the TX was never committed. As a result, the message delivery was not acklowledged
and the message stayed in the pending state (evetually it went into an error queue
after hitting the redelivery limit). Part of the exception stack trace shown
in the WebLogic 8.1 SP1 server console is:

<Aug 21, 2003 5:53:19 PM EDT> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-00007F79477CE962632(3587082),Status=Unknown,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
since begin=121,seconds left=1
79,XAServerResourceInfo[JMS_JMSStore]=(ServerResourceInfo[JMS_JMSStore]=(state=new,assigned=none),xar=null
),SCInfo[...]=(state=active),SCInfo[...]=(state=active),properties=({}),Owne
rTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=...,
XAResour
ces={},NonXAResources={})],CoordinatorURL=...): javax.transact
ion.SystemException: Timeout during commit processing

Start server side stack trace:
javax.transaction.SystemException: Timeout during commit processing
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:243)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
at weblogic.transaction.internal.CoordinatorImpl.commit(CoordinatorImpl.java:68)
at weblogic.transaction.internal.CoordinatorImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
End server side stack trace

at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
at weblogic.transaction.internal.Coordinator2_WLStub.commit(Unknown Source)
at weblogic.transaction.internal.TransactionImpl.commit(TransactionImpl.java:308)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:233)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Caused by: javax.transaction.SystemException: Timeout during commit processing

Can someone shed some light on this? Thanks,

Eric Ma

Eric Ma

unread,
Aug 22, 2003, 2:39:51 PM8/22/03
to
From: "Eric Ma" <eri...@hotmail.com>
Sender: "Eric Ma" <eri...@hotmail.com>
Reply-To: "Eric Ma" <eri...@hotmail.com>
Subject: Re: Message stays in pending state
Newsgroups: weblogic.developer.interest.jms
X-User-Info: 160.83.73.12
References: <3f460f35$1...@newsgroups.bea.com> <3f461435$1...@newsgroups.bea.com>
NNTP-Posting-Host: 160.83.73.12
X-Original-NNTP-Posting-Host: 160.83.73.12
Message-ID: <3f46...@newsgroups.bea.com>
Date: 22 Aug 2003 11:39:51 -0700
X-Trace: newsgroups.bea.com 1061577591 160.83.73.12 (22 Aug 2003 11:39:51 -0700)
X-Original-Trace: 22 Aug 2003 11:39:51 -0700, 160.83.73.12
Organization: BEA NEWS SITE
Lines: 174
XPident: Unknown
Path: newsgroups.bea.com!not-for-mail
Xref: newsgroups.bea.com weblogic.developer.interest.jms:12798


One bit of clarification - the message was actually acknowledged and not re-delivered,
even though TX was not commited. Also, the SystemException was thrown at 120
seconds after the MDB is triggered, but nowhere in my deployment descriptor I
specify 120 seconds.

Eric

Rajesh Mirchandani

unread,
Aug 22, 2003, 5:13:39 PM8/22/03
to
Establish trust relationship between your domains.


http://e-docs.bea.com/wls/docs70/secmanage/domain.html#1171534


--
Rajesh Mirchandani
Developer Relations Engineer
BEA Support

Eric Ma

unread,
Aug 23, 2003, 2:59:04 PM8/23/03
to

Thanks for your reply. However, my WLS 8.1 SP1 config.xml's <SecurityConfiguration>
had already been using the right credential (the same as the password of the WLS
6.1 SP4 domain).

Any other suggestions?

Eric

Rajesh Mirchandani <raj...@nospam.com> wrote:
>Establish trust relationship between your domains.
>
>http://e-docs.bea.com/wls/docs70/secmanage/domain.html#1171534

0 new messages