The best place would be ejbCreate(). You probably
shouldn't place this stuff in the constructor. If
you're using an EJB server like weblogic, the
construction of your object does not imply a client
has instantiated it. Your object could reside in
a pool of objects waiting for a client connection.
Leon
> -----Original Message-----
> From: Subrahmanyam Allamaraju [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 24, 2000 9:55 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Creation of objects in stateful EJB
>
>
> It depends on whether these objects require information from
> the clint.
> If these objects are generic and do not require any arguments from the
> client, you could safely create them in the constructor.
>
> However, a better approach is to (re)initialize such objects in the
> ejbCreate and ejbActivate() methods.
>
> Cheers
>
> Subbu
>
>
> Roger Kjensrud wrote:
> >
> > I have a stateful session bean that uses a couple of java
> objects. I wonder
> > where is the best place to create these, in ejbCreate() or in the
> > constructor? Is there a difference?
> >
> > Any thoughts are appreciated,
> >
> > Roger Kjensrud
> >
> >
> ==============================================================
> =============
> > 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".