[jboss-cvs] JBossAS SVN: r95287 - in projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp: internal and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 21 08:56:11 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-10-21 08:56:10 -0400 (Wed, 21 Oct 2009)
New Revision: 95287

Added:
   projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppService.java
Modified:
   projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java
   projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppActivator.java
Log:
Add marker service

Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java	2009-10-21 12:50:30 UTC (rev 95286)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppCapability.java	2009-10-21 12:56:10 UTC (rev 95287)
@@ -41,7 +41,7 @@
 {
    public WebAppCapability()
    {
-      super(null);
+      super(WebAppService.class.getName());
       
       addDependency(new HttpServiceCapability());
 

Added: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppService.java
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppService.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppService.java	2009-10-21 12:56:10 UTC (rev 95287)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.webapp;
+
+//$Id$
+
+/**
+ * A marker service that is registered by jboss-osgi-webapp
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 21-Oct-2009
+ */
+public interface WebAppService
+{
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/WebAppService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppActivator.java
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppActivator.java	2009-10-21 12:50:30 UTC (rev 95286)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppActivator.java	2009-10-21 12:56:10 UTC (rev 95287)
@@ -23,6 +23,7 @@
 
 //$Id$
 
+import org.jboss.osgi.webapp.WebAppService;
 import org.ops4j.pax.web.extender.war.internal.WebAppPublisherExt;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
@@ -35,18 +36,21 @@
  */
 public class WebAppActivator implements BundleActivator
 {
-   private WebAppPublisherExt paxwebPublisher;
    private WebXMLParserInterceptor webappParserInterceptor;
    private WebAppPublisherInterceptor webappPublishInterceptor;
    
    public void start(BundleContext context)
    {
-      paxwebPublisher = new WebAppPublisherExt();
+      // Register the marker service
+      WebAppService service = new WebAppService() {};
+      context.registerService(WebAppService.class.getName(), service, null);
 
+      // Register the web.xml parser interceptor
       webappParserInterceptor = new WebXMLParserInterceptor(context);
       webappParserInterceptor.start();
 
-      webappPublishInterceptor = new WebAppPublisherInterceptor(context, paxwebPublisher);
+      // Register the WebApp publisher interceptor
+      webappPublishInterceptor = new WebAppPublisherInterceptor(context, new WebAppPublisherExt());
       webappPublishInterceptor.start();
    }
 




More information about the jboss-cvs-commits mailing list