Hi Jim,
For my current project I've implemented ant codegeneration for

  1. Generate actionscript pojos from java pojos
  2. Generate client-side actionscript business delegate from that same interface (for cairngorm framework)
I cannot share the code since it is project specific but I can share the idea. The implementation itself is very easy if you are familiar with Java.

I'm using XDoclet2 as a generating tool. The templates are written in Velocity but they are very simple. To determine which classes to generate I'm using IValueObject empty interface. I do not use EJB I use Spring with Hibernate and thus I generate delegates for my Java services that are placed in a Spring context.  I have a convention that all my service interfaces called  I<SomeName>Manager and I convert them to the <SomeName>Delegate with the same package. That is all.

If you know exactly what you need to generate it will take you a couple of days to get introduced into XDoclet and create your tool. Good luck.

Regards,
Mykola

 



On 11/20/05, Jim Schneider <[EMAIL PROTECTED]> wrote:

I'm looking to automatically generate actionscript pojos  from java pojos (ejb3 annotations) using Ant. I saw the AS2vogenerator, but it was my understanding that was done in an IDE and was dependent on hbm files. Maybe I misunderstand the capabilities.

 

On a related note, has anyone been able to generate DDL using the hibernate-tools ant task without having to list out all of the annotated classes in the hibernate.cfg.xml file? Seems like there should be a way to "pass in" the class files to the annotationconfiguration ant element, but after searching for a couple hours, I didn't see that this was supported. Ideally, this should read from a "par" file and not really need the cfg.xml file (except for database dialect).

 

While I'm asking for everything, does anyone else have some useful code generation tools (using ant) that they can share? Specifically, from an ejb3 annotated set of pojos, and a business service interface (ejb3 stateless session interface), I would like to:

 

  1. Generate DDL for any given database dialect
  2. Generate actionscript pojos from java pojos
  3. Generate server-side java business delegate (remote object) from a business service  interface (ejb3 stateless session interface)
  4. Generate client-side actionscript business delegate from that same interface (for cairngorm framework)

 

Again, I want to do this all from ant, not from an IDE. Maybe these are just a set of velocity templates? Any examples of these (and how to invoke in ant) would be great as I'd rather not have to learn the velocity template language (yet!).

 

Thanks,

 

Jim

 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
Best Regards,
Mykola

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to