Hi,
I wonder if it is possible to have a static field in the session bean and
check if this field is set in the
ejbCreate() and then react according to set status of this field. I never
tried it but would this be a way to do it ?
Frank
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 12:23 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [JBoss-user] Design question - Singleton
It sounds like there is a problem with your design if you are trying to do
this - the EJB container controls all instance creation, so you can't
really create a true Singleton bean.
What are you trying to do? There are many other ways to get Singleton-like
functionality with EJBs. I'm assuming the bean is stateless if you want to
create a Singleton, and for stateless beans the container will create as
many instances as necessary to service client requests.
Alex
|--------+-------------------------------------->
| | "Hermann RANGAMANA" |
| | <[EMAIL PROTECTED]> |
| | Sent by: |
| | [EMAIL PROTECTED]|
| | eforge.net |
| | |
| | |
| | 07/05/01 05:07 AM |
| | Please respond to jboss-user|
| | |
|--------+-------------------------------------->
>---------------------------------------------------------------------------
--------------------------------|
|
|
| To: <[EMAIL PROTECTED]>
|
| cc:
|
| Subject: [JBoss-user] Design question - Singleton
|
>---------------------------------------------------------------------------
--------------------------------|
Hi all,
I have a session bean, which number of instance should be limited to 1
(Singleton). How can i implement this with ejb?
--hermann
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user