Mercurial > dive4elements > framework
changeset 101:7fc0650f194c
Upgraded the Restlet version to 2.0.4 (current stable).
artifacts/trunk@1281 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 01 Feb 2011 16:15:03 +0000 |
parents | 933bbc9fc11f |
children | 4122dbc9711b |
files | ChangeLog artifact-database/pom.xml artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ExportResource.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ImportResource.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ServiceResource.java artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java pom.xml |
diffstat | 10 files changed, 53 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Nov 02 17:23:36 2010 +0000 +++ b/ChangeLog Tue Feb 01 16:15:03 2011 +0000 @@ -1,3 +1,26 @@ +2011-02-01 Ingo Weinzierl <ingo@intevation.de> + + * artifact-database/pom.xml: Upgraded Restlet from version 2.0-SNAPSHOT + to the current stable version 2.0.4. + + * pom.xml: The SCM plugin will not check for local changes any longer. + Otherwise, we aren't able to build the project with outstanding + modifications. + + * artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java: + Set the max number of threads available for the REST server to 512. This + is a _WORKAROUND_ for Restlet-2.0.4 which seems to have a bug while + handling threads. + + * artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ImportResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ServiceResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ExportResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java: + Renamed the packages of the Request and Response class that have been + changed from Restlet 2.0-SNAPSHOT to 2.0.4. + 2010-11-02 Ingo Weinzierl <ingo@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactContextFactory.java,
--- a/artifact-database/pom.xml Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/pom.xml Tue Feb 01 16:15:03 2011 +0000 @@ -50,14 +50,14 @@ <version>1.0-SNAPSHOT</version> </dependency> <dependency> - <groupId>org.restlet</groupId> + <groupId>org.restlet.jse</groupId> <artifactId>org.restlet</artifactId> - <version>2.0-SNAPSHOT</version> + <version>2.0.4</version> </dependency> <dependency> - <groupId>org.restlet</groupId> + <groupId>org.restlet.jse</groupId> <artifactId>org.restlet.ext.xml</artifactId> - <version>2.0-SNAPSHOT</version> + <version>2.0.4</version> </dependency> <dependency> <groupId>com.h2database</groupId>
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java Tue Feb 01 16:15:03 2011 +0000 @@ -18,9 +18,10 @@ import org.apache.log4j.Logger; +import org.restlet.Request; +import org.restlet.Response; + import org.restlet.data.MediaType; -import org.restlet.data.Request; -import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation;
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java Tue Feb 01 16:15:03 2011 +0000 @@ -19,9 +19,10 @@ import org.apache.log4j.Logger; +import org.restlet.Request; +import org.restlet.Response; + import org.restlet.data.MediaType; -import org.restlet.data.Request; -import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation;
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java Tue Feb 01 16:15:03 2011 +0000 @@ -18,8 +18,9 @@ import org.apache.log4j.Logger; +import org.restlet.Response; + import org.restlet.data.MediaType; -import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation;
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ExportResource.java Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ExportResource.java Tue Feb 01 16:15:03 2011 +0000 @@ -13,9 +13,10 @@ import org.apache.log4j.Logger; +import org.restlet.Request; +import org.restlet.Response; + import org.restlet.data.MediaType; -import org.restlet.data.Request; -import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation;
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ImportResource.java Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ImportResource.java Tue Feb 01 16:15:03 2011 +0000 @@ -15,9 +15,10 @@ import org.apache.log4j.Logger; +import org.restlet.Request; +import org.restlet.Response; + import org.restlet.data.MediaType; -import org.restlet.data.Request; -import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation;
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ServiceResource.java Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ServiceResource.java Tue Feb 01 16:15:03 2011 +0000 @@ -15,9 +15,9 @@ import org.apache.log4j.Logger; +import org.restlet.Request; +import org.restlet.Response; import org.restlet.data.MediaType; -import org.restlet.data.Request; -import org.restlet.data.Response; import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation;
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java Tue Nov 02 17:23:36 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java Tue Feb 01 16:15:03 2011 +0000 @@ -15,6 +15,7 @@ import org.apache.log4j.Logger; import org.restlet.Component; +import org.restlet.Server; import org.restlet.data.Protocol; @@ -81,13 +82,19 @@ Component component = new Component(); + Server server = null; + if (listenString != null) { - component.getServers().add(Protocol.HTTP, listenString, port); + server = new Server(Protocol.HTTP, listenString, port); } else { - component.getServers().add(Protocol.HTTP, port); + server = new Server(Protocol.HTTP, port); } + component.getServers().add(server); + + server.getContext().getParameters().add("maxThreads", "512"); + component.getDefaultHost().attach(app); logger.info("Starting rest HTTP server on "