> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
> Stevens
> Sent: 26 March 2002 13:43
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-user] non bmp dao subtask
>
>
> >FROM: Matt Goodall
> >DATE: 03/26/2002 04:34:00
> >
> >Hi,
> >
> >In the dao subtask documentation it states
> >  "... Currently, only BMP entity beans are supported (support for DAOs
> >with
> >the other EJB types is planned e.g. for accessing a database
> directly with
> >JDBC in a session bean). ..."
> >I would like to use "pseudo BMP", i.e. value objects via a stateless
> >session
> >bean, and that comment sounds like the dao subtask will support
> that in the
> >future. Does anyone know when this "other EJB type" support is coming and
> >what the generated code will look like?
> >
> >Thanks, Matt
>
> Actually, I already did it (it's in 1.1.2) but I forgot to update the
> documentation :-)

Heh, I should have looked at the code.

>
> Just include an @ejb:dao class-level tag in your session bean,
> same as for
> an entity bean, and you'll get a generated DAO with an init
> method and ones
> for your (abstract) @dao:call tagged methods.  The generated session
> sub-class will include implementations for those methods that delegate to
> the DAO.  If you want to do other stuff in your methods as well
> as call the
> DAO, just use a private @dao:call method and call that instead in
> your own
> code.

Just tried it, it works great :).

>
> The only real difference between entity and session beans is that
> for entity
> EJBs it adds extra methods in the DAO for load/store/remove, and
> calls them
> from the appropriate methods in the BMP class, and for session
> beans it only
> has the @dao:call methods (plus init).

Using the dao subtask in a session bean has the other (obvious) difference
that it does not generate any data object classes for you.

Is there a way of creating a concrete value object class from an abstract
definition? I guess I would like something similar to the generated BMP code
but without all the EJB specific bits.

This sounds like a case for a JavaBean task which, given the attributes,
would generate a concrete class containing all the getters and setters,
(optional?) dirty support and hashCode, equals and toString methods. Is
there something like this already? Would this be a useful extension (it's a
common enough thing to do)?

Thanks for your help.
Matt


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to