I completely agree with you - and SUN should do something to revise their spec for this. Whats the pupose of an ejbRemove if I still have to have finalize blocks or have to catch RuntimeExceptions in an EJB framework? Anamitra --- Hardy Henneberg <[EMAIL PROTECTED]> wrote: > Hi Anamitra, > Thanks for bring up this problem, which has bothered > me too. > Not only with SLSB's but with all type of enterprise > beans, because a system > exception from an enterprise bean will always make > the container discard the > bean without calling ejbRemove or another callback > method. > My "best" solution was to catch system exceptions > and release resources > before rethrowing, as Victor suggests. > But in case of 'timeout' of a SFSB, the bean is also > discarded, without > calling ejbRemove - and I see no way of solving > that. > I wonder why SUN have chosen, that ejbRemove or > unsetEntityContext is not > called in those situations ?? > > kind regards > Hardy > > On Monday 12 August 2002 09:44 pm, Anamitra > Bhattacharyya wrote: > > yeah - maybe I should consider that - or maybe > create > > my own pool of sessions. > > thanks > > Anamitra > > --- Benjamin BONNET > > > > <[EMAIL PROTECTED]> wrote: > > > What about using the finalize() method ? > > > Benjamin > > > > > > Anamitra Bhattacharyya a �crit : > > > > Hi Victor > > > > thats a good point - So it seems that only > those > > > > resourses obtained from the resource factories > > > > declared in the bean env will be released by > the > > > > container. But unfortunately mine is not - so > I > > > > > > guess > > > > > > > I will have to think of another solution. > > > > thanks > > > > Anamitra > > > > --- Victor Langelo > <[EMAIL PROTECTED]> > > > > > > wrote: > > > > > Of course, Chapter 18 contradicts this by > saying > > > > > that the container must > > > > > not call any call back methods when > discarding > > > > > > an > > > > > > > > instance due to an > > > > > system exception. However, section 18.3.7 > states > > > > > that all resources > > > > > obtained from resource factories declared in > the > > > > > bean environment must > > > > > be released. Maybe that will help. > > > > > > > > > > Otherwise, you'll have to catch all runtime > > > > > exceptions and releaes your > > > > > resources before rethrowing. > > > > > > > > > > --Victor > > > > > > > > > > Victor Langelo wrote: > > > > > > Anamitra, > > > > > > > > > > > > According to the 2.0 spec, the only state > > > > > > > > > > transition from the method > > > > > > > > > > > ready pool to does not exist state > requires > > > > > > that > > > > > > > > the ejbRemove method be > > > > > > > > > > > called. So your ejb container does not > comply > > > > > > with > > > > > > > > the spec. Section > > > > > > > > > > > 7.8.3 explicitly states that exceptions > result > > > > > > in > > > > > > > > the transition to the > > > > > > > > > > > does not exist state. > > > > > > > > > > > > --Victor > > > > > =========================================================================== > > > > > > > > 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". > > > > > > > > > __________________________________________________ > > > > Do You Yahoo!? > > > > HotJobs - Search Thousands of New Jobs > > > > http://www.hotjobs.com > > > > > =========================================================================== > > > > > > 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". > > > > __________________________________________________ > > Do You Yahoo!? > > HotJobs - Search Thousands of New Jobs > > http://www.hotjobs.com > > > > > =========================================================================== > > 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". > > -- > Hardy Henneberg > Konsulentfirmaet HHenneberg > Gr�nnevej 44 > 2830 Virum > Danmark > tel: (45) 26124565 > http://www.hhenne.dk > > =========================================================================== > 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 === message truncated ===
__________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com =========================================================================== 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".
