incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r946214 - in /sling/trunk/contrib/extensions/gwt: sample/ sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/ sample/src/main/java/org/apache/sling/extensions/gwt/sample/server/ sample/src/main/java/org/apache/sling/extensio...
Date Wed, 19 May 2010 15:17:51 GMT
Author: justin
Date: Wed May 19 15:17:50 2010
New Revision: 946214

URL: http://svn.apache.org/viewvc?rev=946214&view=rev
Log:
SLING-1524 - updating contrib.gwt module to gwt 2.0.3

Added:
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/Note.java
      - copied, changed from r945618, sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Note.java
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesService.java
      - copied, changed from r945618, sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesService.java
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesServiceAsync.java
      - copied, changed from r945618, sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesServiceAsync.java
Removed:
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Note.java
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesService.java
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesServiceAsync.java
Modified:
    sling/trunk/contrib/extensions/gwt/sample/pom.xml
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Notes.java
    sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/server/NotesServiceImpl.java
    sling/trunk/contrib/extensions/gwt/sample/src/main/resources/org/apache/sling/extensions/gwt/sample/Notes.gwt.xml
    sling/trunk/contrib/extensions/gwt/servlet/pom.xml
    sling/trunk/contrib/extensions/gwt/servlet/src/main/java/org/apache/sling/extensions/gwt/user/server/rpc/SlingRemoteServiceServlet.java

Modified: sling/trunk/contrib/extensions/gwt/sample/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample/pom.xml?rev=946214&r1=946213&r2=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/sample/pom.xml (original)
+++ sling/trunk/contrib/extensions/gwt/sample/pom.xml Wed May 19 15:17:50 2010
@@ -7,9 +7,9 @@
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
-    
+
     http://www.apache.org/licenses/LICENSE-2.0
-    
+
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -47,6 +47,10 @@
         <url>http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample</url>
     </scm>
 
+    <properties>
+        <sling.port>8888</sling.port>
+    </properties>
+
     <build>
         <plugins>
             <!-- Apache Felix SCR Plugin: automatically extracts SCR-descriptors
@@ -54,6 +58,17 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
+                <configuration>
+                    <sourceExcludes>**/client/**</sourceExcludes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>**/client/**</exclude>
+                    </excludes>
+                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.felix</groupId>
@@ -62,10 +77,11 @@
                 <configuration>
                     <instructions>
                         <Export-Package>
-                            org.apache.sling.extensions.gwt.sample.*
+                            !*
                         </Export-Package>
+                        <!-- This is necessary to pick up GWT's built-in custom serializers.
 -->
                         <DynamicImport-Package>
-                            com.google.gwt.*
+                            com.google.gwt.user.client.rpc.core.*
                         </DynamicImport-Package>
                         <Sling-Initial-Content>
                             SLING-INF/content
@@ -80,26 +96,22 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.xi8ix</groupId>
-                <artifactId>xi8ix-gwtc</artifactId>
-                <version>1.4.60</version>
-                <configuration>
-                    <modules>
-                        <module>
-                            org.apache.sling.extensions.gwt.sample.Notes
-                        </module>
-                    </modules>
-                    <webappDirectory>target/gwt</webappDirectory>
-                </configuration>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>gwt-maven-plugin</artifactId>
+                <version>1.2</version>
                 <executions>
-                    <!-- Run the gwtc goal during the compile phase -->
                     <execution>
-                        <phase>compile</phase>
                         <goals>
-                            <goal>gwtc</goal>
+                            <goal>compile</goal>
                         </goals>
                     </execution>
                 </executions>
+                <configuration>
+                    <webappDirectory>${project.build.directory}/gwt</webappDirectory>
+                    <runTarget>gwt/demo/index.html</runTarget>
+                    <port>${sling.port}</port>
+                    <noServer>true</noServer>
+                </configuration>
             </plugin>
         </plugins>
     </build>
@@ -110,13 +122,13 @@
             <artifactId>
                 org.apache.sling.extensions.gwt.servlet
             </artifactId>
-            <version>1.4.60-SNAPSHOT</version>
+            <version>2.0.3-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>com.google.gwt</groupId>
             <artifactId>gwt-user</artifactId>
-            <version>1.4.60</version>
+            <version>2.0.3</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
@@ -146,13 +158,5 @@
         </dependency>
     </dependencies>
 
-    <pluginRepositories>
-        <pluginRepository>
-            <id>xi8ix-repository</id>
-            <name>xi8ix Maven2 Repository</name>
-            <url>http://maven.xi8ix.org</url>
-        </pluginRepository>
-    </pluginRepositories>
-
 </project>
 

Modified: sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Notes.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Notes.java?rev=946214&r1=946213&r2=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Notes.java
(original)
+++ sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Notes.java
Wed May 19 15:17:50 2010
@@ -18,13 +18,20 @@
  */
 package org.apache.sling.extensions.gwt.sample.client;
 
