hi people,

what do you think about merge points in andromda templates ? similar to the ones in xdoclet
I am using them in a customized EJB cartridge based on the one that is bundled with andromda,
I use the merge points to insert specific EJB QL queries that will greatly improve and simplify
the calls in the service methods


of course, merge points can be interesting in any cartridge, for example: in bpm4struts you can
use them to insert custom plugins in the struts-config.xml, or even to define a java class header
to be used by CVS ... anything is possible


I think this would be neat because the end user would not need to open up the cartridge, he
can just hook into the callbacks wih custom files


that way we will reduce the amount of cartridge variants out there... (I have one for each project)

the replacements can easily be done with the Ant <replace> tag


bye Wouter.

PS: for people not familiar with merge points, it's like this:

if your template is designed for an entity bean you could have something like this in there:

// custom-finders-${class.name}.vtl

somewhere between the class-level ejbdoclet aspects, suppose your bean is called 'Task'
you could do the following after running andromda


<loadfile property="custom.finders.task" srcFile="${merge.path}/custom-finders-Task.vtl"/>
<replace file="${destination.ejb.path}/com/pany/business/task/TaskBean.java" token="// custom-finders-Task.vtl" value="${custom.finders.task}"/>






-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to