  | 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 | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Regarding JMS | Regarding JMS 2004-07-04 - By ashraf galal
Back <html><div style='background-color:'><PRE><SPAN style="COLOR: black"><FONT size =2><FONT face="Arial Unicode MS">K.Pushparaj wrote:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN>< /PRE><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS"> We are using weblogic JMS Queue and MDB in our system. I am having<o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS">some questions on the same<o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN style="COLOR: black "><FONT size=2><FONT face="Arial Unicode MS">   ; 1) Is there any pattern available for using message beans.<o:p></o:p>< /FONT></FONT></SPAN></PRE><PRE><FONT size=2><FONT face="Arial Unicode MS"><SPAN style="COLOR: black"><SPAN style="mso-spacerun: yes"> &nbs p; </SPAN></SPAN><SPAN style="COLOR: blue">The implementation of MDB</SPAN> <SPAN style="COLOR: black"> </SPAN><SPAN style="COLOR: blue"><SPAN style="mso -spacerun: yes"> </SPAN>uses some sort of the observer pattern<o:p></o:p>< /SPAN></FONT></FONT></PRE><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS"> 2) Where can I get the details about drawbacks of using MDB.<o:p></o:p></FONT></FONT></SPAN> </PRE><PRE><SPAN style="COLOR: blue"><FONT size=2><FONT face="Arial Unicode MS"> <SPAN style="mso-spacerun: yes"> </SPAN>J2EE specification (section 17 of EJB 2.0 specification ) or any J2EE book, </FONT></FONT></SPAN></PRE><PRE><SPAN style= "COLOR: blue"><FONT size=2><FONT face="Arial Unicode MS">I recommend the expert one by one by Rod Johnson<o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN style ="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS "> 3) Can I use MDB as a normal stateless session bean including<o:p></o:p></FONT></FONT></SPAN></PRE><PRE> <SPAN style="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS">database transaction.<o:p></o:p></FONT></FONT></SPAN></PRE><PRE><FONT size=2><FONT face= "Arial Unicode MS"><SPAN style="COLOR: black"><SPAN style="mso-tab-count: 1"> </SPAN></SPAN><SPAN style="COLOR: blue">MDB does not have either a home interface nor remote interface, so it is not visible </SPAN></FONT></FONT></PRE ><PRE><FONT size=2><FONT face="Arial Unicode MS"><SPAN style="COLOR: blue">to the client, Whereas the session beans are. MDB is a message consumers, </SPAN>< /FONT></FONT></PRE><PRE><FONT size=2><FONT face="Arial Unicode MS"><SPAN style= "COLOR: blue">it does not have a client view. </SPAN></FONT></FONT></PRE><PRE> <FONT size=2><FONT face="Arial Unicode MS"><SPAN style= "COLOR: blue">Transaction in MDB have to be committed before the OnMessage() method returns. </SPAN></FONT></FONT></PRE><PRE><FONT size=2><FONT face="Arial Unicode MS"><SPAN style="COLOR: blue">I don?t think that possible since that means the instances of a message driven bean </SPAN></FONT></FONT></PRE><PRE> <FONT size=2><FONT face="Arial Unicode MS"><SPAN style="COLOR: blue">are equivalent. .<SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN>< /FONT></FONT></PRE><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face= "Arial Unicode MS"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p>< /FONT></FONT></SPAN></PRE><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS"> 4) If any exception happens can the message will be retained so that<o:p></o:p></FONT>< /FONT></SPAN></PRE><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face= "Arial Unicode MS">it will be served next time<o:p></o:p></FONT></FONT> </SPAN></PRE><PRE><SPAN style="COLOR: blue"><FONT size=2><FONT face="Arial Unicode MS">MDB can throw system exception upon which the container discards the bean instance. </FONT></FONT></SPAN></PRE><PRE><SPAN style="COLOR: blue"> <FONT size=2><FONT face="Arial Unicode MS">However, the exceptions are not propagated to the client, since there are no clients.<SPAN style="mso-spacerun: yes"> </SPAN></FONT></FONT></SPAN></PRE><PRE><SPAN style="COLOR: blue"> <FONT size=2><FONT face="Arial Unicode MS"><SPAN style="mso-spacerun: yes">< /SPAN>So, MDB cannot throw application exception. The answer is No. <o:p></o:p>< /FONT></FONT></SPAN></PRE><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS"> Ashraf Galal<o:p></o:p></FONT></FONT></SPAN></PRE ><PRE><SPAN style="COLOR: black"><FONT size=2><FONT face="Arial Unicode MS"> <o:p></o:p></FONT></FONT></SPAN></PRE><PRE><SPAN style="COLOR: black"> <FONT size=2><FONT face="Arial Unicode MS"> <o:p></o:p></FONT></ FONT></SPAN></PRE> <P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"> <o:p></o:p></FONT></FONT></P> <P><BR><BR></P><BR><BR><BR> <DIV> </DIV></div><br clear=all><hr>Powerful Parental Controls <a href= "http://g.msn.com/8HMBENCA/2755??PS=47575">With MSN Premium </a> Get 2 Months FREE* </html> ==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|
 |