Best PracticesThis document contains best practices when using XDoclet. Note that these are the opinions of the XDoclet team only, so they could be biased. Caching the home interface
Add the
<utilobject cacheHomes="true"/> Examples how to lookup the home interface using the utility object (it will narrow if needed, and uses the COMP name or JNDI name): EmployeeManager employeeManager = EmployeeManagerUtil.getHome().create(); Properties jndiEnvProps = ... ; CompanyHome companyHome = CompanyUtil.getLocalHome(jndiEnvProps); GUID Generator
Need an extremely reliable key generator? Add the
<utilobject includeGUID="true"/> To generate a unique key: String id = SomeBeanUtil.generateGUID(this); Use a dot to seperate namespace and elementTo avoid getting Sun JavaDoc (JDK 1.4) warnings about unknown tags ("warning - @ejb:interface-method is an unknown tag"), replace the : with a . (JavaDoc will ignore these tags). Entity Beans Best Practices
|