Kevin Mukhar wrote:

>The classic pattern for the Singleton class uses a read-only static field to
>hold the Singleton reference, ...

I suppose the initial expression for the static field would be like this:

BeanX singleton = ((BeanXHome)javax.rmi.PortableRemoteObject.narrow(
    new InitialContext().lookup(path), BeanXHome.class)).create(parms)

but where would this code would be placed. It's no good inside ejbCreate
as ejbCreate is already running on a new instance rather than the singleton.
So how could you implement the singleton portably?

>I would argue that the restriction against read/write statics applies
>to helper classes.

I agree. CICS treats enterprise beans and their helper classes the same
in this respect.

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