Thanks David,

I'll try this. I'm still interested in your idea about using DOM to pass
the openejb.xml file. Is there any API to initialize OpenEJB that
accepts a DOM, InputStream, URL, etc?

Thanks
-Vincent

> -----Original Message-----
> From: David Blevins [mailto:[EMAIL PROTECTED]
> Sent: 24 May 2004 21:47
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [openejb-user] Re: [openejb-dev] RE: [openejb-user] Java API
to
> configure openEJB?
> 
> On Mon, May 24, 2004 at 08:42:01PM +0200, Vincent Massol wrote:
> >
> > I think a nice strategy for any Java embeddable
application/framework is
> > to always offer a Java API for everything. Then as a second layer,
> > offering a XML configuration file or other configuration front is
always
> > nice for end user usability. However, the java API is really useful
when
> > it comes to embedding/reusing.
> >
> > This is really what I love in Jetty. It's 100% java and the XML
> > configuration file is only a byproduct. It really makes it
embeddable.
> >
> > >From what I've read here and there, one important feature of
openEJB is
> > its embeddability. Thus having a 100% java API makes sense to me.
> >
> > Anyway, that's just some user feedback, take it with a pinch of salt
:-)
> 
> It's good feedback, Vincent.  You're not the first person to ask for
> 100% java API for configuration, just the first person to ask for it
> in the exact way you've described it.
> 
> OpenEJB has had a 100% java API for configuration since day one.
> 
>  API 1 -- http://www.openejb.org/design_assembler.html (total control)
>  API 2 -- http://www.openejb.org/design_configfactory.html (some
control)
> 
> Apple Computer, for example, has been using API 2 in WebObjects for
> about three years now with their embedded OpenEJB.
> 
> This is from the JavaDoc of API 2:
> 
>     Other OpenEjbConfigurationFactory implementations can be created
>     that might populate this object using a different approach. Other
>     usefull implementations might be:
> 
>         * Populating the OpenEjbConfiguration from values in a RDBMS.
>         * Populating the OpenEjbConfiguration from values in a
>           Properties file.
>         * Retrieving the OpenEjbConfiguration from a ODBMS.
>         * Creating the OpenEjbConfiguration using a JavaBeans enabled
>           editing tool or wizard.
> 
> There are two implementations of OpenEjbConfigurationFactory (API 2).
> 
> If the existing implementations aren't exactly what you want, you are
> certainly welcome to create one to your taste and take as much code as
> you want from the two existing implemtations.
> 
> We are also more than happy to check it in and offer it to other
users.
> 
> -David

Reply via email to