> Or to put it in another way, can 
> an EJB component(any bean) be a Avalon component?

No, since EJBs and Avalon components are bound to different 
contracts.

However, an EJB can *use* Avalon components, and an Avalon component
can use EJBs.

But you can't easily create a hybrid.

(One way is to have an abstract base class that calls its own
initialize(), configure() etc. with parameters that it finds via
JNDI in ejbCreate).

/**
 * Possible, but not recommended.
 */
public class BaseBean {

    public ejbCreate () {
        Configuration config = new InitialContext().lookup
("path/to/config/here");
        Context context = new InitialContext().lookup
("path/to/context/here");
        if (this instanceof Contextualizable) {
            ((Contextualizable) this).contextualize (context);
        }

        ...
        and
        ...
        so
        ...
        on
        ...
    }

}

/LS


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to