Hi folks, Since I discovered some problems with the generation of weblogic specific xml descriptors for cmp and cmr as defined in ejb 2.0 with Xdoclet 1.1.2, I have changed some code to solve it. Appended to this email you find the following changed files: - weblogic-cmp-rdbms-jar-xml.j - WeblogicRelationTagsHandler.java For detailed info see below:
1. Changes in WeblogicRelationTagsHandler The following methods have been added: public void ifHasLeftColumnMaps( String template) throws XDocletException; public void ifHasRightColumnMaps( String template) throws XDocletException; The following methods have been changed: public void forAllLeftColumnMaps( String template ) throws XDocletException; public void forAllRightColumnMaps( String template ) throws XDocletException; 2. Changes in weblogic-cmp-rdbms-jar-xml.j The original file was (in my opinion) a little bit too complex and can be stripped down to my suggestion. To make it complete I added the tags 'ifHasLeftColumnMaps' and 'ifHasRightColumnMaps' to decide whether a relation role should be included into the xml descriptor. I have successfully testet all kinds of relations that are specified in ejb 2.0 with this code. Also the bug that the file read order was relevant in the old code has been tested and does not appear anymore (On some OSs the file order when reading a directory is defined by name, on others the order is defined by creation or modification date). Additionally also the problems with unidirectional many-to-one relations are solved. The constraints for unidirectional one-to-one relations as described in my mail (<[EMAIL PROTECTED]>, 'WebLogic-Subtask: Are there two ways to declare a unidirectional one-to-one relation?') has been removed. For this I have extended the usage of the target-column-map tag. Now this tag can be used not only in unidirectional many-to-many relations but also in unidirectional one-to-one relations, in order to set the location of the foreign key also to the second table. If you find theses changes usefull, I would appreciate if you include them or a compatible version into your project. If you decide that my changes are against your system design principles and requirements I would like to hear about it also, since I included this patch already into our project, which sould not be based on a custom changed XDoclet implementation for a long time. Regards, Michael.
WeblogicRelationTags#3D49F.java
Description: Binary data
weblogic-cmp-rdbms-jar-xml.j
Description: Binary data
