First, I would like to see code.

Second, I'll make some assumptions here:

1) The bean performs some stateful tasks. Hence it's well designed as a
SFSB.
2) The bean performs some stateless tasks. Hence it's badly designed as
a SFSB

Solution: Split the SFSB into a SFSB and a separate SLSB. Also, if the
SLSB doesn't
perform actions upon a transactional resource, it could easily be
replaced by an abstract
class with a lot of static methods.

Being able to examine your code(or the requirements for the SFSB) could
make diagnostics
feasible.

My 2c,

Juan Pablo Lorandi
Chief Software Architect
Code Foundry Ltd.
[EMAIL PROTECTED]

Barberstown, Straffan, Co. Kildare, Ireland.
Tel: +353-1-6012050  Fax: +353-1-6012051
Mobile: +353-86-2157900
www.codefoundry.com


-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]] On Behalf Of subhendukumar mohanty
Sent: Friday, April 12, 2002 3:16 PM
To: [EMAIL PROTECTED]
Subject: Re: Stateful session bean thread issue


Hi,

I have designed a Stateful bean , which is required to be statefull in
one of my scenario. In other scenario i does not care about the state ,
so i want to invoke the methods on it. So if user clicks in a link wich
invokes the first scenario, which creates the statefull bean. If at the
same time user clicks some other link which invokes only the method of
the same bean it  gives error.

Is there any suggestion to design this type of scenario??

Thanks,
Subhendu

-----Original Message-----
From: Ashwani Kalra [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 11:59 PM
To: [EMAIL PROTECTED]
Subject: Re: Stateful session bean thread issue


Hi,
Why do you need concurrent access to the the bean. If you still need,
then put the calls to the bean in the synchronised block.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks
Ashwani Kalra
http://www.geocities.com/ashwani_kalra/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of subhendukumar mohanty
Sent: Friday, April 12, 2002 12:52 AM
To: [EMAIL PROTECTED]
Subject: Stateful session bean thread issue


Hi,

I am using stateful session bean in my project. When one of the thread
tries to access one of the method of the bean when another thread is
using some other method of the bean , it gives ejbreeentrant exception.

I would like to know why it is happening and how to prevent second
thread from using the bean when other thread is accessing it.

Thanks,
Subhendu

=========================
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".

===========================================================================
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