Add, please, new feature to @ejb.util annotation ------------------------------------------------
Key: XDT-1647 URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1647 Project: XDoclet Type: New Feature Components: EJB Module Environment: java 1.5, EJB 2.1, xdoclet 1.2.3, IDE -- Intellij IDEA, JBoss 4.0.3, Windows XP Reporter: Anton Nazaruk Assigned to: xdoclet-devel (Use for new issues) Add, please, something like this to @ejb.util annotation: @ejb.util generate = "logical" multiple-usage = "true/false" (default false) This annotation ganerates util object , that cached EJB Home Interface with using Singleton pattern. This works perfect, when you have not need to use your application in two or more database instances: for example, 1) you make one big project using EJB and code generation with XDoclet; 2) you have to use the same application for different customers with their own relation databases, but with the same tables; 3) all application instances must live in one server instance(i am using JBoss 4.0.3), login-config.xml should be configured (I am using DatabaseServerLoginModule) with multiple <application-policy ... tags due to multiple <datasources... tags in XXX-ds.xml. I just make several copies of my ear, rename every one, rename all jndi-names in jboss.xml, jboss-web.xml, rename security domain in jboss-app.xml, etc... (All ear's I made unpacked ) In conclusion, I have singe tree of packages in one EJB.jar file in one XXX.ear. Another ear's just have the same project structure, all xml descriptors, but have no java classes. All Home Interfaces are obtained via COMP_NAME; SO, when I run the first application: https://localhost:8443/Some and works with database "Some" via datasource jndi-name -- everything is good, but Home Interfaces that I use via Util Objects, generated by xdoclet, have alerady cached as interfaces mapped to "Some" database; When I run, for example, https://localhost:8443/Some1 -- the same application, but in database "Some1", and these home interfaces are obtained from cache: if(cachedlocalHome == null) { cacheLocalHome = (XXXHome) lookupHome(...) --- generated code in XXXUtil.java } return cachedLocalHome; You know, that this function lookupHome(...) will not be called, and I will get HomeInterface , mapped to database "Some" but not to "Some1"; Thats why I manually remove static field cachedLocalHome, and if(...) statement from XXXUtil.java. After that I have to compile this classes, save their copies, and include in ANT build tags to change generated by XDoclet Util files with saved ones, alerady compiled Util classes. So the idea is to add this feature "multiple-usage = "true/false" (default false)" to @ejb.util annotation , if true -- implement, please, Util Objects generation without Singleton pattern. Thanks, hope, someone will read this issue. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel