users@jaxb.java.net

Re: Plugin for EJB 3.0 annotations

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 17 Aug 2005 10:48:51 +0200

Hi.

> It would be nice if this add-on would be hosted on java.net. The
> jaxb-commons project seems like an excellent place to host this,
> assuming that Lexi the project owner is OK with it. It makes it easier
> for others to contribute. Lexi, how do you think?

I think we'll need jaxbcommons2 since jaxbcommons is JAXB 1.x based.
However, ejb3 plugin seems to me much more than "commons", it is a
standalone plugin and needs a separate project, I think.

I have already suggested joining ejb3 plugin in hyperjaxb3... Scott, let
me know if that could be an option for you.

> I also wonder if your plugin can automatically infer the necessary EJB3
> annotations from schemas as much as possible. I'm not an EJB expert, so
> I'm not too sure, but for example I'd imagine you need to put @Entity on
> every persistable class. If so, isn't it easier if you just put them on
> all classes, without asking the user to put <ejb3:Entity /> on every
> complex type?

You're absolutely right, Kohsuke. JAXB provides anough information to
understand the field nature (primitive, enum, dom, wildcard, complex,
hetero - my favorite classification), cardinality (single, collection)
and class hierarchy. From this information, plugin can theoretically
generate all the required annotations automatically. I do not think that
making users annotate each and every element is the right way to go.
Plugin should generate default ejb3 annotations automatically and allow
their customizations, if required.

Bye.
/lexi