Hi,
my generator UML2EJB (see http://uml2ejb.sourceforge.net) generates
XDoclet-attributed bean classes from UML models (as you will possibly
know). I want XDoclet to behave in a special way. To tell you how it
should behave, I need a few more words:
For a session bean, UML2EJB generates a bean class (each time the
generator runs) and a so-called "implementation class" (only once, never
again!). The *Impl class is the one where the programmer should fill in
his/her business logic.
Example:
PersonService (UML class) -> PersonServiceBean (with XDoclet tags) +
PersonServiceImpl (w/o XDoclet tags).
The *Impl class always extends the *Bean class. However, XDoclet does
not know that *Impl exists because it does not contain any @ejb-tags.
Now, what's the deal?
XDoclet writes *Bean as the bean class name into the deployment
descriptor. I want that it writes {0}Impl instead of {0}Bean. That way,
the container would always create an instance of *Impl instead of *Bean.
The advantage is that hand-written code in *Impl.java is always
separated from automatically generated code in *Bean.java so that it
never gets overwritten when you start UML2EJB once again. This is why I
call UML2EJB a "repeatable forward generator". Changes in the model will
be reflected in the generated code without destroying the hand-written
code.
OK, here is my question to the experienced XDoclet users and developers:
* How do I configure XDoclet to do this? (Currently I use a string
replacement task in ant after <ejbdoclet> has finished, but this is only
a work-around.)
Cheers...
Matthias
---
Matthias Bohlen
"Consulting that helps project teams to succeed..."
http://www.mbohlen.de/
-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user