I am using Hibernate (could be any other O/R tool) to provide data persistence for a web application. The Hibernate 'domain' classes are hand-coded to include XDoclet tags for O/R mapping. These classes a represent the DAO (data access objects). I have small number of 'first level' objects (where indepedant PK lookups would be used) and a larger number of second-level objects where access is always via a first-level object.
However, I would like to generate ValueObjects (or DTO's) from the Hibernate classes without having to turn the Hibernate classes into EJB's - an apparant limitation of the current <value-object> sub-task. Can this be done? Does anyone have sample code? Likewise, I would like to generate true EJB's from the Hibernate classes, and it is these generated classes which would use the original DAO Hibernate classes for bean-managed persistence. The main reason for this is to ensure that the data is visible via the usual EJB local/remote interfaces. I cannot find a mechanism to generate the EJB's - all the XDoclet tasks I can find seem to be based on manually creating the EJB first. These EJB's would expose various methods to allow access to the rich data structure implemented by the DAO mechanism. Can this be done? Does anyone have sample code? Would it be better to convert each Hibernate DAO into BOTH an EJB and a Hibernate-managed class? This approach seems complicated due to unkown impact of using Hibernate specific collections and that second-level objects should not be exposed as EJB's and all access controlled by the first-level object. The implementation would then continue to use the Struts XDoclet tags etc to generate more of the web tier from the DAO Hibernate classes. I am relatively new to XDoclet, and not experienced in creating tasks and using xdt (though have used Velocity, so the concepts are familiar). Can anyone make some suggestions? Peter Millington [EMAIL PROTECTED] Public key: www.keyserver.net, keys.uk.pgp.net Any opinions expressed in this email are those of the individual and not representative of any associated company, group or organisation. This email and any files transmitted with it are confidential, also intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete the email and any attached files, and notify your system manager. ------------------------------------------------------- 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/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