+import java.util.ArrayList;
+
+import org.apache.sling.extensions.gwt.sample.service.Note;
+import org.apache.sling.extensions.gwt.sample.service.NotesService;
+import org.apache.sling.extensions.gwt.sample.service.NotesServiceAsync;
+
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.user.client.rpc.ServiceDefTarget;
 import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.ClickListener;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Panel;
@@ -32,9 +39,6 @@ import com.google.gwt.user.client.ui.Roo
 import com.google.gwt.user.client.ui.TextArea;
 import com.google.gwt.user.client.ui.TextBox;
 import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-import java.util.ArrayList;
 
 /**
  * This class is the starting point for the Sling GWT Sample, a GWT client application that
enables the user
@@ -126,21 +130,21 @@ public class Notes implements EntryPoint
 
         Button save = new Button("Save");
         save.setStyleName("button");
-        save.addClickListener(new ClickListener() {
+        save.addClickHandler(new ClickHandler() {
 
-            public void onClick(Widget widget) {
+            public void onClick(ClickEvent event) {
                 if (validateFormInput()) {
                     createNote(inputNoteTitle.getText(), inputNoteText.getText());
                     resetForm();
                 }
+
             }
         });
-
         Button clear = new Button("Clear");
         save.setStyleName("button");
-        clear.addClickListener(new ClickListener() {
+        clear.addClickHandler(new ClickHandler() {
 
-            public void onClick(Widget widget) {
+            public void onClick(ClickEvent event) {
                 resetForm();
             }
         });
@@ -178,26 +182,26 @@ public class Notes implements EntryPoint
         note.setTitle(title);
         note.setText(text);
 
-        service.createNote(note, new AsyncCallback() {
+        service.createNote(note, new AsyncCallback<Note>() {
 
             public void onFailure(Throwable throwable) {
                 Window.alert("Failed to created note: " + throwable.getMessage());
             }
 
-            public void onSuccess(Object o) {
+            public void onSuccess(Note o) {
                 getNotes();
             }
         });
     }
 
     private void deleteNote(String path) {
-        service.deleteNote(path, new AsyncCallback() {
+        service.deleteNote(path, new AsyncCallback<String>() {
 
             public void onFailure(Throwable throwable) {
                 Window.alert("Failed to delete note: " + throwable.getMessage());
             }
 
-            public void onSuccess(Object o) {
+            public void onSuccess(String o) {
                 getNotes();
             }
         });
@@ -207,14 +211,13 @@ public class Notes implements EntryPoint
 
         notesPanel.clear();
 
-        service.getNotes(new AsyncCallback() {
+        service.getNotes(new AsyncCallback<ArrayList<Note>>() {
             public void onFailure(Throwable throwable) {
                 notesPanel.add(new HTML("No notes stored so far."));
                 Window.alert("Could not retrieve notes: " + throwable.getMessage());
             }
 
-            public void onSuccess(Object o) {
-                ArrayList notesList = (ArrayList) o;
+            public void onSuccess(ArrayList<Note> notesList) {
                 for (int i = 0; i < notesList.size(); i++) {
                     final Note note = (Note) notesList.get(i);
 
@@ -229,13 +232,12 @@ public class Notes implements EntryPoint
 
                     final Button delButton = new Button("Delete");
                     delButton.setStyleName("noteControls");
-                    delButton.addClickListener(new ClickListener() {
+                    delButton.addClickHandler(new ClickHandler() {
 
-                        public void onClick(Widget widget) {
+                        public void onClick(ClickEvent event) {
                             deleteNote(note.getPath());
                         }
                     });
-
                     noteEntry.add(noteTitle);
                     noteEntry.add(noteText);
                     noteEntry.add(delButton);

Modified: sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/server/NotesServiceImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/server/NotesServiceImpl.java?rev=946214&r1=946213&r2=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/server/NotesServiceImpl.java
(original)
+++ sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/server/NotesServiceImpl.java
Wed May 19 15:17:50 2010
@@ -18,8 +18,8 @@
  */
 package org.apache.sling.extensions.gwt.sample.server;
 
