[jboss-cvs] JBossAS SVN: r95562 - in projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org: ops4j/pax/web/extender/war/internal and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 26 08:00:09 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-26 08:00:08 -0400 (Mon, 26 Oct 2009)
New Revision: 95562
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/WebAppPublisherInterceptor.java
projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebXMLParserInterceptor.java
projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/ops4j/pax/web/extender/war/internal/WebAppPublisherExt.java
Log:
Supply system context as start param
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-26 08:17:25 UTC (rev 95561)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppActivator.java 2009-10-26 12:00:08 UTC (rev 95562)
@@ -46,13 +46,13 @@
context.registerService(WebAppService.class.getName(), service, null);
// Register the web.xml parser interceptor
- webappParserInterceptor = new WebXMLParserInterceptor(context);
- webappParserInterceptor.start();
+ webappParserInterceptor = new WebXMLParserInterceptor();
+ webappParserInterceptor.start(context);
// Register the WebApp publisher interceptor
- WebAppPublisherExt publisher = new WebAppPublisherExt(context);
- webappPublishInterceptor = new WebAppPublisherInterceptor(context, publisher);
- webappPublishInterceptor.start();
+ WebAppPublisherExt publisher = new WebAppPublisherExt();
+ webappPublishInterceptor = new WebAppPublisherInterceptor(publisher);
+ webappPublishInterceptor.start(context);
}
public void stop(BundleContext context)
Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppPublisherInterceptor.java
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppPublisherInterceptor.java 2009-10-26 08:17:25 UTC (rev 95561)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebAppPublisherInterceptor.java 2009-10-26 12:00:08 UTC (rev 95562)
@@ -48,20 +48,18 @@
// Provide logging
private Logger log = LoggerFactory.getLogger(WebAppPublisherInterceptor.class);
- private BundleContext context;
private ServiceTracker serviceTracker;
private WebAppPublisherExt publisher;
- public WebAppPublisherInterceptor(BundleContext context, WebAppPublisherExt publisher)
+ public WebAppPublisherInterceptor(WebAppPublisherExt publisher)
{
- this.context = context;
this.publisher = publisher;
// Add the required input
addInput(WebApp.class);
}
- public void start()
+ public void start(BundleContext context)
{
final LifecycleInterceptor interceptor = this;
serviceTracker = new ServiceTracker(context, LifecycleInterceptorService.class.getName(), null)
Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebXMLParserInterceptor.java
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebXMLParserInterceptor.java 2009-10-26 08:17:25 UTC (rev 95561)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/jboss/osgi/webapp/internal/WebXMLParserInterceptor.java 2009-10-26 12:00:08 UTC (rev 95562)
@@ -51,18 +51,15 @@
// Provide logging
private Logger log = LoggerFactory.getLogger(WebXMLParserInterceptor.class);
- private BundleContext context;
private ServiceTracker serviceTracker;
- public WebXMLParserInterceptor(BundleContext context)
+ public WebXMLParserInterceptor()
{
- this.context = context;
-
// Advertise output
addOutput(WebApp.class);
}
- public void start()
+ public void start(BundleContext context)
{
final LifecycleInterceptor interceptor = this;
serviceTracker = new ServiceTracker(context, LifecycleInterceptorService.class.getName(), null)
Modified: projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/ops4j/pax/web/extender/war/internal/WebAppPublisherExt.java
===================================================================
--- projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/ops4j/pax/web/extender/war/internal/WebAppPublisherExt.java 2009-10-26 08:17:25 UTC (rev 95561)
+++ projects/jboss-osgi/projects/bundles/webapp/trunk/src/main/java/org/ops4j/pax/web/extender/war/internal/WebAppPublisherExt.java 2009-10-26 12:00:08 UTC (rev 95562)
@@ -38,16 +38,8 @@
*/
public class WebAppPublisherExt extends WebAppPublisher
{
- private BundleContext context;
-
- public WebAppPublisherExt(BundleContext context)
+ public void publish(BundleContext context, WebApp webapp)
{
- this.context = context;
- }
-
- @Override
- public void publish(WebApp webapp)
- {
// Gracefully wait 5000ms for the WebContainer to become available
int timeout = 25;
ServiceReference sref = null;
More information about the jboss-cvs-commits
mailing list