geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r672274 - in /geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main: java/org/apache/geronimo/console/databasemanager/wizard/ resources/ webapp/WEB-INF/view/dbwizard/
Date Fri, 27 Jun 2008 14:00:43 GMT
Author: linsun
Date: Fri Jun 27 07:00:42 2008
New Revision: 672274

URL: http://svn.apache.org/viewvc?rev=672274&view=rev
Log:
GERONIMO-3503 DBPool wizzard creates plans only for local-transactions - Patch from Manu George
- thanks!

Modified:
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/systemdatabase.properties
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/basicParams.jsp
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/confirmURL.jsp
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/downloadStatus.jsp
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDownload.jsp
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/showPlan.jsp
    geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/testConnection.jsp

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Fri Jun 27 07:00:42 2008
@@ -173,6 +173,9 @@
     private static final String USAGE_MODE = "usage";
     private static final String IMPORT_EDIT_MODE = "importEdit";
     private static final String MODE_KEY = "mode";
+    private static final String LOCAL = "LOCAL";
+    private static final String XA = "XA";
+    private static final String NONE = "NONE";
 
     private PortletRequestDispatcher listView;
     private PortletRequestDispatcher editView;
@@ -1017,7 +1020,14 @@
                     }
                 }
                 ConnectionManager manager = instance.getConnectionManager();
-                manager.setTransactionLocal(true);
+                if(XA.equals(data.transactionType)){
+                    manager.setTransactionXA(true);
+                } else if (NONE.equals(data.transactionType)){
+                    manager.setTransactionNone(true);
+                } else {
+                    manager.setTransactionLocal(true);
+                }
+
                 SinglePool pool = new SinglePool();
                 manager.setPoolSingle(pool);
                 pool.setMatchOne(true);
@@ -1298,6 +1308,7 @@
         private String adapterDisplayName;
         private String adapterDescription;
         private String rarPath;
+        private String transactionType;
         private String importSource;
         private Map<String, String> abstractNameMap; // generated as needed, don't
need to read/write it
         private String deployError;
@@ -1346,6 +1357,14 @@
             if (rarPath != null && rarPath.equals("")) rarPath = null;
             importSource = request.getParameter("importSource");
             if (importSource != null && importSource.equals("")) importSource = null;
