Here is explanation. I had read that book long time back. But the reason that they are taking it as SLSB not SFSB is that the state(primary key generated) is not client specific and can be used by any one. ie. all the clients require is unique nos it doesnt matter who gets what. State is nothing but stored as instance variables in the bean class. If you want that this state is not corrupted by any other client of this bean (till it is using it) then you have to make it as Stateful. Consider shopping cart example. If a client is shopping and storing the running total in the bean, then you will not want it to be corrupted by other client doing the same action.
State can also be maintained in SLSB , but if it is applicable to all clients. For example Connection object. and some general state (which most probably will not be changed ie Read only) Hope this clear your doubts Cheers Ashwawni Kalra http://www.geocities.com/ashwani_kalra/ Vikram Naik <[EMAIL PROTECTED] To: [EMAIL PROTECTED] AIL.COM> cc: (bcc: ashwani.kalra/Polaris) Sent by: A Subject: Re: Reg Primary Key generation mailing list for Enterprise JavaBeans development <[EMAIL PROTECTED] A.SUN.COM> 06/12/2003 06:14 PM Please respond to Vikram Naik Thanks for your reply. But can you please elaborate what you meant by saying " If you dont want to share, make it SFSB. " Regards, Vikram Naik ----- Original Message ----- From: "Ashwani Kalra" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 06, 2003 8:47 AM Subject: Re: Reg Primary Key generation > > Not required, Since its not client specific. If you dont want to share, > make it SFSB. > > Cheers > Ashwawni Kalra > http://www.geocities.com/ashwani_kalra/ > > > > > Vikram Naik > <[EMAIL PROTECTED] To: [EMAIL PROTECTED] > AIL.COM> cc: (bcc: ashwani.kalra/Polaris) > Sent by: A Subject: Reg Primary Key generation > mailing list for > Enterprise > JavaBeans > development > <[EMAIL PROTECTED] > A.SUN.COM> > > > 06/05/2003 05:10 > PM > Please respond to > Vikram Naik > > > > > > > Hello All, > > This is with regards to the primary key generation pattern discussed > in the book EJB Design Patterns. They have mentioned one example of a > SessionBean generating a unique key using the UUID algorithm, but what was > confusing for me is they were caching some variables as instance members > and calling the session as a "Stateless" one ... the bean initializes the > member variables in the ejbcreate and the stored values are used in the > method which actually generates the key ... Can we call this bean a SLSB . > I think its SFSB .. > > What say ??? > > Regards, > Vikram Naik > > > > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit Us at http://www.polaris.co.in
