Hi Krish Yes I agree with you. But the question he is asking is that why the use of transient fields is discouraged ??
Ashwani ----- Original Message ----- From: "Krishnan Subramanian" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 13, 2002 6:12 PM Subject: Re: Trade-offs between use of transient data and ejbPassivate > Ashwani, > > Actually I believe transient fields are to be used when: > > (a) The state (fields) being held by the bean is not > serializable (either regular Java serialization > or IIOP serialization or whatever custom serialization > a Container uses) > (b) The field(s) though serializable may only have a short > [valid] lifespan. In which case, you probably want to > re-initialize/validate them on every activation/passivation > cycle. > > -krish > > > -----Original Message----- > > From: A mailing list for Enterprise JavaBeans development > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ashwani Kalra > > Sent: Monday, May 13, 2002 2:29 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Trade-offs between use of transient data and ejbPassivate > > > > > > hi, > > ejb specification 1.1 says that use of transient fields is discouraged > > refer page 52 of the pdf from Sun Microsystems > > > > When I last read it, The reason may be that the application programmer is > > then reponsible for initializing those transient fields when ejbActivate is > > called. > > Just check it in the ejbActivate method description. > > There is nothing more to it > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Thanks > > Ashwani Kalra > > http://www.geocities.com/ashwani_kalra/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > ----- Original Message ----- > > From: "Shailendra Mishra" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Monday, May 13, 2002 4:05 PM > > Subject: Trade-offs between use of transient data and ejbPassivate > > > > > > hi guys, > > > > could some one please point out the pros and cons of using transient > > fields in session beans and how different is it from having > > non-transient variables and writing the appropriate code in ejbActivate > > and ejbPassivate to handle the serializable issue. > > > > ejb specification 1.1 says that use of transient fields is discouraged > > refer page 52 of the pdf from Sun Microsystems. > > > > i am aware that making variables transinet would not persist the data > > and hence would give some performance improvement. is there more to this > > ? > > > > expecting ur reply > > > > Shailendra Mishra > > MphasiS India > > 'Apeego House', 4-B Tardeo Road > > Mumbai 400 034, INDIA > > Tel: +91 22 491 4901 ext 1004 > > Fax: +91 22 496 1059 > > Dont think you are, know you are - Morpheus > > > > ======================= > > Getting Started: > > http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/ > > Community Web Site: > > http://java.sun.com > > List Archive: > > http://archives.java.sun.com/archives/j2eepatterns-interest.html > > Unsubscribing: > > email "signoff J2EEPATTERNS-INTEREST" to [EMAIL PROTECTED] > > > > =========================================================================== > > 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". > > > > > > =========================================================================== > 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". > =========================================================================== 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".