+            transactionType = request.getParameter("transactionType");
+            if (transactionType != null && "".equals(transactionType)) {
+                if(dbtype.endsWith("XA")){
+                    transactionType = XA;
+                } else {
+                    transactionType = LOCAL;
+                }
+            }
             Map map = request.getParameterMap();
             propertyNames = new HashMap<String, String>();
             for (Object o : map.keySet()) {
@@ -1417,6 +1436,7 @@
             if (adapterDescription != null) response.setRenderParameter("adapterDescription",
adapterDescription);
             if (importSource != null) response.setRenderParameter("importSource", importSource);
             if (rarPath != null) response.setRenderParameter("rarPath", rarPath);
+            if (transactionType != null) response.setRenderParameter("transactionType", transactionType);
             for (Map.Entry<String, Object> entry : urlProperties.entrySet()) {
                 if (entry.getValue() != null) {
                     response.setRenderParameter(entry.getKey(), entry.getValue().toString());
@@ -1531,6 +1551,15 @@
         public String getDeployError() {
             return deployError;
         }
+        
+        public String getTransactionType() {
+            return transactionType;
+        }
+
+        public void setTransactionType(String transactionType) {
+            this.transactionType = transactionType;
+        }
+        
     }
 
     public static class ConnectionPool implements Serializable, Comparable {

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/systemdatabase.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/systemdatabase.properties?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/systemdatabase.properties
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/resources/systemdatabase.properties
Fri Jun 27 07:00:42 2008
@@ -65,6 +65,8 @@
 dbwizard.common.state                            = State
 dbwizard.common.testConnection                   = Test Connection
 dbwizard.common.usingPoolWizard                  = Using the Geronimo database pool wizard
+dbwizard.common.transactionType                  = Transaction Type
+dbwizard.common.driverTransactionTypes           = Type of transactions that this connection
pool supports.
 dbwizard.confirmURL.blockingTimeoutExp           = The length of time a caller will wait
for a connection.  Leave blank for default.
 dbwizard.confirmURL.driverStatus                 = Driver Status
 dbwizard.confirmURL.idleTimeoutExp               = How long a connection can be idle before
being closed.  Leave blank for default.

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/basicParams.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/basicParams.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/basicParams.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/basicParams.jsp
Fri Jun 27 07:00:42 2008
@@ -55,6 +55,7 @@
     <input type="hidden" name="adapterDisplayName" value="${pool.adapterDisplayName}"
/>
     <input type="hidden" name="adapterDescription" value="${pool.adapterDescription}"
/>
     <input type="hidden" name="rarPath" value="${pool.rarPath}" />
+    <input type="hidden" name="transactionType" value="${pool.transactionType}" />
   <c:forEach var="prop" items="${pool.properties}">
     <input type="hidden" name="${prop.key}" value="${prop.value}" />
   </c:forEach>

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/confirmURL.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/confirmURL.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/confirmURL.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/confirmURL.jsp
Fri Jun 27 07:00:42 2008
@@ -109,6 +109,22 @@
       <tr>
         <th colspan="2"><fmt:message key="dbwizard.common.connectionPoolParameters"/></th>
       </tr>
+    <!-- ENTRY FIELD: TRANSACTION TYPE -->
+      <tr>
+        <th><div align="right"><fmt:message key="dbwizard.common.transactionType"/>:</div></th>
+        <td>
+          <select name="transactionType">
+            <option <c:if test="${'LOCAL' == pool.transactionType}">selected</c:if>>LOCAL</option>
      
+            <option <c:if test="${'XA' == pool.transactionType}">selected</c:if>>XA</option>
      
+            <option <c:if test="${'NONE' == pool.transactionType}">selected</c:if>>NONE</option>
      
+          </select>
+        </td>
+      </tr>
+      <tr>
+        <td></td>
+        <td><fmt:message key="dbwizard.common.driverTransactionTypes"/></td>
+      </tr>
+      
     <!-- ENTRY FIELD: Min Size -->
       <tr>
         <th><div align="right"><fmt:message key="dbwizard.common.poolMinSize"/>:</div></th>

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/downloadStatus.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/downloadStatus.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/downloadStatus.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/downloadStatus.jsp
Fri Jun 27 07:00:42 2008
@@ -44,6 +44,7 @@
     <input type="hidden" name="adapterDisplayName" value="${pool.adapterDisplayName}"
/>
     <input type="hidden" name="adapterDescription" value="${pool.adapterDescription}"
/>
     <input type="hidden" name="rarPath" value="${pool.rarPath}" />
+    <input type="hidden" name="transactionType" value="${pool.transactionType}" />
   <c:forEach var="prop" items="${pool.properties}">
     <input type="hidden" name="${prop.key}" value="${prop.value}" />
   </c:forEach>

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/edit.jsp
Fri Jun 27 07:00:42 2008
@@ -319,6 +319,23 @@
       <tr>
         <th colspan="2"><fmt:message key="dbwizard.common.connectionPoolParameters"/></th>
       </tr>
+     <c:if test="${pool.transactionType != null}"> 
+       <!-- ENTRY FIELD: TRANSACTION TYPE -->
+        <tr>
+          <th><div align="right"><fmt:message key="dbwizard.common.transactionType"/>:</div></th>
+          <td>
+            <select name="transactionType">
+              <option <c:if test="${'LOCAL' == pool.transactionType}">selected</c:if>>LOCAL</option>
      
+              <option <c:if test="${'XA' == pool.transactionType}">selected</c:if>>XA</option>
      
+              <option <c:if test="${'NONE' == pool.transactionType}">selected</c:if>>NONE</option>
      
+            </select>
+          </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td><fmt:message key="dbwizard.common.driverTransactionTypes"/></td>
+        </tr>
+      </c:if>
     <!-- ENTRY FIELD: Min Size -->
       <tr>
         <th><div align="right"><fmt:message key="dbwizard.common.poolMinSize"/>:</div></th>

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDatabase.jsp
Fri Jun 27 07:00:42 2008
@@ -54,6 +54,7 @@
     <input type="hidden" name="adapterDisplayName" value="${pool.adapterDisplayName}"
/>
     <input type="hidden" name="adapterDescription" value="${pool.adapterDescription}"
/>
     <input type="hidden" name="rarPath" value="${pool.rarPath}" />
+    <input type="hidden" name="transactionType" value="${pool.transactionType}" />
   <c:forEach var="prop" items="${pool.properties}">
     <input type="hidden" name="${prop.key}" value="${prop.value}" />
   </c:forEach>

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDownload.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDownload.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDownload.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/selectDownload.jsp
Fri Jun 27 07:00:42 2008
@@ -45,6 +45,7 @@
     <input type="hidden" name="adapterDisplayName" value="${pool.adapterDisplayName}"
/>
     <input type="hidden" name="adapterDescription" value="${pool.adapterDescription}"
/>
     <input type="hidden" name="rarPath" value="${pool.rarPath}" />
+    <input type="hidden" name="transactionType" value="${pool.transactionType}" />
   <c:forEach var="prop" items="${pool.properties}">
     <input type="hidden" name="${prop.key}" value="${prop.value}" />
   </c:forEach>

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/showPlan.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/showPlan.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/showPlan.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/showPlan.jsp
Fri Jun 27 07:00:42 2008
@@ -42,6 +42,7 @@
     <input type="hidden" name="adapterDisplayName" value="${pool.adapterDisplayName}"
/>
     <input type="hidden" name="adapterDescription" value="${pool.adapterDescription}"
/>
     <input type="hidden" name="rarPath" value="${pool.rarPath}" />
+    <input type="hidden" name="transactionType" value="${pool.transactionType}" />
   <c:forEach var="prop" items="${pool.properties}">
     <input type="hidden" name="${prop.key}" value="${prop.value}" />
   </c:forEach>

Modified: geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/testConnection.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/testConnection.jsp?rev=672274&r1=672273&r2=672274&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/testConnection.jsp
(original)
+++ geronimo/server/trunk/plugins/system-database/sysdb-portlets/src/main/webapp/WEB-INF/view/dbwizard/testConnection.jsp
Fri Jun 27 07:00:42 2008
@@ -42,6 +42,7 @@
     <input type="hidden" name="adapterDisplayName" value="${pool.adapterDisplayName}"
/>
     <input type="hidden" name="adapterDescription" value="${pool.adapterDescription}"
/>
     <input type="hidden" name="rarPath" value="${pool.rarPath}" />
+    <input type="hidden" name="transactionType" value="${pool.transactionType}" />
   <c:forEach var="prop" items="${pool.properties}">
     <input type="hidden" name="${prop.key}" value="${prop.value}" />
   </c:forEach>



Mime
View raw message