cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r292181 - /cocoon/trunk/src/osgi-servlet/org/apache/cocoon/service/servlet/impl/Activator.java
Date Wed, 28 Sep 2005 14:05:08 GMT
Author: vgritsenko
Date: Wed Sep 28 07:05:04 2005
New Revision: 292181

URL: http://svn.apache.org/viewcvs?rev=292181&view=rev
Log:
cosmetics

Modified:
    cocoon/trunk/src/osgi-servlet/org/apache/cocoon/service/servlet/impl/Activator.java  
(contents, props changed)

Modified: cocoon/trunk/src/osgi-servlet/org/apache/cocoon/service/servlet/impl/Activator.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/osgi-servlet/org/apache/cocoon/service/servlet/impl/Activator.java?rev=292181&r1=292180&r2=292181&view=diff
==============================================================================
--- cocoon/trunk/src/osgi-servlet/org/apache/cocoon/service/servlet/impl/Activator.java (original)
+++ cocoon/trunk/src/osgi-servlet/org/apache/cocoon/service/servlet/impl/Activator.java Wed
Sep 28 07:05:04 2005
@@ -36,8 +36,8 @@
 
 /**
  * Activator which register a Cocoon servlet
+ * @version $Id$
  */
-
 public class Activator implements BundleActivator {
 
     static BundleContext bc;
@@ -45,16 +45,16 @@
     static final String  SITEMAP = "sitemap";
 
     private HashSet registrations = new HashSet();
-    private ClassLoader classLoader = getClass().getClassLoader();;
+    private ClassLoader classLoader = getClass().getClassLoader();
     private Logger logger;
     private Core core;
     private Processor processor;
 
     public void start(BundleContext bc) throws BundleException {
 
-        this.bc  = bc;
+        Activator.bc  = bc;
         try {
-            BootstrapEnvironment env = new OSGiBootstrapEnvironment(this.classLoader, this.bc);
+            BootstrapEnvironment env = new OSGiBootstrapEnvironment(this.classLoader, Activator.bc);
             env.log("OSGiBootstrapEnvironment created");
             CoreUtil coreUtil = new CoreUtil(env);
             env.log("CoreUtil created");
@@ -70,7 +70,7 @@
         ServiceListener listener = new ServiceListener() {
                 public void serviceChanged(ServiceEvent ev) {
                     ServiceReference sr = ev.getServiceReference();
-                    
+
                     switch(ev.getType()) {
                     case ServiceEvent.REGISTERED:
                         setRoot(sr);
@@ -81,12 +81,12 @@
                     }
                 }
             };
-        
+
         String filter = "(objectclass=" + HttpService.class.getName() + ")";
-        
+
         try {
             bc.addServiceListener(listener, filter);
-            
+
             ServiceReference[] srl = bc.getServiceReferences(null, filter);
             for(int i = 0; srl != null && i < srl.length; i++) {
                 listener.serviceChanged(new ServiceEvent(ServiceEvent.REGISTERED,
@@ -96,16 +96,16 @@
             this.logger.info("Failed to set up listener for http service", e);
         }
     }
-  
+
     public void stop(BundleContext bc) throws BundleException {
     }
 
     private void setRoot(ServiceReference sr) {
-        
+
         if(registrations.contains(sr)) {
             return; // already done
         }
-        
+
         this.logger.info("set root for " + sr);
 
         HttpService http = (HttpService)bc.getService(sr);
@@ -123,7 +123,7 @@
         } catch (Exception e) {
             this.logger.info("Failed to register resource", e);
         }
-    } 
+    }
 
     private void unsetRoot(ServiceReference sr) {
         if(!registrations.contains(sr)) {
@@ -131,9 +131,9 @@
         }
 
         this.logger.info("unset root for " + sr);
-    
+
         HttpService http = (HttpService)bc.getService(sr);
-    
+
         if(http != null) {
             http.unregister(SERVLET_ALIAS);
             bc.ungetService(sr);

Propchange: cocoon/trunk/src/osgi-servlet/org/apache/cocoon/service/servlet/impl/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message