avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: Avalon and J2EE : Best practices
Date Sun, 11 Nov 2001 01:07:00 GMT
Hi,

Sounds good but I have a few questions.

On Sun, 11 Nov 2001 05:04, Vincent Massol wrote:
> * In the setEntityContext(), setSessionContext() and
> setMessageDrivenContext() of the EJBs, we will retrieve the
> ComponentManager from the JNDI tree and save it as a class variable of the
> EJB. Similarly, it will be removed in the unsetXXXContext() (or ejbRemove()
> for Session Beans and MessageDriven Beans)

Why use static/class members and not use instance variables. Instance 
variables should work I think and IIRC using static variables will make your 
EJBs non-compliant and can be non-portable if you want to start doing some of 
the more fancy clustering stuff.

> * EJBs that need configuration parameters will implement Configurable. Same
> as for logging, the initialize() method will need to call a Config
> component that returns a Configuration object.

Im not sure this is ideal unless the EJB has large number of configurable 
options. I would hope/think that most containers have a simple graphical 
client where you can put config parameters into JNDI space. Would it be 
better to use that ? If there was large numbers of parameters then probably 
not but if there is only a small number of parameters ?

Anyways I am only just getting into serious EJB work so ... ;)

-- 
Cheers,

Pete

-----------------------------------------------
   "You can't depend on your eyes when your 
   imagination is out of focus." -Mark Twain 
-----------------------------------------------

--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message