avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject Re: Avalon and J2EE : Best practices
Date Sun, 11 Nov 2001 01:15:48 GMT


----- Original Message -----
From: "Peter Donald" <donaldp@apache.org>
To: "Avalon Developers List" <avalon-dev@jakarta.apache.org>
Sent: Sunday, November 11, 2001 1:07 AM
Subject: Re: Avalon and J2EE : Best practices


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

I probably used the wrong word as I meant instance variable (I used class
variable to mean the same but I did not imagine them static). We agree here.

>
> > * 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 ?
>

2 things here :
- it depends on the application server and I can tell you it is very far
from being true. Most application server have a very basic read-only JNDI
tree (not persistent), so I you wish to save parameters in JNDI you have to
install a separate LDAP server.
- I would like to have the same configuration mechanism for all my classes
whether they are avalon components or EJB. It doesn't mean that the
configuration component will not retrieve its configuration parameters from
JNDI

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

good ... do you plan to use avalon with j2ee ?

cheers,
-Vincent

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


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