tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: r418707 - in /incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src: main/java/org/apache/tuscany/service/jetty/ test/java/org/apache/tuscany/service/jetty/
Date Mon, 03 Jul 2006 08:20:26 GMT
Author: jboynes
Date: Mon Jul  3 01:20:24 2006
New Revision: 418707

URL: http://svn.apache.org/viewvc?rev=418707&view=rev
Log:
make sourcecheck happy with jetty

Modified:
    incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyService.java
    incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyServiceImpl.java
    incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/ConsoleMonitor.java
    incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/StartupTestCase.java

Modified: incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyService.java?rev=418707&r1=418706&r2=418707&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyService.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyService.java
Mon Jul  3 01:20:24 2006
@@ -3,8 +3,9 @@
 import java.io.File;
 import java.io.IOException;
 
-import org.apache.tuscany.spi.host.ServletHost;
 import org.mortbay.jetty.Server;
+
+import org.apache.tuscany.spi.host.ServletHost;
 
 /**
  * Implementations provide a Jetty transport service to the runtime

Modified: incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyServiceImpl.java?rev=418707&r1=418706&r2=418707&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyServiceImpl.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/main/java/org/apache/tuscany/service/jetty/JettyServiceImpl.java
Mon Jul  3 01:20:24 2006
@@ -7,18 +7,15 @@
 import javax.resource.spi.work.WorkManager;
 import javax.servlet.Servlet;
 
-import org.apache.tuscany.spi.annotation.Autowire;
-import org.apache.tuscany.spi.annotation.Monitor;
-import org.apache.tuscany.spi.host.ServletHost;
 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.Handler;
 import org.mortbay.jetty.Server;
-import org.mortbay.jetty.webapp.WebAppContext;
 import org.mortbay.jetty.handler.ContextHandlerCollection;
 import org.mortbay.jetty.handler.DefaultHandler;
 import org.mortbay.jetty.handler.HandlerCollection;
 import org.mortbay.jetty.handler.RequestLogHandler;
 import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
 import org.mortbay.thread.BoundedThreadPool;
 import org.mortbay.thread.ThreadPool;
 import org.osoa.sca.annotations.Destroy;
@@ -27,6 +24,10 @@
 import org.osoa.sca.annotations.Scope;
 import org.osoa.sca.annotations.Service;
 
+import org.apache.tuscany.spi.annotation.Autowire;
+import org.apache.tuscany.spi.annotation.Monitor;
+import org.apache.tuscany.spi.host.ServletHost;
+
 /**
  * Implements an HTTP transport service using Jetty
  *
@@ -68,11 +69,11 @@
 
         server = new Server();
 
-        if (workManager == null){
+        if (workManager == null) {
             BoundedThreadPool threadPool = new BoundedThreadPool();
             threadPool.setMaxThreads(100);
             server.setThreadPool(threadPool);
-        }else{
+        } else {
             server.setThreadPool(new TuscanyThreadPool());
         }
         Connector connector = new SelectChannelConnector();
@@ -85,17 +86,19 @@
         handlers.setHandlers(new Handler[]{contexts, new DefaultHandler(), requestLogHandler});
         server.setHandler(handlers);
 
-        // WebAppContext.addWebApplications(server, "./webapps", "org/mortbay/jetty/webapp/webdefault.xml",
true, false);
+/*
+         WebAppContext.addWebApplications(server, "./webapps", "org/mortbay/jetty/webapp/webdefault.xml",
true, false);
 
-        //HashUserRealm userRealm = new HashUserRealm();
-        //userRealm.setName("Test Realm");
-        //userRealm.setConfig("./etc/realm.properties");
-        //server.setUserRealms(new UserRealm[]{userRealm});
-
-        //NCSARequestLog requestLog = new NCSARequestLog("./logs/jetty-yyyy-mm-dd.log");
-        //requestLog.setExtended(false);
-        //requestLogHandler.setRequestLog(requestLog);
+        HashUserRealm userRealm = new HashUserRealm();
+        userRealm.setName("Test Realm");
+        userRealm.setConfig("./etc/realm.properties");
+        server.setUserRealms(new UserRealm[]{userRealm});
+
+        NCSARequestLog requestLog = new NCSARequestLog("./logs/jetty-yyyy-mm-dd.log");
+        requestLog.setExtended(false);
+        requestLogHandler.setRequestLog(requestLog);
         requestLogHandler.setRequestLog(monitor);
+*/
         server.setStopAtShutdown(true);
         server.setSendServerVersion(true);
         server.start();
@@ -116,7 +119,7 @@
     }
 
     public void registerComposite(File compositeLocation) throws IOException {
-        WebAppContext.addWebApplications(server,compositeLocation.getAbsolutePath(),
+        WebAppContext.addWebApplications(server, compositeLocation.getAbsolutePath(),
                 "org/mortbay/jetty/webapp/webdefault.xml",
                 false,
                 false);

Modified: incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/ConsoleMonitor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/ConsoleMonitor.java?rev=418707&r1=418706&r2=418707&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/ConsoleMonitor.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/ConsoleMonitor.java
Mon Jul  3 01:20:24 2006
@@ -6,17 +6,17 @@
 /**
  * @version $Rev$ $Date$
  */
-public class ConsoleMonitor implements TransportMonitor{
+public class ConsoleMonitor implements TransportMonitor {
     public void started(int port) {
-        System.out.println("Started Jetty port ["+port+"]");
+        System.out.println("Started Jetty port [" + port + "]");
     }
 
     public void shutdown(int port) {
-        System.out.println("Shutdown Jetty port ["+port+"]");
+        System.out.println("Shutdown Jetty port [" + port + "]");
     }
 
     public void startError(int port, Exception e) {
-        System.out.println("Error starting Jetty port ["+port+"]");
+        System.out.println("Error starting Jetty port [" + port + "]");
         System.out.println(e);
     }
 

Modified: incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/StartupTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/StartupTestCase.java?rev=418707&r1=418706&r2=418707&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/StartupTestCase.java
(original)
+++ incubator/tuscany/sandbox/jboynes/sca/services/transports/http.jetty/src/test/java/org/apache/tuscany/service/jetty/StartupTestCase.java
Mon Jul  3 01:20:24 2006
@@ -1,7 +1,5 @@
 package org.apache.tuscany.service.jetty;
 
-import java.io.File;
-
 import junit.framework.TestCase;
 
 /**
@@ -9,7 +7,7 @@
  */
 public class StartupTestCase extends TestCase {
 
-    public void testStartup() throws Exception{
+    public void testStartup() throws Exception {
 //        JettyServiceImpl service = new JettyServiceImpl(new ConsoleMonitor());
 //        service.init();
 //        service.registerComposite(new File(getClass().getResource("/webapps").toURI()));



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message