I have created a freely available Javadoc plugin (called EJBDoclet) that
can be used to
generate EJB-related classes and files. The only thing you need to
create manually is the source for the bean itself. By adding special
tags to the Javadoc documentation of the source file you allow the
EJBDoclet to generate all
the other files for you.
These are the files that are created for you:
* Remote interface
* Home interface
* Primary key class (EntityBeans only)
* Entity CMP layer (CMP EntityBeans only)
* Data object class (CMP EntityBeans only)
* ejb-jar.xml for the entire application (including ejb-references
between beans, resource references, environment entries, transactional
attributes, etc.)
BMP EntityBeans are currently not supported. The Entity CMP support
encourages you to use the EJB 2.0 bean style (i.e. with abstract get/set
methods for CMP-fields), and will generate a CMP layer to make it
compatible with EJB 1.1 servers.
The package comes with installation notes, descriptions of the new tags,
and a complete example (the AccountBean from the "jbosstest" module, see
jboss.org for details).
For reference, this tool generated approximately 70% of the code for the
bundled AccountBean example.
The EJBDoclet can of course be used with the Ant build tool (see
jakarta.apache.org for details) to automatically
generate the files before normal compilation. This makes creating EJB's
very hassle-free.
The doclet uses separate plain-text Java code templates so that you
easily can change what the generated code looks (like include your own
copyright statements or similar).
Full source included. Uses GPL license.
If you have any suggestions for more tags or comments on the generated
source, let me know.
Download now from:
http://dreambean.com/ejbdoclet.html
Enjoy! :-)
regards,
Rickard
ps. This has only been tested with the beans in the "jbosstest" module
(see jBoss CVS repository at jboss.org), so
there might be some restrictions (let me know and I'll fix it!). BMP
EntityBeans are not supported right
now for example. Overall, it should be rather useful however.
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".