geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r581366 - in /geronimo/plugins: console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/ajax/ console/trunk/console-core/src/main/java/org/apache/geronimo/console/ajax/ console/trunk/console-portal-driver/src/main/weba...
Date Tue, 02 Oct 2007 19:56:00 GMT
Author: pmcmahan
Date: Tue Oct  2 12:55:59 2007
New Revision: 581366

URL: http://svn.apache.org/viewvc?rev=581366&view=rev
Log:
GERONIMO-3413 fix the progress bar in the database wizard driver downloader.  requires adding
another
DWR context forward thru the portal driver

Added:
    geronimo/plugins/console/trunk/console-base-portlets/src/main/java/org/apache/geronimo/console/ajax/
      - copied from r572776, geronimo/plugins/console/trunk/console-core/src/main/java/org/apache/geronimo/console/ajax/
    geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/
      - copied from r580333, geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/ajax/
    geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/view/ajax/
      - copied from r580333, geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/webapp/WEB-INF/view/ajax/
Removed:
    geronimo/plugins/console/trunk/console-core/src/main/java/org/apache/geronimo/console/ajax/
Modified:
    geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/WEB-INF/web.xml
    geronimo/plugins/system-database/trunk/pom.xml
    geronimo/plugins/system-database/trunk/system-database-portlets/pom.xml
    geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressInfo.java
    geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressMonitor.java
    geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/view/ajax/progressbar.jsp
    geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/web.xml

Modified: geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/WEB-INF/web.xml?rev=581366&r1=581365&r2=581366&view=diff
==============================================================================
--- geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/WEB-INF/web.xml (original)
+++ geronimo/plugins/console/trunk/console-portal-driver/src/main/webapp/WEB-INF/web.xml Tue
Oct  2 12:55:59 2007
@@ -53,6 +53,7 @@
     <servlet-class>org.apache.pluto.driver.PortalDriverLogoutServlet</servlet-class>
   </servlet>
 
+  <!-- DWR for the base console portlets -->
   <servlet>
     <display-name>DWR Forward Servlet</display-name>
     <servlet-name>dwr-forward</servlet-name>
@@ -67,6 +68,7 @@
     </init-param>
   </servlet>
 
+  <!-- DWR for the debug views portlets -->
   <servlet>
     <display-name>DWR Forward Servlet 2</display-name>
     <servlet-name>dwr-forward2</servlet-name>
@@ -81,6 +83,21 @@
     </init-param>
   </servlet>
 
+  <!-- DWR for the system database portlets -->
+  <servlet>
+    <display-name>DWR Forward Servlet 3</display-name>
+    <servlet-name>dwr-forward3</servlet-name>
+    <servlet-class>org.apache.geronimo.console.servlet.ContextForwardServlet</servlet-class>
+    <init-param>
+       <param-name>servlet-path</param-name>
+       <param-value>/dwr3</param-value>
+    </init-param>
+    <init-param>
+       <param-name>context-path</param-name>
+       <param-value>/system-database</param-value>
+    </init-param>
+  </servlet>
+
   <servlet>
     <display-name>Generic Context Forward Servlet</display-name>
     <servlet-name>context-forward</servlet-name>
@@ -114,6 +131,11 @@
   </servlet-mapping>
 
   <servlet-mapping>
