ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40475] New: - [PATCH] Eliminate hardcoded database vendor type enumeration in WebSphereDeploymentTool.java
Date Mon, 11 Sep 2006 22:12:26 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40475>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40475

           Summary: [PATCH] Eliminate hardcoded database vendor type
                    enumeration in WebSphereDeploymentTool.java
           Product: Ant
           Version: 1.7.0Beta1
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P3
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: mark_depalma@yahoo.com


The dbVendor field of WebSphereDeploymentTool is currently assigned via a setter
function that takes a member of an enumeration as a parameter.  The problem is
that the enumeration is currently out of date and does not include the latest
codes in WAS 5.1 let alone WAS 6, which eliminates the possibility of database
specific deployment.  Since this is the kind of thing that IBM changes with each
WAS release, I recommend eliminating the enumeration and passing in a String
instead.  If necessary, users can easily determine the available database type
codes by running EJBDeploy -help from the command line.  I've included diff -u
output below that resolves the problem in my environment.

Mark

--- WebsphereDeploymentTool.java	2006-09-11 17:19:58.421875000 -0400
+++ WebsphereDeploymentTool-new.java	2006-09-11 15:13:36.750000000 -0400
@@ -59,19 +59,6 @@
  *
  */
 public class WebsphereDeploymentTool extends GenericDeploymentTool {
-    /**
-     * Enumerated attribute with the values for the database vendor types
-     *
-     */
-    public static class DBVendor extends EnumeratedAttribute {
-        public String[] getValues() {
-            return new String[]{
-                "SQL92", "SQL99", "DB2UDBWIN_V71", "DB2UDBOS390_V6",
"DB2UDBAS400_V4R5",
-                "ORACLE_V8", "INFORMIX_V92", "SYBASE_V1192", "MSSQLSERVER_V7",
"MYSQL_V323"
-                };
-        }
-    }
-
 
     public static final String PUBLICID_EJB11
          = "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN";
@@ -160,18 +147,18 @@
 
 
     /** Sets the DB Vendor for the Entity Bean mapping ; optional.
-     * Valid options are for example:
-     * <ul>
-     * <li>SQL92</li> <li>SQL99</li> <li>DB2UDBWIN_V71</li>
-     * <li>DB2UDBOS390_V6</li> <li>DB2UDBAS400_V4R5</li> <li>ORACLE_V8</li>
-     * <li>INFORMIX_V92</li> <li>SYBASE_V1192</li> <li>MYSQL_V323</li>
-     * </ul>
+     * Valid options can be obtained by running the following command:
+     *
+     * <WAS_HOME>/bin/EJBDeploy.[sh/bat] -help:
+     *
      * This is also used to determine the name of the Map.mapxmi and
-     * Schema.dbxmi files, for example Account-DB2UDBWIN_V71-Map.mapxmi
-     * and Account-DB2UDBWIN_V71-Schema.dbxmi.
+     * Schema.dbxmi files, for example Account-DB2UDB_V81-Map.mapxmi
+     * and Account-DB2UDB_V81-Schema.dbxmi.
+     *
+     * @param dbVendor database vendor type
      */
-    public void setDbvendor(DBVendor dbvendor) {
-        this.dbVendor = dbvendor.getValue();
+    public void setDbvendor(String dbvendor) {
+        this.dbVendor = dbvendor;
     }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message