-import org.apache.sling.extensions.gwt.sample.client.Note;
-import org.apache.sling.extensions.gwt.sample.client.NotesService;
+import org.apache.sling.extensions.gwt.sample.service.Note;
+import org.apache.sling.extensions.gwt.sample.service.NotesService;
 import org.apache.sling.extensions.gwt.user.server.rpc.SlingRemoteServiceServlet;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.osgi.service.component.ComponentContext;
@@ -172,7 +172,7 @@ public class NotesServiceImpl extends Sl
     /**
      * {@inheritDoc}
      */
-    public ArrayList getNotes() {
+    public ArrayList<Note> getNotes() {
 
         final ArrayList<Note> notes = new ArrayList<Note>();
 

Copied: sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/Note.java
(from r945618, sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Note.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/Note.java?p2=sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/Note.java&p1=sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Note.java&r1=945618&r2=946214&rev=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/Note.java
(original)
+++ sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/Note.java
Wed May 19 15:17:50 2010
@@ -16,20 +16,18 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.extensions.gwt.sample.client;
+package org.apache.sling.extensions.gwt.sample.service;
 
-import com.google.gwt.user.client.rpc.IsSerializable;
+import java.io.Serializable;
 
 /**
  * This class represents a serializable POJO of a note taken with the application. The POJO
is produced by the
  * {@link org.apache.sling.extensions.gwt.sample.server.NotesServiceImpl}.
  * <p/>
- * The class must implement GWT's <code>IsSerializable</code> interface to be
serializable as part of the RPC
- * implementation.
  * <p/>
  * The <code>Note</code> class features simple getters and setters for its data.
  */
-public class Note implements IsSerializable {
+public class Note implements Serializable {
 
     /**
      * The String representing the title of the note.

Copied: sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesService.java
(from r945618, sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesService.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesService.java?p2=sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesService.java&p1=sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesService.java&r1=945618&r2=946214&rev=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesService.java
(original)
+++ sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesService.java
Wed May 19 15:17:50 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.extensions.gwt.sample.client;
+package org.apache.sling.extensions.gwt.sample.service;
 
 import com.google.gwt.user.client.rpc.RemoteService;
 
@@ -34,7 +34,6 @@ public interface NotesService extends Re
      *
      * @param note The <code>Note</code> to be created and stored in the repository.
      * @return The <code>String</code> representing the status message of the
successful RPC operation.
-     * @gwt.typeArgs note <org.apache.sling.extensions.gwt.sample.client.Note>
      */
     public String createNote(Note note);
 
@@ -42,9 +41,8 @@ public interface NotesService extends Re
      * This method is called to retrieve an <code>ArrayList</code> of all notes
stored in the repository.
      *
      * @return The <code>ArrayList</code> containing all <code>Note</code>s
stored on the server.
-     * @gwt.typeArgs <org.apache.sling.extensions.gwt.sample.client.Note>
      */
-    public ArrayList getNotes();
+    public ArrayList<Note> getNotes();
 
     /**
      * This method is called to delete a <code>Note</code> from the repository.
To identify the <code>javax.jcr.Node</code>

Copied: sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesServiceAsync.java
(from r945618, sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesServiceAsync.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesServiceAsync.java?p2=sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesServiceAsync.java&p1=sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesServiceAsync.java&r1=945618&r2=946214&rev=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/client/NotesServiceAsync.java
(original)
+++ sling/trunk/contrib/extensions/gwt/sample/src/main/java/org/apache/sling/extensions/gwt/sample/service/NotesServiceAsync.java
Wed May 19 15:17:50 2010
@@ -16,22 +16,24 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.sling.extensions.gwt.sample.client;
+package org.apache.sling.extensions.gwt.sample.service;
+
+import java.util.ArrayList;
 
 import com.google.gwt.user.client.rpc.AsyncCallback;
 
 /**
  * This is the asynchronous service interface as required for GWT RPC operations.
  *
- * @see org.apache.sling.extensions.gwt.sample.client.NotesService
+ * @see org.apache.sling.extensions.gwt.sample.service.NotesService
  * @see org.apache.sling.extensions.gwt.sample.client.Notes
  * @see org.apache.sling.extensions.gwt.sample.server.NotesServiceImpl
  */
 public interface NotesServiceAsync {
 
-    void createNote(Note note, AsyncCallback async);
+    void createNote(Note note, AsyncCallback<Note> async);
 
-    void getNotes(AsyncCallback async);
+    void getNotes(AsyncCallback<ArrayList<Note>> async);
 
-    void deleteNote(String path, AsyncCallback async);
+    void deleteNote(String path, AsyncCallback<String> async);
 }

Modified: sling/trunk/contrib/extensions/gwt/sample/src/main/resources/org/apache/sling/extensions/gwt/sample/Notes.gwt.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/sample/src/main/resources/org/apache/sling/extensions/gwt/sample/Notes.gwt.xml?rev=946214&r1=946213&r2=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/sample/src/main/resources/org/apache/sling/extensions/gwt/sample/Notes.gwt.xml
(original)
+++ sling/trunk/contrib/extensions/gwt/sample/src/main/resources/org/apache/sling/extensions/gwt/sample/Notes.gwt.xml
Wed May 19 15:17:50 2010
@@ -21,6 +21,10 @@
     <!-- Inherit the core Web Toolkit stuff.                  -->
     <inherits name='com.google.gwt.user.User'/>
 
+    <!-- These are necessary in order to separate the RPC classes from the pure client-side
classes. -->
+    <source path="client" />
+    <source path="service" />
+
     <!-- Specify the app entry point class.                   -->
     <entry-point class='org.apache.sling.extensions.gwt.sample.client.Notes'/>
 

Modified: sling/trunk/contrib/extensions/gwt/servlet/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/servlet/pom.xml?rev=946214&r1=946213&r2=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/servlet/pom.xml (original)
+++ sling/trunk/contrib/extensions/gwt/servlet/pom.xml Wed May 19 15:17:50 2010
@@ -7,9 +7,9 @@
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
-    
+
     http://www.apache.org/licenses/LICENSE-2.0
-    
+
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.extensions.gwt.servlet</artifactId>
-    <version>1.4.60-SNAPSHOT</version>
+    <version>2.0.3-SNAPSHOT</version>
 
     <modelVersion>4.0.0</modelVersion>
 
@@ -42,8 +42,8 @@
 
     <properties>
         <!-- The implementation of the Sling GWT Servlet Library is dependent
-            on this specific GWT version: 1.4.60. Do not upgrade just like that. -->
-        <gwt.version>1.4.60</gwt.version>
+            on this specific GWT version: 2.0.3. Do not upgrade just like that. -->
+    	<gwt.version>2.0.3</gwt.version>
     </properties>
 
     <scm>
@@ -61,9 +61,15 @@
                 <configuration>
                     <instructions>
                         <Export-Package>
-                            org.apache.sling.extensions.gwt.user.server.rpc,
-                            com.google.gwt.*;version=${gwt.version}
+                            org.apache.sling.extensions.gwt.user.server.rpc;version=${gwt.version},
+                            com.google.gwt.rpc.server.*;version=${gwt.version},
+                            com.google.gwt.user.server.rpc.*;version=${gwt.version},
+                            com.google.gwt.user.client.rpc.*;version=${gwt.version}
                         </Export-Package>
+                        <Import-Package>!com.google.gwt.*,!javax.imageio.*,!junit.*,!org.w3c.*,!sun.misc,*</Import-Package>
+                        <DynamicImport-Package>
+                            javax.imageio.*
+                        </DynamicImport-Package>
                         <Embed-Dependency>gwt-servlet</Embed-Dependency>
                     </instructions>
                 </configuration>

Modified: sling/trunk/contrib/extensions/gwt/servlet/src/main/java/org/apache/sling/extensions/gwt/user/server/rpc/SlingRemoteServiceServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/gwt/servlet/src/main/java/org/apache/sling/extensions/gwt/user/server/rpc/SlingRemoteServiceServlet.java?rev=946214&r1=946213&r2=946214&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/gwt/servlet/src/main/java/org/apache/sling/extensions/gwt/user/server/rpc/SlingRemoteServiceServlet.java
(original)
+++ sling/trunk/contrib/extensions/gwt/servlet/src/main/java/org/apache/sling/extensions/gwt/user/server/rpc/SlingRemoteServiceServlet.java
Wed May 19 15:17:50 2010
@@ -35,38 +35,11 @@ import java.text.ParseException;
  * Extending google's remote service servlet to enable resolving of resources through
  * a bundle (for policy file loading).
  * <p/>
- * This class is for version 1.4.60 of the GWT gwt-servlet.jar edition and it is highly recommended
to compile
- * client apps with the corresponding 1.4.60 GWT compiler only!
+ * This class is for version 2.0.3 of the GWT gwt-servlet.jar edition and it is highly recommended
to compile
+ * client apps with the corresponding 2.0.3 GWT gwt-user.jar only!
  * <p/>
  * GWT service servlets that are used in sling are required to extend the <code>SlingRemoteServiceServlet</code>
  * instead of google's own <code>RemoteServiceServlet</code>.
- * <p/>
- * It is important that any bundle using the Sling GWT Servlet Library imports the required
packages from this bundle,
- * for otherwise RPC calls will fail due to well hidden <code>ClassNotFoundException</code>s.
The client app will in
- * such a case only report "This application is outdated, please hit refresh...". As such,
import the following
- * packages:
- * <p/>
- * <code>
- * org.apache.sling.extensions.gwt.user.server.rpc,
- * com.google.gwt.core.client,
- * com.google.gwt.http.client,
- * com.google.gwt.i18n.client,
- * com.google.gwt.i18n.client.constants,
- * com.google.gwt.i18n.client.impl,
- * com.google.gwt.junit.client,
- * com.google.gwt.junit.client.impl,
- * com.google.gwt.user.client,
- * com.google.gwt.user.client.impl,
- * com.google.gwt.user.client.rpc,
- * com.google.gwt.user.client.rpc.core.java.lang,
- * com.google.gwt.user.client.rpc.core.java.util,
- * com.google.gwt.user.client.rpc.impl,
- * com.google.gwt.user.client.ui,
- * com.google.gwt.user.client.ui.impl,
- * com.google.gwt.user.server.rpc,
- * com.google.gwt.user.server.rpc.impl,
- * com.google.gwt.xml.client,
- * com.google.gwt.xml.client.impl
  * </code>
  */
 public class SlingRemoteServiceServlet extends RemoteServiceServlet {
@@ -195,17 +168,11 @@ public class SlingRemoteServiceServlet e
             try {
                 if (is != null) {
                     try {
-                        serializationPolicy = SerializationPolicyLoader.loadFromStream(is);
+                        serializationPolicy = SerializationPolicyLoader.loadFromStream(is,
null);
                     } catch (ParseException e) {
                         getServletContext().log(
                                 "ERROR: Failed to parse the policy file '"
                                         + serializationPolicyFilePath + "'", e);
-                    } catch (ClassNotFoundException e) {
-                        getServletContext().log(
-                                "ERROR: Could not find class '" + e.getMessage()
-                                        + "' listed in the serialization policy file '"
-                                        + serializationPolicyFilePath + "'"
-                                        + "; your server's classpath may be misconfigured",
e);
                     } catch (IOException e) {
                         getServletContext().log(
                                 "ERROR: Could not read the policy file '"



Mime
View raw message