+    <servlet-name>dwr-forward3</servlet-name>
+    <url-pattern>/dwr3/*</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping>
     <servlet-name>plutoPortalDriver</servlet-name>
     <url-pattern>/portal/*</url-pattern>
   </servlet-mapping>
@@ -173,6 +195,7 @@
       <url-pattern>/forwards/*</url-pattern>
       <url-pattern>/dwr/*</url-pattern>
       <url-pattern>/dwr2/*</url-pattern>
+      <url-pattern>/dwr3/*</url-pattern>
       <http-method>GET</http-method>
       <http-method>POST</http-method>
       <http-method>PUT</http-method>

Modified: geronimo/plugins/system-database/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/system-database/trunk/pom.xml?rev=581366&r1=581365&r2=581366&view=diff
==============================================================================
--- geronimo/plugins/system-database/trunk/pom.xml (original)
+++ geronimo/plugins/system-database/trunk/pom.xml Tue Oct  2 12:55:59 2007
@@ -195,6 +195,12 @@
             </dependency>
 
             <dependency>
+                <groupId>org.directwebremoting</groupId>
+                <artifactId>dwr</artifactId>
+                <version>2.0.1</version>
+            </dependency>
+
+            <dependency>
                 <groupId>org.apache.geronimo.plugins</groupId>
                 <artifactId>console-core</artifactId>
                 <version>${consoleVersion}</version>

Modified: geronimo/plugins/system-database/trunk/system-database-portlets/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/system-database/trunk/system-database-portlets/pom.xml?rev=581366&r1=581365&r2=581366&view=diff
==============================================================================
--- geronimo/plugins/system-database/trunk/system-database-portlets/pom.xml (original)
+++ geronimo/plugins/system-database/trunk/system-database-portlets/pom.xml Tue Oct  2 12:55:59
2007
@@ -81,6 +81,11 @@
             <scope>provided</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.directwebremoting</groupId>
+            <artifactId>dwr</artifactId>
+        </dependency>
+
     </dependencies>
     
   <!-- Build configuration -->

Modified: geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressInfo.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressInfo.java?rev=581366&r1=580333&r2=581366&view=diff
==============================================================================
--- geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressInfo.java
(original)
+++ geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressInfo.java
Tue Oct  2 12:55:59 2007
@@ -17,6 +17,10 @@
 
 package org.apache.geronimo.console.ajax;
 
+import org.directwebremoting.annotations.DataTransferObject;
+import org.directwebremoting.annotations.RemoteProperty;
+
+@DataTransferObject
 public class ProgressInfo
 {
     public static final String PROGRESS_INFO_KEY = "progressinfokey";
@@ -25,6 +29,7 @@
     private String subMessage;
     private boolean finished;
 
+    @RemoteProperty
     public int getProgressPercent() {
 		return progressPercent;
 	}
@@ -33,6 +38,7 @@
 		this.progressPercent = progressPercent;
 	}
 
+        @RemoteProperty
 	public String getMainMessage() {
 		return mainMessage;
 	}
@@ -41,6 +47,7 @@
 		this.mainMessage = mainMessage;
 	}
 
+        @RemoteProperty
 	public String getSubMessage() {
 		return subMessage;
 	}
@@ -49,6 +56,7 @@
 		this.subMessage = subMessage;
 	}
 
+    @RemoteProperty
     public boolean isFinished() {
         return finished;
     }

Modified: geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressMonitor.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressMonitor.java?rev=581366&r1=580333&r2=581366&view=diff
==============================================================================
--- geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressMonitor.java
(original)
+++ geronimo/plugins/system-database/trunk/system-database-portlets/src/main/java/org/apache/geronimo/console/ajax/ProgressMonitor.java
Tue Oct  2 12:55:59 2007
@@ -19,14 +19,18 @@
 
 import javax.servlet.http.HttpSession;
 
-import uk.ltd.getahead.dwr.WebContextFactory;
+import org.directwebremoting.WebContextFactory;
+import org.directwebremoting.annotations.RemoteMethod;
+import org.directwebremoting.annotations.RemoteProxy;
 
 /**
  * Provides information to an AJAX client during server side
  * activities.
  */
