  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | JSP - A mailing list about Java Server Pages specification and reference | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Using JMS in a session bean | Using JMS in a session bean 2004-10-15 - By Laconia Data Systems
Back Dhiren After launching your JMS message Would'nt you want to ensure the listener you registered(is listening) perhaps even in a different method?? Asynchronous communication allows the app to not hang/block waiting for the message to come back Martin- -- -- Original Message -- -- From: Dhiren Mehta To: J2EE-INTEREST@(protected) Sent: Friday, October 15, 2004 7:34 AM Subject: Re: Using JMS in a session bean
Milind,
The question was whether the response can be received in the same method that sent the message.
If I have understood the question clearly, what is expected is that once the message is sent the execution thread should wait until the response is sent back and the response should be received in the same method that sent the message. Well the answer is NO. The whole idea of using JMS is to have Asynchronous communication and not wait for the response.
Dhiren
-- --Original Message-- -- From: A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE -INTEREST@(protected)] On Behalf Of Milind Patil Sent: Friday, October 15, 2004 1:00 PM To: J2EE-INTEREST@(protected) Subject: Re: Using JMS in a session bean
To receive message from a queue you have to have listener associated with it or you can create a queue browser and filer a particular message from a queue.
Milind Bhaskar Patil Tata Consultancy Services Limited Mailto: milind.patil@(protected) Website: http://www.tcs.com
DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services Limited. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services limited on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you.
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv @(protected) and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv @(protected) and include in the body of the message "help".
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2800.1106" name=GENERATOR> <STYLE>@(protected) { font-family: Tahoma; } @(protected) { font-family: sans-serif; } @(protected) Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORATION: underline } A:visited { COLOR: purple; TEXT-DECORATION: underline } SPAN.MsoHyperlinkFollowed { COLOR: purple; TEXT-DECORATION: underline } P { FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman" } SPAN.EmailStyle18 { COLOR: navy; FONT-FAMILY: Arial } DIV.Section1 { page: Section1 } </STYLE> </HEAD> <BODY lang=EN-US vLink=purple link=blue bgColor=#ffffff> <DIV><FONT face=Arial size=2>Dhiren<BR>After launching your JMS message<BR>Would'nt you want to ensure the listener you registered(is listening) perhaps even in a different method??<BR>Asynchronous communication allows the app to not hang/block waiting for the<BR>message to come back<BR>Martin-</FONT></DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">-- -- Original Message -- -- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=Dhiren.Mehta@(protected) href="mailto:Dhiren.Mehta@(protected)">Dhiren Mehta</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=J2EE-INTEREST@(protected) href="mailto:J2EE-INTEREST@(protected)">J2EE-INTEREST@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, October 15, 2004 7:34 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Using JMS in a session bean</DIV> <DIV><BR></DIV> <DIV class=Section1> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Milind,</SPAN></FONT ></P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The question was whether the response can be received in the same method that sent the message . </SPAN></FONT></P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">If I have understood the question clearly, what is expected is that once the message is sent the execution thread should wait until the response is sent back and the response should be received in the same method that sent the message. Well the answer is NO. The whole idea of using JMS is to have Asynchronous communication and not wait for the response.</SPAN></FONT></P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Dhiren</SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-- --Original Message-- --<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE-INTEREST@(protected)] <B><SPAN style="FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Milind Patil<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, October 15, 2004 1:00 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> J2EE-INTEREST@(protected)<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: Using JMS in a session bean</SPAN></FONT></P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"></SPAN></FONT> </P> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt"><BR></SPAN></FONT><FONT face=sans-serif size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">To receive message from a queue you have to have listener associated with it </SPAN></FONT><BR><FONT face=sans-serif size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">or </SPAN></FONT><BR><FONT face=sans-serif size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">you can create a queue browser and filer a particular message from a queue.</SPAN></FONT> <BR><BR><FONT face=sans-serif size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif"><BR>Milind Bhaskar Patil<BR>Tata Consultancy Services Limited<BR>Mailto: milind.patil@(protected)<BR>Website: http://www.tcs.com</SPAN></FONT> </P> <TABLE class=MsoNormalTable style="MARGIN-LEFT: 0.5in; WIDTH: 436.5pt" cellPadding=0 width=582 border=0> <TBODY> <TR> <TD style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; BACKGROUND: white; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt" bgColor=white> <P class=MsoNormal><FONT face="Times New Roman" color=black size=3> <SPAN style="FONT-SIZE: 12pt; COLOR: black">DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services Limited. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services limited on any subject matter.<BR>Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. <BR>Thank you.</SPAN></FONT></P></TD></TR></TBODY></TABLE> <P class=MsoNormal style="MARGIN-LEFT: 0.5in"><FONT face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">===================================================== ====================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help". </SPAN></FONT></P></DIV>===================================================== ====================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help". <P></P></BLOCKQUOTE></BODY></HTML> =========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help". <p>
|
|
 |