User: rinkrank
  Date: 02/07/11 07:42:30

  Modified:    modules/bea/src/xdoclet/modules/bea/wls/ejb
                        WebLogicSubTask.java
                        WeblogicRelationTagsHandler.java
  Log:
  Fixed bug [ 579939 ] weblogic.pool forces both atts to be set
  Small WebLogic improvements
  
  Revision  Changes    Path
  1.9       +12 -1     
xdoclet/modules/bea/src/xdoclet/modules/bea/wls/ejb/WebLogicSubTask.java
  
  Index: WebLogicSubTask.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/bea/src/xdoclet/modules/bea/wls/ejb/WebLogicSubTask.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- WebLogicSubTask.java      23 Jun 2002 19:18:37 -0000      1.8
  +++ WebLogicSubTask.java      11 Jul 2002 14:42:30 -0000      1.9
  @@ -18,7 +18,7 @@
    * @author        <a href="mailto:[EMAIL PROTECTED]";>Jerome Bernard</a>
    * @created       Sept 11, 2001
    * @ant.element   display-name="WebLogic Server" name="weblogic" 
parent="xdoclet.modules.ejb.EjbDocletTask"
  - * @version       $Revision: 1.8 $
  + * @version       $Revision: 1.9 $
    */
   public class WebLogicSubTask extends AbstractEjbDeploymentDescriptorSubTask
   {
  @@ -75,6 +75,7 @@
       private String  version = Version.VERSION_6_1;
   
       private String  dataSource = "";
  +    private String  poolName = "";
   
       private boolean createTables = false;
       private String  persistence = DEFAULT_PERSISTENCE;
  @@ -91,6 +92,11 @@
           return dataSource;
       }
   
  +    public String getPoolname()
  +    {
  +        return poolName;
  +    }
  +
       /**
        * Gets the Version attribute of the WebLogicSubTask object
        *
  @@ -119,6 +125,11 @@
       public String getValidateDbSchemaWith()
       {
           return validateDbSchemaWith;
  +    }
  +
  +    public void setPoolname(String s)
  +    {
  +        poolName = s;
       }
   
       /**
  
  
  
  1.6       +33 -32    
xdoclet/modules/bea/src/xdoclet/modules/bea/wls/ejb/WeblogicRelationTagsHandler.java
  
  Index: WeblogicRelationTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/bea/src/xdoclet/modules/bea/wls/ejb/WeblogicRelationTagsHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- WeblogicRelationTagsHandler.java  5 Jul 2002 17:19:59 -0000       1.5
  +++ WeblogicRelationTagsHandler.java  11 Jul 2002 14:42:30 -0000      1.6
  @@ -17,7 +17,7 @@
    * @author               <a href="mailto:[EMAIL PROTECTED]";>Aslak 
Helles�y</a>
    * @created              12 mei 2002
    * @xdoclet.taghandler   namespace="WlEjbRel"
  - * @version              $Revision: 1.5 $
  + * @version              $Revision: 1.6 $
    */
   public class WeblogicRelationTagsHandler extends RelationTagsHandler
   {
  @@ -29,16 +29,35 @@
        * Describe what the method does
        *
        * @param template              Describe what the parameter does
  +     * @param left
        * @exception XDocletException  Describe the exception
        */
  -    public void forAllLeftColumnMaps(String template) throws XDocletException
  +    public void forAllColumnMaps(String template, boolean left) throws 
XDocletException
       {
  -        if (currentRelation.getLeftMethod() != null) {
  +        XMethod methodA;
  +        XMethod methodB;
  +        XClass classA;
  +        XClass classB;
  +
  +        if (left) {
  +            methodA = currentRelation.getLeftMethod();
  +            methodB = currentRelation.getRightMethod();
  +            classA = currentRelation.getLeft();
  +            classB = currentRelation.getRight();
  +        }
  +        else {
  +            methodA = currentRelation.getRightMethod();
  +            methodB = currentRelation.getLeftMethod();
  +            classA = currentRelation.getRight();
  +            classB = currentRelation.getLeft();
  +        }
  +
  +        if (methodA != null) {
               // bidirectional
  -            columnMapTags = 
currentRelation.getLeftMethod().getDoc().getTags("weblogic:column-map");
  -            pkClass = currentRelation.getRight();
  +            columnMapTags = methodA.getDoc().getTags("weblogic:column-map");
  +            pkClass = classB;
               if (pkClass == null) {
  -                pkClass = 
EjbTagsHandler.getEjb(currentRelation.getLeftMethod().getDoc().getTagAttributeValue("ejb.relation",
 "target-ejb"));
  +                pkClass = 
EjbTagsHandler.getEjb(methodA.getDoc().getTagAttributeValue("ejb.relation", 
"target-ejb"));
               }
               if (columnMapTags.length == 0) {
                   //throw new XDocletException( 
currentRelation.getRightMethod().name() + " should have at least one 
@weblogic:column-map tag (B)" );
  @@ -46,8 +65,8 @@
           }
           else {
               // unidirectional
  -            columnMapTags = 
currentRelation.getRightMethod().getDoc().getTags("weblogic:target-column-map");
  -            pkClass = currentRelation.getRight();
  +            columnMapTags = methodB.getDoc().getTags("weblogic:target-column-map");
  +            pkClass = classB;
               if (columnMapTags.length == 0) {
                   //throw new XDocletException( 
currentRelation.getLeftMethod().name() + " should have at least one 
@weblogic:target-column-map tag (C)" );
               }
  @@ -59,6 +78,11 @@
           }
       }
   
  +    public void forAllLeftColumnMaps(String template) throws XDocletException
  +    {
  +        forAllColumnMaps(template, true);
  +    }
  +
       /**
        * Describe what the method does
        *
  @@ -67,30 +91,7 @@
        */
       public void forAllRightColumnMaps(String template) throws XDocletException
       {
  -        if (currentRelation.getRightMethod() != null) {
  -            // bidirectional
  -            columnMapTags = 
currentRelation.getRightMethod().getDoc().getTags("weblogic:column-map");
  -            pkClass = currentRelation.getLeft();
  -            if (pkClass == null) {
  -                pkClass = 
EjbTagsHandler.getEjb(currentRelation.getRightMethod().getDoc().getTagAttributeValue("ejb.relation",
 "target-ejb"));
  -            }
  -            if (columnMapTags.length == 0) {
  -                //throw new XDocletException( 
currentRelation.getRightMethod().name() + " should have at least one 
@weblogic:column-map tag (B)" );
  -            }
  -        }
  -        else {
  -            // unidirectional
  -            columnMapTags = 
currentRelation.getLeftMethod().getDoc().getTags("weblogic:target-column-map");
  -            pkClass = currentRelation.getLeft();
  -            if (columnMapTags.length == 0) {
  -                //throw new XDocletException( 
currentRelation.getLeftMethod().name() + " should have at least one 
@weblogic:target-column-map tag (C)" );
  -            }
  -        }
  -
  -        for (int i = 0; i < columnMapTags.length; i++) {
  -            currentTagIndex = i;
  -            generate(template);
  -        }
  +        forAllColumnMaps(template, false);
       }
   
       /**
  
  
  


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
PC Mods, Computing goodies, cases & more
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to