+@RemoteProxy
 public class ProgressMonitor
 {
+    @RemoteMethod
     public ProgressInfo getProgressInfo()
     {
         HttpSession session = WebContextFactory.get().getSession(false);

Modified: geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/view/ajax/progressbar.jsp
URL: http://svn.apache.org/viewvc/geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/view/ajax/progressbar.jsp?rev=581366&r1=580333&r2=581366&view=diff
==============================================================================
--- geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/view/ajax/progressbar.jsp
(original)
+++ geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/view/ajax/progressbar.jsp
Tue Oct  2 12:55:59 2007
@@ -16,10 +16,9 @@
 --%>
 <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
 <portlet:defineObjects/>
-<% String dwrForwarderServlet = org.apache.geronimo.console.util.PortletManager.getConsoleFrameworkServletPath(request)
+ "/../dwr"; %>
-<script type='text/javascript' src='<%= dwrForwarderServlet %>/interface/ProgressMonitor.js'></script>
-<script type='text/javascript' src='<%= dwrForwarderServlet %>/engine.js'></script>
-<script type='text/javascript' src='<%= dwrForwarderServlet %>/util.js'></script>
+<script type='text/javascript' src='/console/dwr3/interface/ProgressMonitor.js'></script>
+<script type='text/javascript' src='/console/dwr3/engine.js'></script>
+<script type='text/javascript' src='/console/dwr3/util.js'></script>
 
 <script type="text/javascript">
 DWREngine.setErrorHandler(<portlet:namespace/>onError);

Modified: geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/web.xml?rev=581366&r1=581365&r2=581366&view=diff
==============================================================================
--- geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/plugins/system-database/trunk/system-database-portlets/src/main/webapp/WEB-INF/web.xml
Tue Oct  2 12:55:59 2007
@@ -19,7 +19,23 @@
 -->
 <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5" metadata-complete="true">
     <display-name>system-database</display-name>
-
+    
+    <servlet>
+      <servlet-name>dwr-invoker</servlet-name>
+      <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
+      <init-param>
+        <param-name>classes</param-name>
+        <param-value>
+            org.apache.geronimo.console.ajax.ProgressMonitor,
+            org.apache.geronimo.console.ajax.ProgressInfo
+        </param-value>
+      </init-param>
+      <init-param>
+          <param-name>activeReverseAjaxEnabled</param-name>
+          <param-value>true</param-value>
+      </init-param>
+    </servlet>
+    
     <servlet>
         <display-name>Pluto Wrapper for Internal DB Portlet</display-name>
         <servlet-name>InternalDB</servlet-name>
@@ -71,6 +87,11 @@
     </servlet>
 
     <servlet-mapping>
+        <servlet-name>dwr-invoker</servlet-name>
+        <url-pattern>/dwr3/*</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
         <servlet-name>InternalDB</servlet-name>
         <url-pattern>/PlutoInvoker/InternalDB/*</url-pattern>
     </servlet-mapping>
@@ -98,7 +119,8 @@
     <security-constraint>
         <web-resource-collection>
             <web-resource-name>system-database</web-resource-name>
-            <url-pattern>/</url-pattern>
+            <url-pattern>/PlutoInvoker/*</url-pattern>
+            <url-pattern>/dwr3/*</url-pattern>
             <http-method>GET</http-method>
             <http-method>POST</http-method>
             <http-method>PUT</http-method>
@@ -114,5 +136,22 @@
     <security-role>
         <role-name>admin</role-name>
     </security-role>
-
+    
+    <!--
+    For security reasons requests to the dwr servlet go through
+    the "/console" web-app context. The purpose of dwr-filter is
+    to map the attributes such as pathInfo, requestURI, etc. of
+    the original request into the request that is delivered to
+    the dwr-invoker servlet.  The dwr-invoker servlet uses those
+    attributes to create URLs that it sends back to the client.
+     -->
+    <filter>
+        <filter-name>dwr-filter</filter-name>
+        <filter-class>org.apache.geronimo.console.servlet.ForwardDispatchFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>dwr-filter</filter-name>
+        <servlet-name>dwr-invoker</servlet-name>
+        <dispatcher>FORWARD</dispatcher>
+    </filter-mapping>
 </web-app>



Mime
View raw message