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 » Message is not transmitting the destination Queue.

Post new topic  Reply to topic
 Message is not transmitting the destination Queue. « View previous topic :: View next topic » 
Author Message
dhanaraj
PostPosted: Fri Aug 24, 2007 7:05 pm    Post subject: Message is not transmitting the destination Queue. Reply with quote

Voyager

Joined: 10 Aug 2004
Posts: 92

Hi all

We have WAS6.1 and MQ6.0 running on the Sun v10. Portal application is using the JMS to put the java object in the remote def queue.
we have QConnfactories configured on WAS. we have the problem to send the request object in to the queues. When portal application session timed out then the request message is delivering to the destination queues. The message is sitting in to the transmission queue during session time. once session timed out the oppros() count is one. then the message is releasing from the transmission queue.
What is problem what we are really missing how to sol this problem
Could you guys plz help me. Its urgent.


Thanks
Dhanaraj
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Sat Aug 25, 2007 5:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You are putting the message in a transaction.

You are not committing the transaction, until the session times out.

You need to commit the transaction.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Aug 25, 2007 9:15 am    Post subject: Reply with quote

Grand High Poobah

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

To be a little bit clearer:

The request message cannot participate in the global request transaction.
The request message will not be sent until it is committed.

So if you have a request / reply model the request message if transacted needs a transaction of its own independent of the global request transaction and that gets committed before the global request transaction is committed.

Should you so care the reply can be part of the global transaction... but I would not encourage it: If for whatever reason you roll back the global transaction is there a reason to roll back the reply as well??

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dhanaraj
PostPosted: Sat Aug 25, 2007 11:01 am    Post subject: Reply with quote

Voyager

Joined: 10 Aug 2004
Posts: 92

Thanks guys. I appriciated ur input.


Thanks
Dhanaraj
Back to top
View user's profile Send private message Yahoo Messenger
dhanaraj
PostPosted: Sat Aug 25, 2007 1:52 pm    Post subject: Reply with quote

Voyager

Joined: 10 Aug 2004
Posts: 92

Quote:
So if you have a request / reply model the request message if transacted needs a transaction of its own independent of the global request transaction and that gets committed before the global request transaction is committed.


Could you plz help me how to solve this problem using WAS admin console. or
what statement i need to add before the time out of the application.

Thanks
dhanaraj
Back to top
View user's profile Send private message Yahoo Messenger
dhanaraj
PostPosted: Sat Aug 25, 2007 7:37 pm    Post subject: Reply with quote

Voyager

Joined: 10 Aug 2004
Posts: 92

Is there any thing i am missing in the following code.

public String putMessageOnQueue(String queueName, HashMap msg)
throws MessagingException
{
try
{
// Look Up the Queue
Queue queue = (Queue)ctx.lookup(queueName);
if (logger.isDebugEnabled())
logger.debug("Out Queue Found: " + queueName);

//Send the message request
ObjectMessage omsg = null;
if (qs !=null)
{
// Uses Queue Sender
logger.info("Writing with QSESS");
QueueSender qSender = qs.createSender(queue);
omsg = qs.createObjectMessage(msg);
qSender.send(omsg);
qSender.close();
qSender = null;
queue = null;

// TODO - logic added as fix to queue problem
logger.info("Closing Queue Session");
close();
logger.info("Re-Open Queue Session");

// Re-open Connections so it can be used later
connectQCFMgr();
logger.debug("Conn created");
logger.info("Re-opened Queue Session & Connection");
}

// Get the message ID
String msgid = omsg.getJMSMessageID();
logger.info("Message Sent, ID:- " + msgid);

return msgid;
}
catch (NamingException nex)
{
logger.error(nex);
throw new MessagingException(nex);
}
catch (JMSException jmex)
{
logger.error(jmex);
if (jmex.getLinkedException() != null)
logger.error("JMS Detailed Exception:- " + jmex.getLinkedException());
throw new MessagingException(jmex);
}
}


public void close()
throws MessagingException
{
logger.debug("Closing queue objects");
try
{

if (qs != null)
qs.close();
if (qconn != null)
qconn.close();

if (sess != null)
sess.close();
if (conn != null)
conn.close();
if (ctx != null)
ctx.close();
}
catch (JMSException jmex)
{
logger.error(jmex);
if (jmex.getLinkedException() != null)
logger.error("JMS Detailed Exception:- " + jmex.getLinkedException());
throw new MessagingException(jmex);
}
catch (NamingException nex)
{
logger.error(nex);
throw new MessagingException(nex);
}



//Start Session - Without Commit
qs = qconn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);



//Start Session - With Commit
qs = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);


// Commit
logger.info("Msg Sent - Commiting Session");
if (qs.getTransacted())
{
qs.commit();
logger.debug("Commit completed");
}
else
{
logger.warn("Commit not allowed");
}
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Sat Aug 25, 2007 7:40 pm    Post subject: Reply with quote

Grand High Poobah

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

dhanaraj wrote:
Quote:
So if you have a request / reply model the request message if transacted needs a transaction of its own independent of the global request transaction and that gets committed before the global request transaction is committed.


Could you plz help me how to solve this problem using WAS admin console. or
what statement i need to add before the time out of the application.

Thanks
dhanaraj

There is no statement to add.
Try setting transaction not supported on the method of your EJB that sends the message.
If you must you could just as well set requires new transaction... However you might need to find a way to commit as I don't know where the automatic commit would find place...

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Message is not transmitting the destination Queue.
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.