Hi - I've a question about the legality of using a class's default
constructor to perform some initialisation. This is best explained by
example. I have an abstract Session Bean called "Adaptor" it's main task is
to call the "startup" method within subclassed "real" Session Beans:
public abstract class Adaptor implements SessionBean
{
public void ejbCreate()
throws RemoteException
{
startup();
}
// Rest of SessionBean and Remote interfaces cut out for brevity
protected abstract void startup() ;
}
Example "real" session bean that can be instantiated by an EJB client:
public class OrderTask extends Adaptor
{
Object someObject;
public OrderTask()
{
someObject = new ..... ;
}
protected void startup()
{
someObject.doSomething();
}
}
In this example, the default constructor for OrderTask() initialises/creates
someObject and the startup() method - called indirectly by the default EJB
constructor - "ejbCreate()" does something with it.
Is this acceptable/legal ?
Thanks in advance.
Nick Rumble
The statements and opinions expressed here are my own and may not represent those of
the company.
This e-mail is subject to copyright and the information in it is confidential. It is
intended only for the named recipient. You are advised not to disclose the contents of
this e-mail to another pers
on or take copies of it.
===========================================================================
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".