that is not an option - I gues my question can be
generalised like this - if a stateless session bean
takes resource like a db connection or jms
session/producers - then how does it make sure it can
close it?
Taking the resource locally and using it and then
closing it in a finally block is not going to help me.

TIA
Anamitra
--- Matthias Bohlen <[EMAIL PROTECTED]> wrote:
> Hi, Anamitra,
>
> mark the bean as stateful.
>
> Cheers...
> Matthias
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans
> development
> [mailto:[EMAIL PROTECTED]] On Behalf Of
> Anamitra Bhattacharyya
> Sent: Monday, August 12, 2002 2:09 AM
> To: [EMAIL PROTECTED]
> Subject: ejbRemove question for StatelessSession
> bean
>
>
> Hi All
> It seems the ejbRemove method does not get called in
> case of SystemException being thrown from a
> stateless
> session bean. The container just destroys the bean.
> So
> how do I code to clear up the open resources like
> say
> a JMS session in case of a system exception? I
> create
> the session and store it in global variable when one
> of my remote methods get invoked. I understand that
> stateless session bean are not supposed to keep
> global
> variables - but in this case I am just hoping that
> all
> the instances of the bean created by the container
> will finally have their own session instances - that
> heps performance rather than creating the session on
> every invocation.
> But in case a system exception happens the bean
> instance gets remove I want to close the session -
> otherwise it results in a memory leak.
> Any help is appreciated.
> thanks
> Anamitra
>
> __________________________________________________
> 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".

Reply via email to