  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Struts - A MVC web framework | | Tomcat - JSP/Servlet container | | 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 | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | | JSP - A mailing list about Java Server Pages specification and reference | |
Struts & Hibernate
|
|
|
  | | | State information? | State information? 2003-11-16 - By Katz Guy
Back Hi; I have a component (component A) which interacts with another component (component B). For each invocation on component B there is a token that is returned from component B to component A. component A needs to send it back to component B in the folowing invocation order to invoke it successfully (kind of like the pattern used to prevent duplicate form submitions in JSPs). My question is: Considering the fact that component A is an EJB (for various reasons). Should I implement it as a statefull bean (which will hold the token for the next request as its state) or a stateless bean (with a static map which hold user IDs as keys and tokens as values). Are there any related patterns for such scenarios? My concern is that the token is not really state, its just a mechanism for the proper work of the component and even if it was state - its to small to get the penalty of a statefull bean. What do you think>? Thanks. __ ____ ____ ____ _____ Guy Katz Software Architect, CAP-IFS Comverse guy.katz@(protected) +972 3 7663686
=========================================================================== 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 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255 (See http://ows-1255.ora-code.com)"> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2655.35"> <TITLE>State information?</TITLE> </HEAD> <BODY>
<P><FONT SIZE=2 FACE="Arial">Hi;</FONT><FONT FACE="Times New Roman"><BR> </FONT><FONT SIZE=2 FACE="Arial">I have a component (component A) which interacts with another component (component B).</FONT><BR> <FONT SIZE=2 FACE="Arial">For each invocation on component B there is a token that is returned from component B to component A. component A needs to send it back to component B in the folowing invocation order to invoke it successfully (kind of like the pattern used to prevent duplicate form submitions in JSPs).< /FONT></P>
<P><FONT SIZE=2 FACE="Arial">My question is:</FONT><FONT FACE="Times New Roman" ><BR> </FONT><FONT SIZE=2 FACE="Arial">Considering the fact that component A is an EJB (for various reasons). Should I implement it as a statefull bean (which will hold the token for the next request as its state) or a stateless bean (with a static map which hold user IDs as keys and tokens as values).</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Are there any related patterns for such scenarios? </FONT><FONT FACE="Times New Roman"><BR> </FONT><FONT SIZE=2 FACE="Arial">My concern is that the token is not really state, its just a mechanism for the proper work of the component and even if it was state - its to small to get the penalty of a statefull bean.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">What do you think>?</FONT><FONT FACE="Times New Roman"><BR> </FONT><FONT SIZE=2 FACE="Arial">Thanks.</FONT><FONT FACE="Times New Roman"> < /FONT> <BR><B><FONT SIZE=2 FACE="Arial">__ ____ ____ ____ _____</FONT></B><FONT FACE= "Times New Roman"><BR> </FONT><B></B><B><FONT SIZE=2 FACE="Arial">Guy Katz</FONT></B><FONT FACE="Times New Roman"><BR> </FONT><B></B><B><FONT SIZE=2 FACE="Arial">Software Architect, CAP-IFS</FONT>< /B><FONT FACE="Times New Roman"><BR> </FONT><B></B><B><FONT SIZE=2 FACE="Arial">Comverse</FONT></B><FONT FACE="Times New Roman"><BR> </FONT><B></B><B><FONT SIZE=2 FACE="Arial">guy.katz@(protected)</FONT></B> <FONT FACE="Times New Roman"><BR> </FONT><B></B><B><FONT SIZE=2 FACE="Arial">+972 3 7663686</FONT></B><FONT FACE= "Times New Roman"> </FONT> </P>
</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>
|
|
 |