[jboss-osgi-commits] JBoss-OSGI SVN: r89492 - in projects/jboss-osgi/trunk: 3rdparty and 71 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Thu May 28 08:21:22 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-05-28 08:21:21 -0400 (Thu, 28 May 2009)
New Revision: 89492
Added:
projects/jboss-osgi/trunk/3rdparty/.project
projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java
projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/
projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF/
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/XMLBindingActivator.java
projects/jboss-osgi/trunk/bundles/.project
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/LogServiceTracker.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/CommonServicesActivator.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LogEntryImpl.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeploymentScanner.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/SystemLogService.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java
projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerServiceActivator.java
projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/InitialContextServiceActivator.java
projects/jboss-osgi/trunk/bundles/logging/bin/
projects/jboss-osgi/trunk/bundles/logging/bin/.project
projects/jboss-osgi/trunk/bundles/logging/bin/.settings/
projects/jboss-osgi/trunk/bundles/logging/bin/src/
projects/jboss-osgi/trunk/bundles/logging/bin/src/main/
projects/jboss-osgi/trunk/bundles/logging/bin/src/main/java/
projects/jboss-osgi/trunk/bundles/logging/bin/src/main/java/org/
projects/jboss-osgi/trunk/bundles/logging/bin/src/main/java/org/jboss/
projects/jboss-osgi/trunk/bundles/logging/bin/src/main/java/org/jboss/osgi/
projects/jboss-osgi/trunk/bundles/logging/bin/src/main/java/org/jboss/osgi/service/
projects/jboss-osgi/trunk/bundles/logging/bin/src/main/java/org/jboss/osgi/service/logging/
projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java
projects/jboss-osgi/trunk/integration/.project
projects/jboss-osgi/trunk/runtime/.project
Removed:
projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/internal/
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java
projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/ServiceActivator.java
projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/ServiceActivator.java
projects/jboss-osgi/trunk/bundles/logging/.classpath
projects/jboss-osgi/trunk/bundles/logging/.settings/
projects/jboss-osgi/trunk/bundles/logging/pom.xml
projects/jboss-osgi/trunk/bundles/logging/src/
projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java
Modified:
projects/jboss-osgi/trunk/3rdparty/apache-xerces/.classpath
projects/jboss-osgi/trunk/3rdparty/apache-xerces/pom.xml
projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XercesParserActivator.java
projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory
projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory
projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml
projects/jboss-osgi/trunk/blueprint/impl/pom.xml
projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java
projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/context/context-basic.bnd
projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/bundles/common/pom.xml
projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java
projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerActivator.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java
projects/jboss-osgi/trunk/bundles/jmx/pom.xml
projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java
projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerService.java
projects/jboss-osgi/trunk/bundles/jndi/pom.xml
projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java
projects/jboss-osgi/trunk/bundles/logging/.project
projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml
projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java
projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
projects/jboss-osgi/trunk/bundles/pom.xml
projects/jboss-osgi/trunk/distribution/pom.xml
projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/husky/harness/pom.xml
projects/jboss-osgi/trunk/husky/pom.xml
projects/jboss-osgi/trunk/husky/testsuite/pom.xml
projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceA.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/bundle/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/HttpRenderServlet.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/mall/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/frontend.bnd
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/mall.bnd
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-creditcard.bnd
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-paypal.bnd
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-pets.bnd
projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-sports.bnd
Log:
Merge jboss-osgi-logging with jboss-osgi-common
Register XML parser fatories as services
Added: projects/jboss-osgi/trunk/3rdparty/.project
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/.project (rev 0)
+++ projects/jboss-osgi/trunk/3rdparty/.project 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-3rdparty</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jboss-osgi/trunk/3rdparty/apache-xerces/.classpath
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/apache-xerces/.classpath 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/3rdparty/apache-xerces/.classpath 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified: projects/jboss-osgi/trunk/3rdparty/apache-xerces/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/apache-xerces/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/3rdparty/apache-xerces/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -43,7 +43,15 @@
<version>${version.xml.resolver}</version>
</dependency>
+ <!-- Bundle Dependencies -->
<dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- OSGi Dependencies -->
+ <dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<scope>provided</scope>
@@ -76,8 +84,10 @@
org.w3c.dom*,
org.xml.sax*,
- <!-- osgi -->
+ <!-- import -->
+ org.jboss.osgi.common;version=1.0,
org.osgi.framework,
+ org.osgi.service.log,
org.osgi.util.xml,
<!-- ignore -->
Added: projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java (rev 0)
+++ projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,518 @@
+/*
+ * $Header: /cvshome/build/org.osgi.util.xml/src/org/osgi/util/xml/XMLParserActivator.java,v 1.11 2006/10/27 18:17:06 hargrave Exp $
+ *
+ * Copyright (c) OSGi Alliance (2002, 2006). All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.osgi.apache.xerces.internal;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceFactory;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * This is a copy of the {@link XMLParserActivatorExt} mentioned in the CVS
+ * Header above with added XInclude support.
+ *
+ * Using this copy is a workarround for issue
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-92
+ *
+ * A BundleActivator class that allows any JAXP compliant XML Parser to register
+ * itself as an OSGi parser service.
+ *
+ * Multiple JAXP compliant parsers can concurrently register by using this
+ * BundleActivator class. Bundles who wish to use an XML parser can then use the
+ * framework's service registry to locate available XML Parsers with the desired
+ * characteristics such as validating and namespace-aware.
+ *
+ * <p>
+ * The services that this bundle activator enables a bundle to provide are:
+ * <ul>
+ * <li><code>javax.xml.parsers.SAXParserFactory</code>({@link #SAXFACTORYNAME})
+ * <li><code>javax.xml.parsers.DocumentBuilderFactory</code>(
+ * {@link #DOMFACTORYNAME})
+ * </ul>
+ *
+ * <p>
+ * The algorithm to find the implementations of the abstract parsers is derived
+ * from the JAR file specifications, specifically the Services API.
+ * <p>
+ * An XMLParserActivator assumes that it can find the class file names of the
+ * factory classes in the following files:
+ * <ul>
+ * <li><code>/META-INF/services/javax.xml.parsers.SAXParserFactory</code> is
+ * a file contained in a jar available to the runtime which contains the
+ * implementation class name(s) of the SAXParserFactory.
+ * <li><code>/META-INF/services/javax.xml.parsers.DocumentBuilderFactory</code>
+ * is a file contained in a jar available to the runtime which contains the
+ * implementation class name(s) of the <code>DocumentBuilderFactory</code>
+ * </ul>
+ * <p>
+ * If either of the files does not exist, <code>XMLParserActivator</code>
+ * assumes that the parser does not support that parser type.
+ *
+ * <p>
+ * <code>XMLParserActivator</code> attempts to instantiate both the
+ * <code>SAXParserFactory</code> and the <code>DocumentBuilderFactory</code>.
+ * It registers each factory with the framework along with service properties:
+ * <ul>
+ * <li>{@link #PARSER_VALIDATING}- indicates if this factory supports
+ * validating parsers. It's value is a <code>Boolean</code>.
+ * <li>{@link #PARSER_NAMESPACEAWARE}- indicates if this factory supports
+ * namespace aware parsers It's value is a <code>Boolean</code>.
+ * </ul>
+ * <p>
+ * Individual parser implementations may have additional features, properties,
+ * or attributes which could be used to select a parser with a filter. These can
+ * be added by extending this class and overriding the
+ * <code>setSAXProperties</code> and <code>setDOMProperties</code> methods.
+ */
+public class XMLParserActivatorExt implements BundleActivator, ServiceFactory
+{
+ /* * Context of this bundle */
+ private BundleContext context;
+ /*
+ * * Filename containing the SAX Parser Factory Class name. Also used as the basis for the <code>SERVICE_PID<code> registration property.
+ */
+ public static final String SAXFACTORYNAME = "javax.xml.parsers.SAXParserFactory";
+ /*
+ * * Filename containing the DOM Parser Factory Class name. Also used as the basis for the <code>SERVICE_PID</code> registration property.
+ */
+ public static final String DOMFACTORYNAME = "javax.xml.parsers.DocumentBuilderFactory";
+ /* * Path to the factory class name files */
+ private static final String PARSERCLASSFILEPATH = "/META-INF/services/";
+ /* * Fully qualified path name of SAX Parser Factory Class Name file */
+ public static final String SAXCLASSFILE = PARSERCLASSFILEPATH + SAXFACTORYNAME;
+ /* * Fully qualified path name of DOM Parser Factory Class Name file */
+ public static final String DOMCLASSFILE = PARSERCLASSFILEPATH + DOMFACTORYNAME;
+ /* * SAX Factory Service Description */
+ private static final String SAXFACTORYDESCRIPTION = "A JAXP Compliant SAX Parser";
+ /* * DOM Factory Service Description */
+ private static final String DOMFACTORYDESCRIPTION = "A JAXP Compliant DOM Parser";
+ /*
+ * * Service property specifying if factory is configured to support validating parsers. The value is of type <code>Boolean</code>.
+ */
+ public static final String PARSER_VALIDATING = "parser.validating";
+ /*
+ * * Service property specifying if factory is configured to support namespace aware parsers. The value is of type <code>Boolean</code>.
+ */
+ public static final String PARSER_NAMESPACEAWARE = "parser.namespaceAware";
+ /*
+ * * Service property specifying if factory is configured to support XInclude aware parsers. The value is of type <code>Boolean</code>.
+ */
+ public static final String PARSER_XINCLUDEAWARE = "parser.xincludeAware";
+ /*
+ * * Key for parser factory name property - this must be saved in the parsers properties hashtable so that the parser factory can be instantiated from a
+ * ServiceReference
+ */
+ private static final String FACTORYNAMEKEY = "parser.factoryname";
+
+ /*
+ * * Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. This method can be used to
+ * register services or to allocate any resources that this bundle needs. <p> This method must complete and return to its caller in a timely manner. <p> This method
+ * attempts to register a SAX and DOM parser with the Framework's service registry.
+ * @param context The execution context of the bundle being started.
+ * @throws java.lang.Exception If this method throws an exception, this bundle is marked as stopped and the Framework will remove this bundle's listeners, unregister
+ * all services registered by this bundle, and release all services used by this bundle.
+ */
+ public void start(BundleContext context) throws Exception
+ {
+ this.context = context;
+ Bundle parserBundle = context.getBundle();
+ try
+ {
+ // check for sax parsers
+ registerSAXParsers(getParserFactoryClassNames(parserBundle.getResource(SAXCLASSFILE)));
+ // check for dom parsers
+ registerDOMParsers(getParserFactoryClassNames(parserBundle.getResource(DOMCLASSFILE)));
+ }
+ catch (IOException ioe)
+ {
+ // if there were any IO errors accessing the resource files
+ // containing the class names
+ ioe.printStackTrace();
+ throw new FactoryConfigurationError(ioe);
+ }
+ }
+
+ /*
+ * * This method has nothing to do as all active service registrations will automatically get unregistered when the bundle stops.
+ * @param context The execution context of the bundle being stopped.
+ * @throws java.lang.Exception If this method throws an exception, the bundle is still marked as stopped, and the Framework will remove the bundle's listeners,
+ * unregister all services registered by the bundle, and release all services used by the bundle.
+ */
+ public void stop(BundleContext context) throws Exception
+ {
+ }
+
+ /*
+ * * Given the URL for a file, reads and returns the parser class names. There may be multiple classes specified in this file, one per line. There may also be
+ * comment lines in the file, which begin with "#".
+ * @param parserUrl The URL of the service file containing the parser class names
+ * @return A vector of strings containing the parser class names or null if parserUrl is null
+ * @throws IOException if there is a problem reading the URL input stream
+ */
+ private Vector getParserFactoryClassNames(URL parserUrl) throws IOException
+ {
+ Vector v = new Vector(1);
+ if (parserUrl != null)
+ {
+ String parserFactoryClassName = null;
+ InputStream is = parserUrl.openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(is));
+ while (true)
+ {
+ parserFactoryClassName = br.readLine();
+ if (parserFactoryClassName == null)
+ {
+ break; // end of file reached
+ }
+ String pfcName = parserFactoryClassName.trim();
+ if (pfcName.length() == 0)
+ {
+ continue; // blank line
+ }
+ int commentIdx = pfcName.indexOf("#");
+ if (commentIdx == 0)
+ { // comment line
+ continue;
+ }
+ else if (commentIdx < 0)
+ { // no comment on this line
+ v.addElement(pfcName);
+ }
+ else
+ {
+ v.addElement(pfcName.substring(0, commentIdx).trim());
+ }
+ }
+ return v;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /*
+ * * Register SAX Parser Factory Services with the framework.
+ * @param parserFactoryClassNames - a <code>Vector</code> of <code>String</code> objects containing the names of the parser Factory Classes
+ * @throws FactoryConfigurationError if thrown from <code>getFactory</code>
+ */
+ private void registerSAXParsers(Vector parserFactoryClassNames) throws FactoryConfigurationError
+ {
+ if (parserFactoryClassNames != null)
+ {
+ Enumeration e = parserFactoryClassNames.elements();
+ int index = 0;
+ while (e.hasMoreElements())
+ {
+ String parserFactoryClassName = (String)e.nextElement();
+ // create a sax parser factory just to get it's default
+ // properties. It will never be used since
+ // this class will operate as a service factory and give each
+ // service requestor it's own SaxParserFactory
+ SAXParserFactory factory = (SAXParserFactory)getFactory(parserFactoryClassName);
+ Hashtable properties = new Hashtable(7);
+ // figure out the default properties of the parser
+ setDefaultSAXProperties(factory, properties, index);
+ // store the parser factory class name in the properties so that
+ // it can be retrieved when getService is called
+ // to return a parser factory
+ properties.put(FACTORYNAMEKEY, parserFactoryClassName);
+ // release the factory
+ factory = null;
+ // register the factory as a service
+ context.registerService(SAXFACTORYNAME, this, properties);
+ index++;
+ }
+ }
+ }
+
+ /*
+ * * <p> Set the SAX Parser Service Properties. By default, the following properties are set: <ul> <li><code>SERVICE_DESCRIPTION</code> <li><code>SERVICE_PID</code>
+ * <li><code>PARSER_VALIDATING</code>- instantiates a parser and queries it to find out whether it is validating or not <li><code>PARSER_NAMESPACEAWARE</code>-
+ * instantiates a parser and queries it to find out whether it is namespace aware or not <ul>
+ * @param factory The <code>SAXParserFactory</code> object
+ * @param props <code>Hashtable</code> of service properties.
+ */
+ private void setDefaultSAXProperties(SAXParserFactory factory, Hashtable props, int index)
+ {
+ props.put(Constants.SERVICE_DESCRIPTION, SAXFACTORYDESCRIPTION);
+ props.put(Constants.SERVICE_PID, SAXFACTORYNAME + "." + context.getBundle().getBundleId() + "." + index);
+ setSAXProperties(factory, props);
+ }
+
+ /*
+ * * <p> Set the customizable SAX Parser Service Properties. <p> This method attempts to instantiate a validating parser and a namespaceaware parser to determine if
+ * the parser can support those features. The appropriate properties are then set in the specified properties object. <p> This method can be overridden to add
+ * additional SAX2 features and properties. If you want to be able to filter searches of the OSGi service registry, this method must put a key, value pair into the
+ * properties object for each feature or property. For example, properties.put("http://www.acme.com/features/foo", Boolean.TRUE);
+ * @param factory - the SAXParserFactory object
+ * @param properties - the properties object for the service
+ */
+ public void setSAXProperties(SAXParserFactory factory, Hashtable props)
+ {
+ // check if this parser can be configured to validate
+ boolean validating = true;
+ factory.setValidating(true);
+ factory.setNamespaceAware(false);
+ try
+ {
+ factory.newSAXParser();
+ }
+ catch (Exception pce_val)
+ {
+ validating = false;
+ }
+
+ // check if this parser can be configured to be namespaceaware
+ boolean namespaceaware = true;
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ try
+ {
+ factory.newSAXParser();
+ }
+ catch (Exception pce_nsa)
+ {
+ namespaceaware = false;
+ }
+
+ // check if this parser can be configured to be xinclude aware
+ boolean xinclude = true;
+ factory.setValidating(validating);
+ factory.setNamespaceAware(namespaceaware);
+ factory.setXIncludeAware(true);
+ try
+ {
+ factory.newSAXParser();
+ }
+ catch (Exception pce_inc)
+ {
+ xinclude = false;
+ }
+
+ // set the factory values
+ factory.setValidating(validating);
+ factory.setNamespaceAware(namespaceaware);
+ factory.setXIncludeAware(xinclude);
+
+ // set the OSGi service properties
+ props.put(PARSER_NAMESPACEAWARE, new Boolean(namespaceaware));
+ props.put(PARSER_VALIDATING, new Boolean(validating));
+ props.put(PARSER_XINCLUDEAWARE, new Boolean(xinclude));
+ }
+
+ /*
+ * * Register DOM Parser Factory Services with the framework.
+ * @param parserFactoryClassNames - a <code>Vector</code> of <code>String</code> objects containing the names of the parser Factory Classes
+ * @throws FactoryConfigurationError if thrown from <code>getFactory</code>
+ */
+ private void registerDOMParsers(Vector parserFactoryClassNames) throws FactoryConfigurationError
+ {
+ if (parserFactoryClassNames != null)
+ {
+ Enumeration e = parserFactoryClassNames.elements();
+ int index = 0;
+ while (e.hasMoreElements())
+ {
+ String parserFactoryClassName = (String)e.nextElement();
+ // create a dom parser factory just to get it's default
+ // properties. It will never be used since
+ // this class will operate as a service factory and give each
+ // service requestor it's own DocumentBuilderFactory
+ DocumentBuilderFactory factory = (DocumentBuilderFactory)getFactory(parserFactoryClassName);
+ Hashtable properties = new Hashtable(7);
+ // figure out the default properties of the parser
+ setDefaultDOMProperties(factory, properties, index);
+ // store the parser factory class name in the properties so that
+ // it can be retrieved when getService is called
+ // to return a parser factory
+ properties.put(FACTORYNAMEKEY, parserFactoryClassName);
+ // release the factory
+ factory = null;
+ // register the factory as a service
+ context.registerService(DOMFACTORYNAME, this, properties);
+ index++;
+ }
+ }
+ }
+
+ /*
+ * * Set the DOM parser service properties. By default, the following properties are set: <ul> <li><code>SERVICE_DESCRIPTION</code> <li><code>SERVICE_PID</code>
+ * <li><code>PARSER_VALIDATING</code> <li><code>PARSER_NAMESPACEAWARE</code> <ul>
+ * @param factory The <code>DocumentBuilderFactory</code> object
+ * @param props <code>Hashtable</code> of service properties.
+ */
+ private void setDefaultDOMProperties(DocumentBuilderFactory factory, Hashtable props, int index)
+ {
+ props.put(Constants.SERVICE_DESCRIPTION, DOMFACTORYDESCRIPTION);
+ props.put(Constants.SERVICE_PID, DOMFACTORYNAME + "." + context.getBundle().getBundleId() + "." + index);
+ setDOMProperties(factory, props);
+ }
+
+ /*
+ * * <p> Set the customizable DOM Parser Service Properties. <p> This method attempts to instantiate a validating parser and a namespaceaware parser to determine if
+ * the parser can support those features. The appropriate properties are then set in the specified props object. <p> This method can be overridden to add additional
+ * DOM2 features and properties. If you want to be able to filter searches of the OSGi service registry, this method must put a key, value pair into the properties
+ * object for each feature or property. For example, properties.put("http://www.acme.com/features/foo", Boolean.TRUE);
+ * @param factory - the DocumentBuilderFactory object
+ * @param props - Hashtable of service properties.
+ */
+ public void setDOMProperties(DocumentBuilderFactory factory, Hashtable props)
+ {
+ // check if this parser can be configured to validate
+ boolean validating = true;
+ factory.setValidating(true);
+ factory.setNamespaceAware(false);
+ try
+ {
+ factory.newDocumentBuilder();
+ }
+ catch (Exception pce_val)
+ {
+ validating = false;
+ }
+
+ // check if this parser can be configured to be namespaceaware
+ boolean namespaceaware = true;
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ try
+ {
+ factory.newDocumentBuilder();
+ }
+ catch (Exception pce_nsa)
+ {
+ namespaceaware = false;
+ }
+
+ // check if this parser can be configured to be xinclude aware
+ boolean xinclude = true;
+ factory.setValidating(validating);
+ factory.setNamespaceAware(namespaceaware);
+ factory.setXIncludeAware(true);
+ try
+ {
+ factory.newDocumentBuilder();
+ }
+ catch (Exception pce_inc)
+ {
+ xinclude = false;
+ }
+
+ // set the factory values
+ factory.setValidating(validating);
+ factory.setNamespaceAware(namespaceaware);
+ factory.setXIncludeAware(xinclude);
+
+ // set the OSGi service properties
+ props.put(PARSER_VALIDATING, new Boolean(validating));
+ props.put(PARSER_NAMESPACEAWARE, new Boolean(namespaceaware));
+ props.put(PARSER_XINCLUDEAWARE, new Boolean(xinclude));
+ }
+
+ /*
+ * * Given a parser factory class name, instantiate that class.
+ * @param parserFactoryClassName A <code>String</code> object containing the name of the parser factory class
+ * @return a parserFactoryClass Object
+ * @pre parserFactoryClassName!=null
+ */
+ private Object getFactory(String parserFactoryClassName) throws FactoryConfigurationError
+ {
+ Exception e = null;
+ try
+ {
+ return Class.forName(parserFactoryClassName).newInstance();
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ e = cnfe;
+ }
+ catch (InstantiationException ie)
+ {
+ e = ie;
+ }
+ catch (IllegalAccessException iae)
+ {
+ e = iae;
+ }
+ throw new FactoryConfigurationError(e);
+ }
+
+ /*
+ * * Creates a new XML Parser Factory object. <p> A unique XML Parser Factory object is returned for each call to this method. <p> The returned XML Parser Factory
+ * object will be configured for validating and namespace aware support as specified in the service properties of the specified ServiceRegistration object. This
+ * method can be overridden to configure additional features in the returned XML Parser Factory object.
+ * @param bundle The bundle using the service.
+ * @param registration The <code>ServiceRegistration</code> object for the service.
+ * @return A new, configured XML Parser Factory object or null if a configuration error was encountered
+ */
+ public Object getService(Bundle bundle, ServiceRegistration registration)
+ {
+ ServiceReference sref = registration.getReference();
+ String parserFactoryClassName = (String)sref.getProperty(FACTORYNAMEKEY);
+ try
+ {
+ // need to set factory properties
+ Object factory = getFactory(parserFactoryClassName);
+ if (factory instanceof SAXParserFactory)
+ {
+ ((SAXParserFactory)factory).setValidating(((Boolean)sref.getProperty(PARSER_VALIDATING)).booleanValue());
+ ((SAXParserFactory)factory).setNamespaceAware(((Boolean)sref.getProperty(PARSER_NAMESPACEAWARE)).booleanValue());
+ }
+ else if (factory instanceof DocumentBuilderFactory)
+ {
+ ((DocumentBuilderFactory)factory).setValidating(((Boolean)sref.getProperty(PARSER_VALIDATING)).booleanValue());
+ ((DocumentBuilderFactory)factory).setNamespaceAware(((Boolean)sref.getProperty(PARSER_NAMESPACEAWARE)).booleanValue());
+ }
+ return factory;
+ }
+ catch (FactoryConfigurationError fce)
+ {
+ fce.printStackTrace();
+ return null;
+ }
+ }
+
+ /*
+ * * Releases a XML Parser Factory object.
+ * @param bundle The bundle releasing the service.
+ * @param registration The <code>ServiceRegistration</code> object for the service.
+ * @param service The XML Parser Factory object returned by a previous call to the <code>getService</code> method.
+ */
+ public void ungetService(Bundle bundle, ServiceRegistration registration, Object service)
+ {
+ }
+}
Property changes on: projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XMLParserActivatorExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XercesParserActivator.java
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XercesParserActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/java/org/jboss/osgi/apache/xerces/internal/XercesParserActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,38 +23,71 @@
//$Id$
-import org.osgi.framework.BundleActivator;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleContext;
-import org.osgi.util.xml.XMLParserActivator;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
/**
- * Activat the XML parser using {@link XMLParserActivator}
+ * Activate the XML parser using {@link XMLParserActivatorExt}
*
* @author thomas.diesler at jboss.com
* @since 29-Apr-2009
*/
-public class XercesParserActivator implements BundleActivator
+public class XercesParserActivator extends XMLParserActivatorExt
{
- private XMLParserActivator parserActivator;
+ private LogService log;
- public void start(BundleContext context)
+ public void start(BundleContext context) throws Exception
{
- try
+ super.start(context);
+
+ log = new LogServiceTracker(context);
+
+ logSAXParserFactory(context);
+ logDOMParserFactory(context);
+ }
+
+ private void logSAXParserFactory(BundleContext context)
+ {
+ ServiceReference saxRef = context.getServiceReference(SAXParserFactory.class.getName());
+ if (saxRef != null)
{
- parserActivator = new XMLParserActivator();
- parserActivator.start(context);
+ Object factory = context.getService(saxRef);
+ log.log(LogService.LOG_DEBUG, "SAXParserFactory: " + factory.getClass().getName());
+
+ for (String key : saxRef.getPropertyKeys())
+ {
+ Object value = saxRef.getProperty(key);
+ log.log(LogService.LOG_DEBUG, " " + key + "=" + value);
+ }
}
- catch (Exception ex)
+ else
{
- throw new IllegalStateException("Cannot activate XML parser", ex);
+ log.log(LogService.LOG_WARNING, "No SAXParserFactory registered");
}
}
- public void stop(BundleContext context) throws Exception
+ private void logDOMParserFactory(BundleContext context)
{
- if (parserActivator != null)
+ ServiceReference domRef = context.getServiceReference(DocumentBuilderFactory.class.getName());
+ if (domRef != null)
{
- parserActivator.stop(context);
+ Object factory = context.getService(domRef);
+ log.log(LogService.LOG_DEBUG, "DocumentBuilderFactory: " + factory.getClass().getName());
+
+ for (String key : domRef.getPropertyKeys())
+ {
+ Object value = domRef.getProperty(key);
+ log.log(LogService.LOG_DEBUG, " " + key + "=" + value);
+ }
}
+ else
+ {
+ log.log(LogService.LOG_WARNING, "No DocumentBuilderFactory registered");
+ }
}
}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF (from rev 89486, projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF)
Modified: projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory 2009-05-28 05:30:41 UTC (rev 89486)
+++ projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF/services/javax.xml.parsers.DocumentBuilderFactory 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1 +1 @@
-org.jboss.osgi.jbossxb.internal.DocumentBuilderFactoryOSGi
\ No newline at end of file
+org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory 2009-05-28 05:30:41 UTC (rev 89486)
+++ projects/jboss-osgi/trunk/3rdparty/apache-xerces/src/main/resources/META-INF/services/javax.xml.parsers.SAXParserFactory 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1 +1 @@
-org.jboss.osgi.jbossxb.internal.SAXParserFactoryOSGi
\ No newline at end of file
+org.apache.xerces.jaxp.SAXParserFactoryImpl
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -35,6 +35,13 @@
<version>${version.javassist}</version>
</dependency>
+ <!-- Bundle Dependencies -->
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-common</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
<!-- Provided Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
@@ -56,7 +63,7 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.jbossxb.internal.Activator</Bundle-Activator>
+ <Bundle-Activator>org.jboss.osgi.jbossxb.internal.XMLBindingActivator</Bundle-Activator>
<Embed-Transitive>true</Embed-Transitive>
<Import-Package>
<!-- system -->
@@ -70,7 +77,8 @@
<!-- import -->
com.wutka.dtd,
org.apache.xerces.*,
- org.jboss.logging,
+ org.jboss.logging,
+ org.jboss.osgi.common;version=1.0,
org.jboss.util*,
org.osgi.framework,
org.osgi.service.log,
Deleted: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,68 +0,0 @@
-/*
- * 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.jbossxb.internal;
-
-//$Id$
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.parser.sax.SaxJBossXBParser;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * A {@link BundleActivator} that initializes the JBossXB bundle
- *
- * @author thomas.diesler at jboss.com
- * @since 13-May-2009
- */
-public class Activator implements BundleActivator
-{
- // Provide logging
- final Logger log = Logger.getLogger(Activator.class);
-
- public void start(BundleContext context) throws Exception
- {
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- String saxFactory = SAXParserFactory.newInstance().getClass().getName();
- String domFactory = DocumentBuilderFactory.newInstance().getClass().getName();
- log.info("JBossXB started: SAXParserFactory=" + saxFactory + ",DocumentBuilderFactory=" + domFactory);
-
- // SaxJBossXBParser initializes the SAXParserFactory in a static block
- // using SAXParserFactory.newInstance(), which internally uses the TCCL
- new SaxJBossXBParser();
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
-
- public void stop(BundleContext context) throws Exception
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/XMLBindingActivator.java (from rev 89486, projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/Activator.java)
===================================================================
--- projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/XMLBindingActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/3rdparty/jbossxb/src/main/java/org/jboss/osgi/jbossxb/internal/XMLBindingActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,73 @@
+/*
+ * 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.jbossxb.internal;
+
+//$Id$
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.jboss.osgi.common.LogServiceTracker;
+import org.jboss.xb.binding.parser.sax.SaxJBossXBParser;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+
+/**
+ * A {@link BundleActivator} that initializes the JBossXB bundle
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class XMLBindingActivator implements BundleActivator
+{
+ private LogService log;
+
+ public void start(BundleContext context) throws Exception
+ {
+ log = new LogServiceTracker(context);
+
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+ SAXParserFactory saxFactory = SAXParserFactory.newInstance();
+ log.log(LogService.LOG_DEBUG, "JBossXB SAXParserFactory: " + saxFactory);
+
+ DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+ log.log(LogService.LOG_DEBUG, "JBossXB DocumentBuilderFactory: " + domFactory);
+
+ // SaxJBossXBParser initializes the SAXParserFactory in a static block
+ // using SAXParserFactory.newInstance(), which internally uses the TCCL
+ new SaxJBossXBParser();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/blueprint/impl/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -65,7 +65,7 @@
<Import-Package>
org.apache.xerces.dom,
org.jboss.osgi.spi,
- org.jboss.osgi.common.log,
+ org.jboss.osgi.common;version=1.0,
org.jboss.xb.*,
org.osgi.framework,
org.osgi.service.log,
Modified: projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/extender/BlueprintExtender.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -29,7 +29,7 @@
import org.jboss.osgi.blueprint.context.BlueprintContextImpl;
import org.jboss.osgi.blueprint.parser.BlueprintParser;
import org.jboss.osgi.blueprint.reflect.Blueprint;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -82,11 +82,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-logging</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
<scope>provided</scope>
</dependency>
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/scripts/assembly-bundles.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -22,7 +22,6 @@
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
- <include>*:jboss-osgi-logging:jar</include>
<include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
<include>*:org.apache.felix.log:jar</include>
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/context/BlueprintContextTestCase.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -80,7 +80,9 @@
{
if (context == null)
{
- bundle.uninstall();
+ if (bundle != null)
+ bundle.uninstall();
+
runtime.shutdown();
}
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/context/context-basic.bnd
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/context/context-basic.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/context/context-basic.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -16,3 +16,5 @@
OSGI-INF/blueprint=OSGI-INF/blueprint
Test-Package: org.jboss.test.osgi.blueprint.context
+
+-removeheaders: Include-Resource
Modified: projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-05-28 12:21:21 UTC (rev 89492)
@@ -17,15 +17,15 @@
# Extra System Packages
org.osgi.framework.system.packages.extra=\
org.jboss.logging, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.management, \
- org.jboss.osgi.spi.testing, \
+ org.jboss.osgi.spi;version=1.0, \
+ org.jboss.osgi.spi.management;version=1.0, \
+ org.jboss.osgi.spi.testing;version=1.0, \
org.jboss.virtual, \
org.jboss.virtual.plugins.registry, \
org.jboss.virtual.plugins.context.jar, \
org.jboss.virtual.plugins.vfs.helpers, \
org.jboss.virtual.protocol, \
- org.osgi.framework; version\=1.4
+ org.osgi.framework;version=1.4
# Bundles that need to be installed with the Framework automatically
org.jboss.osgi.spi.framework.autoInstall=\
@@ -34,6 +34,5 @@
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar
\ No newline at end of file
Added: projects/jboss-osgi/trunk/bundles/.project
===================================================================
--- projects/jboss-osgi/trunk/bundles/.project (rev 0)
+++ projects/jboss-osgi/trunk/bundles/.project 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-bundles</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jboss-osgi/trunk/bundles/common/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/common/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -45,14 +45,17 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Bundle-Activator>org.jboss.osgi.common.internal.CommonServicesActivator</Bundle-Activator>
<Export-Package>
- org.jboss.osgi.common,
- org.jboss.osgi.common.log
+ org.jboss.osgi.common;version=${version},
+ org.jboss.osgi.common.service;version=${version},
+ org.jboss.osgi.common.log;version=${version}
</Export-Package>
<Private-Package>
- org.jboss.osgi.common.log.internal
+ org.jboss.osgi.common.internal
</Private-Package>
<Import-Package>
+ org.jboss.logging,
org.osgi.framework;version=1.4,
org.osgi.service.log;version=1.3,
org.osgi.util.tracker
Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/LogServiceTracker.java (from rev 89486, projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/LogServiceTracker.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/LogServiceTracker.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,86 @@
+/*
+ * 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.common;
+
+//$Id$
+
+import org.jboss.osgi.common.service.SystemLogService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * A combined ServiceTracker/LogService that bundles can use to access the registered LogService.
+ *
+ * If a LogService is registered, the LogServiceTracker delegates to that LogService.
+ * If there is no LogService registered, the LogServiceTracker delegates to the {@link SystemLogService}
+ *
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 11-Apr-2009
+ */
+public class LogServiceTracker extends ServiceTracker implements LogService
+{
+ private LogService log;
+
+ public LogServiceTracker(BundleContext context)
+ {
+ super(context, LogService.class.getName(), null);
+ log = new SystemLogService(context);
+ open();
+ }
+
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ log = (LogService)super.addingService(reference);
+ return log;
+ }
+
+ @Override
+ public void removedService(ServiceReference reference, Object service)
+ {
+ super.removedService(reference, service);
+ log = new SystemLogService(context);
+ }
+
+ public void log(int level, String message)
+ {
+ log.log(level, message);
+ }
+
+ public void log(int level, String message, Throwable exception)
+ {
+ log.log(level, message, exception);
+ }
+
+ public void log(ServiceReference sr, int level, String message)
+ {
+ log.log(sr, level, message);
+ }
+
+ public void log(ServiceReference sr, int level, String message, Throwable exception)
+ {
+ log.log(sr, level, message, exception);
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/CommonServicesActivator.java (from rev 89486, projects/jboss-osgi/trunk/bundles/logging/src/main/java/org/jboss/osgi/service/logging/LoggingActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/CommonServicesActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/CommonServicesActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,60 @@
+/*
+ * 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.common.internal;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogReaderService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * The common services activator
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class CommonServicesActivator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ // Track LogReaderService and add/remove LogListener
+ ServiceTracker logTracker = new ServiceTracker(context, LogReaderService.class.getName(), null)
+ {
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ LogReaderService logReader = (LogReaderService)super.addingService(reference);
+ logReader.addLogListener(new LoggingLogListener());
+ return logReader;
+ }
+ };
+ logTracker.open();
+ }
+
+ public void stop(BundleContext context)
+ {
+ // NOTE: The service is automatically unregistered.
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LogEntryImpl.java (from rev 89486, projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/internal/LogEntryImpl.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LogEntryImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LogEntryImpl.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,137 @@
+/*
+ * 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.common.internal;
+
+// $Id$
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogService;
+
+/**
+ * A unified implementation of a LogEntry.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 09-Apr-2009
+ */
+public class LogEntryImpl implements LogEntry
+{
+ private long time;
+ private int level;
+ private Bundle bundle;
+ private ServiceReference sref;
+ private String message;
+ private Throwable exception;
+
+ private String bndStr;
+ private String srefStr;
+
+ public LogEntryImpl(LogEntry le)
+ {
+ this(le.getTime(), le.getBundle(), le.getServiceReference(), le.getLevel(), le.getMessage(), le.getException());
+ }
+
+ public LogEntryImpl(long time, Bundle bundle, ServiceReference sref, int level, String message, Throwable exception)
+ {
+ this.time = time;
+ this.bundle = bundle;
+ this.sref = sref;
+ this.level = level;
+ this.message = message;
+ this.exception = exception;
+
+ if (bundle != null)
+ bndStr = bundle.getSymbolicName();
+
+ if (sref != null && sref.getBundle() != null)
+ srefStr = sref.getBundle().getSymbolicName();
+ }
+
+ public Bundle getBundle()
+ {
+ return bundle;
+ }
+
+ public Throwable getException()
+ {
+ return exception;
+ }
+
+ public int getLevel()
+ {
+ return level;
+ }
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public ServiceReference getServiceReference()
+ {
+ return sref;
+ }
+
+ public long getTime()
+ {
+ return time;
+ }
+
+ private String logLevel(int level)
+ {
+ String logLevel;
+ switch (level)
+ {
+ case LogService.LOG_DEBUG:
+ logLevel = "DEBUG";
+ break;
+ case LogService.LOG_INFO:
+ logLevel = "INFO";
+ break;
+ case LogService.LOG_WARNING:
+ logLevel = "WARN";
+ break;
+ case LogService.LOG_ERROR:
+ logLevel = "ERROR";
+ break;
+ default:
+ logLevel = "Level=" + level;
+ }
+ return logLevel;
+ }
+
+ @Override
+ public String toString()
+ {
+ String t = new SimpleDateFormat("dd-MMM-yyyy HH:mm.ss.SSS").format(new Date(time));
+ String l = " " + logLevel(level);
+ String s = srefStr != null ? ",sref=" + srefStr : "";
+ String b = ",bnd=" + bndStr;
+ String m = ",msg=" + message;
+ String e = exception != null ? ",ex=" + exception : "";
+ return "[" + t + l + b + s + m + e + "]";
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java (from rev 89486, projects/jboss-osgi/trunk/bundles/logging/src/main/java/org/jboss/osgi/service/logging/LoggingLogListener.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,61 @@
+/*
+ * 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.common.internal;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.osgi.framework.Bundle;
+import org.osgi.service.log.LogEntry;
+import org.osgi.service.log.LogListener;
+import org.osgi.service.log.LogService;
+
+/**
+ * A LogListener the logs LogEntrys to JBossLogging.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 04-Mar-2009
+ */
+public class LoggingLogListener implements LogListener
+{
+ public void logged(LogEntry entry)
+ {
+ Bundle bundle = entry.getBundle();
+ int level = entry.getLevel();
+ Throwable throwable = entry.getException();
+
+ String loggerName = bundle.getSymbolicName();
+ Logger log = Logger.getLogger(loggerName);
+
+ if (level == LogService.LOG_DEBUG)
+ log.debug(entry.getMessage(), throwable);
+
+ else if (level == LogService.LOG_INFO)
+ log.info(entry.getMessage(), throwable);
+
+ else if (level == LogService.LOG_WARNING)
+ log.warn(entry.getMessage(), throwable);
+
+ else if (level == LogService.LOG_ERROR)
+ log.error(entry.getMessage(), throwable);
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogEntryCache.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -26,7 +26,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.osgi.common.log.internal.LogEntryImpl;
+import org.jboss.osgi.common.internal.LogEntryImpl;
import org.osgi.service.log.LogEntry;
import org.osgi.service.log.LogListener;
Deleted: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/LogServiceTracker.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,85 +0,0 @@
-/*
- * 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.common.log;
-
-//$Id$
-
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * A combined ServiceTracker/LogService that bundles can use to access the registered LogService.
- *
- * If a LogService is registered, the LogServiceTracker delegates to that LogService.
- * If there is no LogService registered, the LogServiceTracker delegates to the {@link SystemLogService}
- *
- *
- * @author thomas.diesler at jboss.com
- * @since 11-Apr-2009
- */
-public class LogServiceTracker extends ServiceTracker implements LogService
-{
- private LogService log;
-
- public LogServiceTracker(BundleContext context)
- {
- super(context, LogService.class.getName(), null);
- log = new SystemLogService(context);
- open();
- }
-
- @Override
- public Object addingService(ServiceReference reference)
- {
- log = (LogService)super.addingService(reference);
- return log;
- }
-
- @Override
- public void removedService(ServiceReference reference, Object service)
- {
- super.removedService(reference, service);
- log = new SystemLogService(context);
- }
-
- public void log(int level, String message)
- {
- log.log(level, message);
- }
-
- public void log(int level, String message, Throwable exception)
- {
- log.log(level, message, exception);
- }
-
- public void log(ServiceReference sr, int level, String message)
- {
- log.log(sr, level, message);
- }
-
- public void log(ServiceReference sr, int level, String message, Throwable exception)
- {
- log.log(sr, level, message, exception);
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,115 +0,0 @@
-/*
- * 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.common.log;
-
-//$Id$
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.log.LogService;
-
-/**
- * A basic LogService that writes to System.out
- *
- * @author thomas.diesler at jboss.com
- * @since 11-Apr-2009
- */
-public class SystemLogService implements LogService
-{
- private BundleContext context;
-
- public SystemLogService(BundleContext context)
- {
- this.context = context;
- }
-
- public void log(int level, String message)
- {
- logInternal(null, level, message, null);
- }
-
- public void log(int level, String message, Throwable exception)
- {
- logInternal(null, level, message, exception);
- }
-
- public void log(ServiceReference sr, int level, String message)
- {
- logInternal(sr, level, message, null);
- }
-
- public void log(ServiceReference sr, int level, String message, Throwable exception)
- {
- logInternal(sr, level, message, exception);
- }
-
- private void logInternal(ServiceReference sref, int level, String message, Throwable exception)
- {
- long time = System.currentTimeMillis();
- Bundle bundle = context.getBundle();
-
- String bndStr = bundle.getSymbolicName();
-
- String srefStr = null;
- if (sref != null && sref.getBundle() != null)
- srefStr = sref.getBundle().getSymbolicName();
-
- String t = new SimpleDateFormat("dd-MMM-yyyy HH:mm.ss.SSS").format(new Date(time));
- String l = " " + logLevel(level);
- String s = srefStr != null ? ",sref=" + srefStr : "";
- String b = ",bnd=" + bndStr;
- String m = ",msg=" + message;
- String e = exception != null ? ",ex=" + exception : "";
-
- System.out.println("[" + t + l + b + s + m + e + "]");
-
- if (exception != null)
- exception.printStackTrace(System.out);
- }
-
- private String logLevel(int level)
- {
- String logLevel;
- switch (level)
- {
- case LogService.LOG_DEBUG:
- logLevel = "DEBUG";
- break;
- case LogService.LOG_INFO:
- logLevel = "INFO";
- break;
- case LogService.LOG_WARNING:
- logLevel = "WARN";
- break;
- case LogService.LOG_ERROR:
- logLevel = "ERROR";
- break;
- default:
- logLevel = "Level=" + level;
- }
- return logLevel;
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeploymentScanner.java (from rev 89486, projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeploymentScanner.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeploymentScanner.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,108 @@
+/*
+ * 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.common.service;
+
+//$Id$
+
+import java.net.URL;
+
+/**
+ * The DeploymentScanner service
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 27-May-2009
+ */
+public interface DeploymentScanner
+{
+ /**
+ * The property that names the scan location: org.jboss.osgi.hotdeploy.scandir
+ */
+ String PROPERTY_SCAN_LOCATION = "org.jboss.osgi.hotdeploy.scandir";
+
+ /**
+ * The property to defines the scan interval: org.jboss.osgi.hotdeploy.interval
+ */
+ String PROPERTY_SCAN_INTERVAL = "org.jboss.osgi.hotdeploy.interval";
+
+ /**
+ * Get the scan location URL.
+ *
+ * This is can be specified by setting the {@link PROPERTY_SCAN_LOCATION} property.
+ */
+ URL getScanLocation();
+
+ /**
+ * The number of scans since the service started
+ */
+ long getScanCount();
+
+ /**
+ * The number of milliseconds between scans
+ * Defaults to 2000ms
+ */
+ long getScanInterval();
+
+ /**
+ * Run a directory scan
+ */
+ void scan();
+
+ /**
+ * Returns the array of bundles currently known to the deployemtn scanner.
+ */
+ BundleInfo[] getBundles();
+
+ /**
+ * An abstraction of a bundle in the scan folder
+ *
+ */
+ interface BundleInfo
+ {
+ /**
+ * The state of the bundle
+ */
+ enum State
+ {
+ NEW, INSTALLED, ACTIVE, UNINSTALLED
+ }
+
+ /**
+ * Get the bundle location
+ */
+ URL getLocation();
+
+ /**
+ * Get the bundle state
+ */
+ State getState();
+
+ /**
+ * Get the bundle symbolic name
+ */
+ String getSymbolicName();
+
+ /**
+ * Get the bundle version
+ */
+ String getVersion();
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java (from rev 89486, projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,77 @@
+/*
+ * 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.common.service;
+
+//$Id$
+
+import java.net.URL;
+import java.util.List;
+
+/**
+ * An OSGi Service the gives access to the Kernel and MBeanServer.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public interface MicrocontainerService
+{
+ /*
+ * The name under which the system bundle context is registered: 'jboss.osgi:service=BundleContext'
+ */
+ String BEAN_SYSTEM_BUNDLE_CONTEXT = "jboss.osgi:service=BundleContext";
+
+ /*
+ * The name under which the MBeanServer is registered: 'jboss.osgi:service=MBeanServer'
+ */
+ String BEAN_MBEAN_SERVER = "jboss.osgi:service=MBeanServer";
+
+ /*
+ * The name under which the KernelController is registered: 'jboss.kernel:service=KernelController'
+ */
+ String BEAN_KERNEL_CONTROLLER = "jboss.kernel:service=KernelController";
+
+ /*
+ * The name under which the Kernel is registered: 'jboss.kernel:service=Kernel'
+ */
+ String BEAN_KERNEL = "jboss.kernel:service=Kernel";
+
+ /*
+ * * Get the list of registered beans.
+ */
+ List<String> getRegisteredBeans();
+
+ /*
+ * * Get a registered bean from the Kernel.
+ * @return null if there is no bean registered under this name
+ */
+ Object getRegisteredBean(String beanName);
+
+ /*
+ * * Deploy MC beans from URL
+ */
+ void deploy(URL url) throws Exception;
+
+ /*
+ * * Undeploy MC beans from URL
+ */
+ void undeploy(URL url) throws Exception;
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/SystemLogService.java (from rev 89486, projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/log/SystemLogService.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/SystemLogService.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/SystemLogService.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,115 @@
+/*
+ * 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.common.service;
+
+//$Id$
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+
+/**
+ * A basic LogService that writes to System.out
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 11-Apr-2009
+ */
+public class SystemLogService implements LogService
+{
+ private BundleContext context;
+
+ public SystemLogService(BundleContext context)
+ {
+ this.context = context;
+ }
+
+ public void log(int level, String message)
+ {
+ logInternal(null, level, message, null);
+ }
+
+ public void log(int level, String message, Throwable exception)
+ {
+ logInternal(null, level, message, exception);
+ }
+
+ public void log(ServiceReference sr, int level, String message)
+ {
+ logInternal(sr, level, message, null);
+ }
+
+ public void log(ServiceReference sr, int level, String message, Throwable exception)
+ {
+ logInternal(sr, level, message, exception);
+ }
+
+ private void logInternal(ServiceReference sref, int level, String message, Throwable exception)
+ {
+ long time = System.currentTimeMillis();
+ Bundle bundle = context.getBundle();
+
+ String bndStr = bundle.getSymbolicName();
+
+ String srefStr = null;
+ if (sref != null && sref.getBundle() != null)
+ srefStr = sref.getBundle().getSymbolicName();
+
+ String t = new SimpleDateFormat("dd-MMM-yyyy HH:mm.ss.SSS").format(new Date(time));
+ String l = " " + logLevel(level);
+ String s = srefStr != null ? ",sref=" + srefStr : "";
+ String b = ",bnd=" + bndStr;
+ String m = ",msg=" + message;
+ String e = exception != null ? ",ex=" + exception : "";
+
+ System.out.println("[" + t + l + b + s + m + e + "]");
+
+ if (exception != null)
+ exception.printStackTrace(System.out);
+ }
+
+ private String logLevel(int level)
+ {
+ String logLevel;
+ switch (level)
+ {
+ case LogService.LOG_DEBUG:
+ logLevel = "DEBUG";
+ break;
+ case LogService.LOG_INFO:
+ logLevel = "INFO";
+ break;
+ case LogService.LOG_WARNING:
+ logLevel = "WARN";
+ break;
+ case LogService.LOG_ERROR:
+ logLevel = "ERROR";
+ break;
+ default:
+ logLevel = "Level=" + level;
+ }
+ return logLevel;
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -8,7 +8,7 @@
<artifactId>jboss-osgi-hotdeploy</artifactId>
<packaging>bundle</packaging>
- <version>1.0.0</version>
+ <version>1.0.0.Beta2</version>
<!-- Parent -->
<parent>
@@ -51,11 +51,9 @@
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
<Bundle-Activator>org.jboss.osgi.service.hotdeploy.internal.DeploymentScannerActivator</Bundle-Activator>
<Private-Package>org.jboss.osgi.service.hotdeploy.internal</Private-Package>
- <Export-Package>
- org.jboss.osgi.service.hotdeploy;version=${version}
- </Export-Package>
<Import-Package>
- org.jboss.osgi.common.log,
+ org.jboss.osgi.common;version="1.0",
+ org.jboss.osgi.common.service;version="1.0",
org.osgi.framework,
org.osgi.service.log,
org.osgi.util.tracker
Deleted: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,111 +0,0 @@
-/*
- * 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.service.hotdeploy;
-
-import java.net.URL;
-
-import org.osgi.framework.Bundle;
-
-//$Id$
-
-/**
- * An abstraction of a bundle in the scan folder
- *
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public class BundleInfo
-{
- public enum State
- {
- NEW, INSTALLED, ACTIVE, UNINSTALLED
- };
-
- private URL location;
- private String symbolicName;
- private State state;
-
- public BundleInfo(URL bundleURL, String symbolicName, Bundle bundle)
- {
- this.symbolicName = symbolicName;
- this.location = bundleURL;
- this.state = State.NEW;
-
- if (bundle != null)
- {
- int bundleState = bundle.getState();
- switch (bundleState)
- {
- case Bundle.INSTALLED:
- case Bundle.RESOLVED:
- case Bundle.STARTING:
- case Bundle.STOPPING:
- state = State.INSTALLED;
- break;
-
- case Bundle.ACTIVE:
- state = State.ACTIVE;
- break;
-
- case Bundle.UNINSTALLED:
- state = State.UNINSTALLED;
- break;
- }
- }
- }
-
- public URL getLocation()
- {
- return location;
- }
-
- public State getState()
- {
- return state;
- }
-
- public String getSymbolicName()
- {
- return symbolicName;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if ((obj instanceof BundleInfo) == false)
- return false;
-
- BundleInfo other = (BundleInfo)obj;
- return symbolicName.equals(other.symbolicName);
- }
-
- @Override
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- public String toString()
- {
- return "[" + state + "," + symbolicName + "]";
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScanner.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,73 +0,0 @@
-/*
- * 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.service.hotdeploy;
-
-//$Id$
-
-import java.net.URL;
-
-/**
- * The DeploymentScanner service
- *
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public interface DeploymentScanner
-{
- /**
- * The property that names the scan location: org.jboss.osgi.hotdeploy.scandir
- */
- String PROPERTY_SCAN_LOCATION = "org.jboss.osgi.hotdeploy.scandir";
-
- /**
- * The property to defines the scan interval: org.jboss.osgi.hotdeploy.interval
- */
- String PROPERTY_SCAN_INTERVAL = "org.jboss.osgi.hotdeploy.interval";
-
- /**
- * Get the scan location URL.
- *
- * This is can be specified by setting the {@link PROPERTY_SCAN_LOCATION} property.
- */
- URL getScanLocation();
-
- /**
- * The number of scans since the service started
- */
- long getScanCount();
-
- /**
- * The number of milliseconds between scans
- * Defaults to 2000ms
- */
- long getScanInterval();
-
- /**
- * Run a directory scan
- */
- void scan();
-
- /**
- * Returns the array of bundles currently known to the deployemtn scanner.
- */
- BundleInfo[] getBundles();
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java (from rev 89486, projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/BundleInfo.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,123 @@
+/*
+ * 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.service.hotdeploy.internal;
+
+//$Id$
+
+import java.net.URL;
+import java.util.Dictionary;
+
+import org.jboss.osgi.common.service.DeploymentScanner.BundleInfo;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+
+
+/**
+ * An abstraction of a bundle in the scan folder
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 27-May-2009
+ */
+public class BundleInfoImpl implements BundleInfo
+{
+ private URL location;
+ private String symbolicName;
+ private String version;
+ private State state;
+
+ @SuppressWarnings("unchecked")
+ public BundleInfoImpl(URL bundleURL, String symbolicName, Bundle bundle)
+ {
+ this.symbolicName = symbolicName;
+ this.location = bundleURL;
+ this.version = "0.0.0";
+ this.state = State.NEW;
+
+ if (bundle != null)
+ {
+ Dictionary headers = bundle.getHeaders();
+ String bundleVersion = (String)headers.get(Constants.BUNDLE_VERSION);
+ if (bundleVersion != null)
+ this.version = bundleVersion;
+
+ int bundleState = bundle.getState();
+ switch (bundleState)
+ {
+ case Bundle.INSTALLED:
+ case Bundle.RESOLVED:
+ case Bundle.STARTING:
+ case Bundle.STOPPING:
+ state = State.INSTALLED;
+ break;
+
+ case Bundle.ACTIVE:
+ state = State.ACTIVE;
+ break;
+
+ case Bundle.UNINSTALLED:
+ state = State.UNINSTALLED;
+ break;
+ }
+ }
+ }
+
+ public URL getLocation()
+ {
+ return location;
+ }
+
+ public State getState()
+ {
+ return state;
+ }
+
+ public String getSymbolicName()
+ {
+ return symbolicName;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if ((obj instanceof BundleInfoImpl) == false)
+ return false;
+
+ BundleInfoImpl other = (BundleInfoImpl)obj;
+ return symbolicName.equals(other.symbolicName) && version.equals(other.version);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return toString().hashCode();
+ }
+
+ public String toString()
+ {
+ return "[" + state + "," + symbolicName + "," + version + "]";
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.service.hotdeploy.DeploymentScanner;
+import org.jboss.osgi.common.service.DeploymentScanner;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -36,10 +36,9 @@
import java.util.jar.JarFile;
import java.util.jar.Manifest;
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.service.hotdeploy.BundleInfo;
-import org.jboss.osgi.service.hotdeploy.DeploymentScanner;
-import org.jboss.osgi.service.hotdeploy.BundleInfo.State;
+import org.jboss.osgi.common.LogServiceTracker;
+import org.jboss.osgi.common.service.DeploymentScanner;
+import org.jboss.osgi.common.service.DeploymentScanner.BundleInfo.State;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
@@ -195,15 +194,15 @@
public BundleInfo[] getBundles()
{
- List<BundleInfo> bundles = new ArrayList<BundleInfo>();
+ List<BundleInfoImpl> bundles = new ArrayList<BundleInfoImpl>();
for (File file : scanLocation.listFiles())
{
String symbolicName = getSymbolicName(file);
Bundle bundle = getInstalledBundle(symbolicName);
- BundleInfo bundleInfo = new BundleInfo(toURL(file), symbolicName, bundle);
+ BundleInfoImpl bundleInfo = new BundleInfoImpl(toURL(file), symbolicName, bundle);
bundles.add(bundleInfo);
}
- BundleInfo[] arr = new BundleInfo[bundles.size()];
+ BundleInfo[] arr = new BundleInfoImpl[bundles.size()];
return bundles.toArray(arr);
}
Modified: projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/ScannerThread.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,8 +23,8 @@
//$Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.service.hotdeploy.DeploymentScanner;
+import org.jboss.osgi.common.LogServiceTracker;
+import org.jboss.osgi.common.service.DeploymentScanner;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
@@ -54,15 +54,17 @@
{
while (active == true)
{
- sleep(scanner.getScanInterval());
try
{
scanner.scan();
}
catch (RuntimeException ex)
{
- log.log(LogService.LOG_ERROR, "Hot deployment error", ex);
+ log.log(LogService.LOG_ERROR, "Deployment error", ex);
}
+
+ // Sleep for the duration of the configured interval
+ sleep(scanner.getScanInterval());
}
}
catch (InterruptedException ex)
Modified: projects/jboss-osgi/trunk/bundles/jmx/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/jmx/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/jmx/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -57,7 +57,7 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.jmx.internal.ServiceActivator</Bundle-Activator>
+ <Bundle-Activator>org.jboss.osgi.jmx.internal.MBeanServerServiceActivator</Bundle-Activator>
<Import-Package>
<!-- system -->
@@ -66,7 +66,7 @@
javax.naming.spi,
<!-- jboss-osgi -->
- org.jboss.osgi.common.log,
+ org.jboss.osgi.common;version="1.0",
<!-- osgi -->
org.osgi.framework;version=1.4,
Modified: projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/JMXConnectorService.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -36,7 +36,7 @@
import javax.management.remote.JMXServiceURL;
import org.jboss.net.sockets.DefaultSocketFactory;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Modified: projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerService.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerService.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerService.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -28,7 +28,7 @@
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
@@ -49,6 +49,7 @@
{
log = new LogServiceTracker(context);
+ // Check if there is an MBeanServer service already
ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
if (sref == null)
{
@@ -57,10 +58,16 @@
throw new IllegalStateException("Multiple MBeanServer instances not supported");
if (serverArr.size() == 1)
+ {
mbeanServer = serverArr.get(0);
+ log.log(LogService.LOG_DEBUG, "Found MBeanServer: " + mbeanServer.getDefaultDomain());
+ }
if (mbeanServer == null)
+ {
+ log.log(LogService.LOG_DEBUG, "No MBeanServer, create one ...");
mbeanServer = MBeanServerFactory.createMBeanServer();
+ }
log.log(LogService.LOG_DEBUG, "Register MBeanServer");
context.registerService(MBeanServer.class.getName(), mbeanServer, null);
Copied: projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerServiceActivator.java (from rev 89486, projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/MBeanServerServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,162 @@
+/*
+ * 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.jmx.internal;
+
+//$Id$
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerConnection;
+import javax.management.remote.JMXServiceURL;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.naming.StringRefAddr;
+
+import org.jboss.osgi.common.LogServiceTracker;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * A BundleActivator for the MBeanServer related services
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public class MBeanServerServiceActivator implements BundleActivator
+{
+ public static final String REMOTE_JMX_HOST = "org.jboss.osgi.jmx.host";
+ public static final String REMOTE_JMX_RMI_PORT = "org.jboss.osgi.jmx.rmi.port";
+ public static final String REMOTE_JMX_RMI_ADAPTOR = "org.jboss.osgi.jmx.rmi.adaptor";
+
+ private JMXConnectorService jmxConnector;
+ private String jmxHost;
+ private String jmxRmiPort;
+ private String rmiAdaptorPath;
+ private MBeanServer mbanServer;
+
+ private LogService log;
+
+ public void start(BundleContext context)
+ {
+ log = new LogServiceTracker(context);
+
+ MBeanServerService mbeanService = new MBeanServerService(context);
+ mbanServer = mbeanService.getMBeanServer();
+
+ jmxHost = context.getProperty(REMOTE_JMX_HOST);
+ if (jmxHost == null)
+ jmxHost = "localhost";
+
+ jmxRmiPort = context.getProperty(REMOTE_JMX_RMI_PORT);
+ if (jmxRmiPort == null)
+ jmxRmiPort = "1098";
+
+ rmiAdaptorPath = context.getProperty(REMOTE_JMX_RMI_ADAPTOR);
+ if (rmiAdaptorPath == null)
+ rmiAdaptorPath = "jmx/invoker/RMIAdaptor";
+
+ // Start tracking the NamingService
+ InitialContextTracker tracker = new InitialContextTracker(context, rmiAdaptorPath);
+ tracker.open();
+ }
+
+ public void stop(BundleContext context)
+ {
+ stopJMXConnectorService();
+ }
+
+ private void stopJMXConnectorService()
+ {
+ if (jmxConnector != null)
+ {
+ jmxConnector.stop();
+ jmxConnector = null;
+ }
+ }
+
+ class InitialContextTracker extends ServiceTracker
+ {
+ private String rmiAdaptorPath;
+
+ public InitialContextTracker(BundleContext context, String rmiAdaptorPath)
+ {
+ super(context, InitialContext.class.getName(), null);
+ this.rmiAdaptorPath = rmiAdaptorPath;
+ }
+
+ @Override
+ public Object addingService(ServiceReference reference)
+ {
+ InitialContext iniCtx = (InitialContext)super.addingService(reference);
+
+ // Start JMXConnectorService
+ if (jmxConnector == null)
+ {
+ jmxConnector = new JMXConnectorService(context, mbanServer, jmxHost, Integer.parseInt(jmxRmiPort));
+ jmxConnector.start();
+ }
+
+ // Bind the RMIAdaptor
+ try
+ {
+ iniCtx.createSubcontext("jmx").createSubcontext("invoker");
+ StringRefAddr addr = new StringRefAddr(JMXServiceURL.class.getName(), jmxConnector.getServiceURL().toString());
+ Reference ref = new Reference(MBeanServerConnection.class.getName(), addr, RMIAdaptorFactory.class.getName(), null);
+ iniCtx.bind(rmiAdaptorPath, ref);
+
+ log.log(LogService.LOG_INFO, "MBeanServerConnection bound to: " + rmiAdaptorPath);
+ }
+ catch (NamingException ex)
+ {
+ log.log(LogService.LOG_ERROR, "Cannot bind RMIAdoaptor", ex);
+ }
+
+ return iniCtx;
+ }
+
+ @Override
+ public void removedService(ServiceReference reference, Object service)
+ {
+ InitialContext iniCtx = (InitialContext)service;
+
+ // Stop JMXConnectorService
+ stopJMXConnectorService();
+
+ // Unbind the RMIAdaptor
+ try
+ {
+ iniCtx.unbind(rmiAdaptorPath);
+
+ log.log(LogService.LOG_INFO, "MBeanServerConnection unbound from: " + rmiAdaptorPath);
+ }
+ catch (NamingException ex)
+ {
+ log.log(LogService.LOG_ERROR, "Cannot unbind RMIAdoaptor", ex);
+ }
+
+ super.removedService(reference, service);
+ }
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/jmx/src/main/java/org/jboss/osgi/jmx/internal/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,162 +0,0 @@
-/*
- * 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.jmx.internal;
-
-//$Id$
-
-import javax.management.MBeanServer;
-import javax.management.MBeanServerConnection;
-import javax.management.remote.JMXServiceURL;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.naming.StringRefAddr;
-
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.log.LogService;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * A BundleActivator for the MBeanServer related services
- *
- * @author thomas.diesler at jboss.com
- * @since 24-Apr-2009
- */
-public class ServiceActivator implements BundleActivator
-{
- public static final String REMOTE_JMX_HOST = "org.jboss.osgi.jmx.host";
- public static final String REMOTE_JMX_RMI_PORT = "org.jboss.osgi.jmx.rmi.port";
- public static final String REMOTE_JMX_RMI_ADAPTOR = "org.jboss.osgi.jmx.rmi.adaptor";
-
- private JMXConnectorService jmxConnector;
- private String jmxHost;
- private String jmxRmiPort;
- private String rmiAdaptorPath;
- private MBeanServer mbanServer;
-
- private LogService log;
-
- public void start(BundleContext context)
- {
- log = new LogServiceTracker(context);
-
- MBeanServerService mbeanService = new MBeanServerService(context);
- mbanServer = mbeanService.getMBeanServer();
-
- jmxHost = context.getProperty(REMOTE_JMX_HOST);
- if (jmxHost == null)
- jmxHost = "localhost";
-
- jmxRmiPort = context.getProperty(REMOTE_JMX_RMI_PORT);
- if (jmxRmiPort == null)
- jmxRmiPort = "1098";
-
- rmiAdaptorPath = context.getProperty(REMOTE_JMX_RMI_ADAPTOR);
- if (rmiAdaptorPath == null)
- rmiAdaptorPath = "jmx/invoker/RMIAdaptor";
-
- // Start tracking the NamingService
- NamingServiceTracker tracker = new NamingServiceTracker(context, rmiAdaptorPath);
- tracker.open();
- }
-
- public void stop(BundleContext context)
- {
- stopJMXConnectorService();
- }
-
- private void stopJMXConnectorService()
- {
- if (jmxConnector != null)
- {
- jmxConnector.stop();
- jmxConnector = null;
- }
- }
-
- class NamingServiceTracker extends ServiceTracker
- {
- private String rmiAdaptorPath;
-
- public NamingServiceTracker(BundleContext context, String rmiAdaptorPath)
- {
- super(context, InitialContext.class.getName(), null);
- this.rmiAdaptorPath = rmiAdaptorPath;
- }
-
- @Override
- public Object addingService(ServiceReference reference)
- {
- InitialContext iniCtx = (InitialContext)super.addingService(reference);
-
- // Start JMXConnectorService
- if (jmxConnector == null)
- {
- jmxConnector = new JMXConnectorService(context, mbanServer, jmxHost, Integer.parseInt(jmxRmiPort));
- jmxConnector.start();
- }
-
- // Bind the RMIAdaptor
- try
- {
- iniCtx.createSubcontext("jmx").createSubcontext("invoker");
- StringRefAddr addr = new StringRefAddr(JMXServiceURL.class.getName(), jmxConnector.getServiceURL().toString());
- Reference ref = new Reference(MBeanServerConnection.class.getName(), addr, RMIAdaptorFactory.class.getName(), null);
- iniCtx.bind(rmiAdaptorPath, ref);
-
- log.log(LogService.LOG_INFO, "MBeanServerConnection bound to: " + rmiAdaptorPath);
- }
- catch (NamingException ex)
- {
- log.log(LogService.LOG_ERROR, "Cannot bind RMIAdoaptor", ex);
- }
-
- return iniCtx;
- }
-
- @Override
- public void removedService(ServiceReference reference, Object service)
- {
- InitialContext iniCtx = (InitialContext)service;
-
- // Stop JMXConnectorService
- stopJMXConnectorService();
-
- // Unbind the RMIAdaptor
- try
- {
- iniCtx.unbind(rmiAdaptorPath);
-
- log.log(LogService.LOG_INFO, "MBeanServerConnection unbound from: " + rmiAdaptorPath);
- }
- catch (NamingException ex)
- {
- log.log(LogService.LOG_ERROR, "Cannot unbind RMIAdoaptor", ex);
- }
-
- super.removedService(reference, service);
- }
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/jndi/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/jndi/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/jndi/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -59,13 +59,13 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.jndi.internal.ServiceActivator</Bundle-Activator>
+ <Bundle-Activator>org.jboss.osgi.jndi.internal.InitialContextServiceActivator</Bundle-Activator>
<Import-Package>
javax.naming*,
javax.net,
org.jboss.logging,
org.jboss.net.sockets,
- org.jboss.osgi.common.log,
+ org.jboss.osgi.common;version="1.0",
org.jboss.util.naming,
org.jboss.util.threadpool,
org.osgi.framework,
Copied: projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/InitialContextServiceActivator.java (from rev 89486, projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/InitialContextServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/InitialContextServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,88 @@
+/*
+ * 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.jndi.internal;
+
+//$Id$
+
+import javax.naming.InitialContext;
+
+import org.jboss.osgi.common.LogServiceTracker;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.log.LogService;
+
+/**
+ * A BundleActivator for the JNDI related services
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public class InitialContextServiceActivator implements BundleActivator
+{
+ public static final String REMOTE_JNDI_HOST = "org.jboss.osgi.jndi.host";
+ public static final String REMOTE_JNDI_RMI_PORT = "org.jboss.osgi.jndi.rmi.port";
+ public static final String REMOTE_JNDI_PORT = "org.jboss.osgi.jndi.port";
+
+ private ServiceRegistration registration;
+ private JNPServer jnpServer;
+ private LogService log;
+
+ public void start(BundleContext context)
+ {
+ log = new LogServiceTracker(context);
+
+ String jndiHost = context.getProperty(REMOTE_JNDI_HOST);
+ if (jndiHost == null)
+ jndiHost = "localhost";
+
+ String jndiRmiPort = context.getProperty(REMOTE_JNDI_RMI_PORT);
+ if (jndiRmiPort == null)
+ jndiRmiPort = "1098";
+
+ String jndiPort = context.getProperty(REMOTE_JNDI_PORT);
+ if (jndiPort == null)
+ jndiPort = "1099";
+
+ jnpServer = new JNPServer(context, jndiHost, Integer.parseInt(jndiPort), Integer.parseInt(jndiRmiPort));
+ jnpServer.start();
+
+ InitialContextFactory serviceFactory = new InitialContextFactory(jndiHost, jndiPort);
+ registration = context.registerService(InitialContext.class.getName(), serviceFactory, null);
+ log.log(LogService.LOG_DEBUG, "InitialContext registered");
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+
+ if (jnpServer != null)
+ {
+ jnpServer.stop();
+ jnpServer = null;
+ }
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/JNPServer.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -33,7 +33,7 @@
import javax.naming.NamingException;
import org.jboss.net.sockets.DefaultSocketFactory;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jnp.interfaces.Naming;
import org.jnp.server.Main;
import org.jnp.server.NamingBean;
Deleted: projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/jndi/src/main/java/org/jboss/osgi/jndi/internal/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,88 +0,0 @@
-/*
- * 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.jndi.internal;
-
-//$Id$
-
-import javax.naming.InitialContext;
-
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.log.LogService;
-
-/**
- * A BundleActivator for the JNDI related services
- *
- * @author thomas.diesler at jboss.com
- * @since 24-Apr-2009
- */
-public class ServiceActivator implements BundleActivator
-{
- public static final String REMOTE_JNDI_HOST = "org.jboss.osgi.jndi.host";
- public static final String REMOTE_JNDI_RMI_PORT = "org.jboss.osgi.jndi.rmi.port";
- public static final String REMOTE_JNDI_PORT = "org.jboss.osgi.jndi.port";
-
- private ServiceRegistration registration;
- private JNPServer jnpServer;
- private LogService log;
-
- public void start(BundleContext context)
- {
- log = new LogServiceTracker(context);
-
- String jndiHost = context.getProperty(REMOTE_JNDI_HOST);
- if (jndiHost == null)
- jndiHost = "localhost";
-
- String jndiRmiPort = context.getProperty(REMOTE_JNDI_RMI_PORT);
- if (jndiRmiPort == null)
- jndiRmiPort = "1098";
-
- String jndiPort = context.getProperty(REMOTE_JNDI_PORT);
- if (jndiPort == null)
- jndiPort = "1099";
-
- jnpServer = new JNPServer(context, jndiHost, Integer.parseInt(jndiPort), Integer.parseInt(jndiRmiPort));
- jnpServer.start();
-
- InitialContextFactory serviceFactory = new InitialContextFactory(jndiHost, jndiPort);
- registration = context.registerService(InitialContext.class.getName(), serviceFactory, null);
- log.log(LogService.LOG_DEBUG, "InitialContext registered");
- }
-
- public void stop(BundleContext context)
- {
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
-
- if (jnpServer != null)
- {
- jnpServer.stop();
- jnpServer = null;
- }
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/bundles/logging/.classpath
===================================================================
--- projects/jboss-osgi/trunk/bundles/logging/.classpath 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/logging/.classpath 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
Modified: projects/jboss-osgi/trunk/bundles/logging/.project
===================================================================
--- projects/jboss-osgi/trunk/bundles/logging/.project 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/logging/.project 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-osgi-service-logging</name>
+ <name>jboss-osgi-logging</name>
<comment></comment>
<projects>
</projects>
Added: projects/jboss-osgi/trunk/bundles/logging/bin/.project
===================================================================
--- projects/jboss-osgi/trunk/bundles/logging/bin/.project (rev 0)
+++ projects/jboss-osgi/trunk/bundles/logging/bin/.project 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-logging</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Deleted: projects/jboss-osgi/trunk/bundles/logging/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/logging/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/logging/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>JBossOSGi Bundles - Logging</name>
-
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-logging</artifactId>
- <packaging>bundle</packaging>
-
- <version>1.0.0.Beta2</version>
-
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-bundles</artifactId>
- <version>1.0.0.Beta2</version>
- </parent>
-
- <!-- Dependencies -->
- <dependencies>
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- OSGi Dependencies -->
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.service.logging.LoggingActivator</Bundle-Activator>
- <Private-Package>org.jboss.osgi.service.logging</Private-Package>
- <Import-Package>
- org.jboss.logging,
- org.osgi.framework,
- org.osgi.service.log,
- org.osgi.util.tracker
- </Import-Package>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
Modified: projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -76,7 +76,7 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
- <Bundle-Activator>org.jboss.osgi.microcontainer.internal.ServiceActivator</Bundle-Activator>
+ <Bundle-Activator>org.jboss.osgi.microcontainer.internal.MicrocontainerServiceActivator</Bundle-Activator>
<Export-Package>
org.jboss.osgi.microcontainer;version=${version.jboss.microcontainer}
</Export-Package>
@@ -104,9 +104,10 @@
org.jboss.deployers.*,
org.jboss.joinpoint.*,
org.jboss.logging,
- org.jboss.osgi.common.log,
- org.jboss.osgi.spi,
- org.jboss.osgi.spi.management,
+ org.jboss.osgi.common;version="1.0",
+ org.jboss.osgi.common.service;version="1.0",
+ org.jboss.osgi.spi;version="1.0",
+ org.jboss.osgi.spi.management;version="1.0",
org.jboss.reflect.*,
org.jboss.util.*,
org.jboss.virtual*,
Deleted: projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,84 +0,0 @@
-/*
- * 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.microcontainer;
-
-//$Id$
-
-import java.net.URL;
-import java.util.List;
-
-import org.jboss.kernel.Kernel;
-
-/**
- * An OSGi Service the gives access to the Kernel and MBeanServer.
- *
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public interface MicrocontainerService
-{
- /*
- * The name under which the system bundle context is registered: 'jboss.osgi:service=BundleContext'
- */
- String BEAN_SYSTEM_BUNDLE_CONTEXT = "jboss.osgi:service=BundleContext";
-
- /*
- * The name under which the MBeanServer is registered: 'jboss.osgi:service=MBeanServer'
- */
- String BEAN_MBEAN_SERVER = "jboss.osgi:service=MBeanServer";
-
- /*
- * The name under which the KernelController is registered: 'jboss.kernel:service=KernelController'
- */
- String BEAN_KERNEL_CONTROLLER = "jboss.kernel:service=KernelController";
-
- /*
- * The name under which the Kernel is registered: 'jboss.kernel:service=Kernel'
- */
- String BEAN_KERNEL = "jboss.kernel:service=Kernel";
-
- /*
- * Get the Microcontainer Kernel
- */
- Kernel getKernel();
-
- /*
- * * Get the list of registered beans.
- */
- List<String> getRegisteredBeans();
-
- /*
- * * Get a registered bean from the Kernel.
- * @return null if there is no bean registered under this name
- */
- Object getRegisteredBean(String beanName);
-
- /*
- * * Deploy MC beans from URL
- */
- void deploy(URL url) throws Exception;
-
- /*
- * * Undeploy MC beans from URL
- */
- void undeploy(URL url) throws Exception;
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/EmbeddedBeansDeployer.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -27,7 +27,7 @@
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Copied: projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java (from rev 89486, projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,60 @@
+/*
+ * 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.microcontainer.internal;
+
+//$Id$
+
+import org.jboss.osgi.common.service.MicrocontainerService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A BundleActivator that registers the {@link MicrocontainerService}
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public class MicrocontainerServiceActivator implements BundleActivator
+{
+ private MicrocontainerServiceImpl mcService;
+
+ public void start(BundleContext context)
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ try
+ {
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ mcService = new MicrocontainerServiceImpl(context);
+ mcService.start();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(ctxLoader);
+ }
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (mcService != null)
+ mcService.stop();
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -48,8 +48,8 @@
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.jboss.osgi.common.LogServiceTracker;
+import org.jboss.osgi.common.service.MicrocontainerService;
import org.jboss.osgi.microcontainer.MicrocontainerServiceMBean;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
@@ -152,15 +152,15 @@
void start()
{
final MicrocontainerService mcService = this;
-
+
final Kernel kernel = getKernel();
final KernelController controller = kernel.getController();
-
+
// Preregister some beans
installBean(controller, BEAN_SYSTEM_BUNDLE_CONTEXT, context);
installBean(controller, BEAN_KERNEL, kernel);
installBean(controller, BEAN_KERNEL_CONTROLLER, controller);
-
+
// Register the MicrocontainerServiceMBean
ServiceTracker tracker = new ServiceTracker(context, MBeanServer.class.getName(), null)
{
@@ -170,27 +170,18 @@
// Install the MBeanServer
MBeanServer mbeanServer = (MBeanServer)super.addingService(reference);
installBean(controller, BEAN_MBEAN_SERVER, mbeanServer);
-
+
// Deploy the deployer beans
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- URL deployersURL = context.getBundle().getResource("META-INF/base-deployers-beans.xml");
- deployer.deploy(deployersURL);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
+ URL deployersURL = context.getBundle().getResource("META-INF/base-deployers-beans.xml");
+ deployer.deploy(deployersURL);
// Register the MicrocontainerService
log.log(LogService.LOG_DEBUG, "Register MicrocontainerService");
context.registerService(MicrocontainerService.class.getName(), mcService, null);
-
+
// Register the MicrocontainerServiceMBean
registerMicrocontainerServiceMBean(mbeanServer);
-
+
return mbeanServer;
}
};
@@ -218,7 +209,7 @@
throw new IllegalStateException("Cannot register bean: " + beanName, ex);
}
}
-
+
private void registerMicrocontainerServiceMBean(MBeanServer mbeanServer)
{
// Register the MicrocontainerServiceMBean
Deleted: projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,60 +0,0 @@
-/*
- * 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.microcontainer.internal;
-
-//$Id$
-
-import org.jboss.osgi.microcontainer.MicrocontainerService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * A BundleActivator that registers the {@link MicrocontainerService}
- *
- * @author thomas.diesler at jboss.com
- * @since 24-Apr-2009
- */
-public class ServiceActivator implements BundleActivator
-{
- private MicrocontainerServiceImpl mcService;
-
- public void start(BundleContext context)
- {
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- try
- {
- Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
- mcService = new MicrocontainerServiceImpl(context);
- mcService.start();
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(ctxLoader);
- }
- }
-
- public void stop(BundleContext context)
- {
- if (mcService != null)
- mcService.stop();
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/bundles/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundles/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/bundles/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -20,7 +20,6 @@
<modules>
<!-- jboss-osgi -->
<module>common</module>
- <module>logging</module>
<module>hotdeploy</module>
<module>jmx</module>
<module>jndi</module>
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -112,10 +112,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
</dependency>
<dependency>
Modified: projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/distribution/runtime/conf/jboss-osgi-felix.properties 2009-05-28 12:21:21 UTC (rev 89492)
@@ -42,10 +42,10 @@
org.osgi.framework.system.packages.extra=\
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.logging, \
- org.jboss.osgi.spi.management, \
- org.jboss.osgi.spi.testing, \
+ org.jboss.osgi.spi;version=1.0, \
+ org.jboss.osgi.spi.logging;version=1.0, \
+ org.jboss.osgi.spi.management;version=1.0, \
+ org.jboss.osgi.spi.testing;version=1.0, \
org.jboss.virtual, \
org.jboss.virtual.plugins.registry, \
org.jboss.virtual.plugins.context.jar, \
@@ -72,5 +72,6 @@
org.jboss.osgi.spi.framework.autoStart=\
file://${osgi.home}/bundles/org.apache.felix.log.jar \
file://${osgi.home}/bundles/jboss-osgi-common.jar \
- file://${osgi.home}/bundles/jboss-osgi-logging.jar \
+ file://${osgi.home}/bundles/jboss-osgi-jmx.jar \
+ file://${osgi.home}/bundles/jboss-osgi-microcontainer.jar \
file://${osgi.home}/bundles/jboss-osgi-hotdeploy.jar
Modified: projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/distribution/src/main/resources/installer/install-definition.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -115,7 +115,6 @@
<include name="jboss-osgi-runtime-felix.jar" />
<include name="jboss-osgi-spi.jar" />
<include name="jboss-osgi-common.jar" />
- <include name="jboss-osgi-logging.jar" />
<include name="jboss-osgi-webconsole.jar" />
<include name="org.apache.felix.framework.jar" />
<include name="org.apache.felix.configadmin.jar" />
@@ -132,7 +131,6 @@
<include name="jboss-osgi-runtime-felix-sources.jar" />
<include name="jboss-osgi-spi-sources.jar" />
<include name="jboss-osgi-common-sources.jar" />
- <include name="jboss-osgi-logging-sources.jar" />
<include name="jboss-osgi-webconsole-sources.jar" />
</fileset>
@@ -176,7 +174,6 @@
<include name="jboss-osgi-jaxb.jar" />
<include name="jboss-osgi-common-core.jar" />
<include name="jboss-osgi-common.jar" />
- <include name="jboss-osgi-logging.jar" />
<include name="jboss-osgi-hotdeploy.jar" />
<include name="jboss-osgi-jndi.jar" />
<include name="jboss-osgi-jmx.jar" />
@@ -258,7 +255,6 @@
<include name="org.apache.felix.log.jar" />
<include name="org.apache.felix.metatype.jar" />
<include name="jboss-osgi-common.jar" />
- <include name="jboss-osgi-logging.jar" />
<include name="jboss-osgi-webconsole.jar" />
</fileset>
Modified: projects/jboss-osgi/trunk/husky/harness/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/harness/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/husky/harness/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-husky-parent</artifactId>
- <version>1.0.0</version>
+ <version>1.0.0.Beta2</version>
</parent>
<!-- Dependencies -->
Modified: projects/jboss-osgi/trunk/husky/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/husky/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -22,7 +22,7 @@
<artifactId>jboss-osgi-husky-parent</artifactId>
<packaging>pom</packaging>
- <version>1.0.0</version>
+ <version>1.0.0.Beta2</version>
<!-- Parent -->
<parent>
Modified: projects/jboss-osgi/trunk/husky/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/husky/testsuite/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-husky-parent</artifactId>
- <version>1.0.0</version>
+ <version>1.0.0.Beta2</version>
</parent>
<!-- Dependencies -->
@@ -68,11 +68,6 @@
<artifactId>jboss-osgi-jmx</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-logging</artifactId>
- <scope>provided</scope>
- </dependency>
</dependencies>
<build>
Modified: projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/husky/testsuite/scripts/assembly-bundles.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -18,7 +18,6 @@
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-husky:jar</include>
- <include>*:jboss-osgi-logging:jar</include>
<include>*:org.apache.felix.log:jar</include>
<include>*:org.osgi.compendium:jar</include>
</includes>
Modified: projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/husky/testsuite/src/test/resources/jboss-osgi-felix.properties 2009-05-28 12:21:21 UTC (rev 89492)
@@ -21,9 +21,9 @@
# Extra System Packages
org.osgi.framework.system.packages.extra=\
org.jboss.logging, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.testing, \
- org.osgi.framework; version\=1.4
+ org.jboss.osgi.spi;version=1.0, \
+ org.jboss.osgi.spi.testing;version=1.0, \
+ org.osgi.framework;version=1.4
# Bundles that need to be installed with the Framework automatically
org.jboss.osgi.spi.framework.autoInstall=\
@@ -32,5 +32,4 @@
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar
Added: projects/jboss-osgi/trunk/integration/.project
===================================================================
--- projects/jboss-osgi/trunk/integration/.project (rev 0)
+++ projects/jboss-osgi/trunk/integration/.project 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-integration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -9,6 +9,15 @@
<version>1.0.0.Beta2</version>
+ <url>http://www.jboss.org/community/wiki/JBossOSGi</url>
+ <description>JBossOSGi</description>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi</developerConnection>
+ <url>http://fisheye.jboss.com/qsearch/JBossOSGi</url>
+ </scm>
+
<!-- Modules -->
<modules>
<module>spi</module>
@@ -52,13 +61,12 @@
<version.jboss.osgi.common>1.0.0.Beta2</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.11</version.jboss.osgi.common.core>
<version.jboss.osgi.deployers>1.0.0.Beta2</version.jboss.osgi.deployers>
- <version.jboss.osgi.hotdeploy>1.0.0</version.jboss.osgi.hotdeploy>
- <version.jboss.osgi.husky>1.0.0</version.jboss.osgi.husky>
+ <version.jboss.osgi.hotdeploy>1.0.0.Beta2</version.jboss.osgi.hotdeploy>
+ <version.jboss.osgi.husky>1.0.0.Beta2</version.jboss.osgi.husky>
<version.jboss.osgi.integration.jbossas>1.0.0.Beta2</version.jboss.osgi.integration.jbossas>
<version.jboss.osgi.jaxb>2.1.10</version.jboss.osgi.jaxb>
<version.jboss.osgi.jmx>1.0.0.Beta2</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.0.Beta2</version.jboss.osgi.jndi>
- <version.jboss.osgi.logging>1.0.0.Beta2</version.jboss.osgi.logging>
<version.jboss.osgi.microcontainer>1.0.0.Beta2</version.jboss.osgi.microcontainer>
<version.jboss.osgi.remotelog>1.0.0.Beta2</version.jboss.osgi.remotelog>
<version.jboss.osgi.runtime.equinox>1.0.0.Beta2</version.jboss.osgi.runtime.equinox>
@@ -127,11 +135,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-logging</artifactId>
- <version>${version.jboss.osgi.logging}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
<version>${version.jboss.osgi.microcontainer}</version>
</dependency>
@@ -380,6 +383,20 @@
</configuration>
</plugin>
<plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <manifestEntries>
+ <Implementation-URL>${url}</Implementation-URL>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
@@ -460,14 +477,6 @@
</pluginRepository>
</pluginRepositories>
- <!-- Source Repository -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi
- </developerConnection>
- <url>http://fisheye.jboss.com/qsearch/JBossOSGi</url>
- </scm>
-
<!-- Licenses -->
<licenses>
<license>
@@ -646,6 +655,17 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
+ <!--
+ You can copy these properties in Eclipse to debug the tests
+
+ -Djava.protocol.handler.pkgs=org.jboss.net.protocol|org.jboss.virtual.protocol
+ -Djndi.server.port=1199
+ -Dlog4j.output.dir=${workspace_loc:jboss-osgi-testsuite-example/target}
+ -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeAwareParserConfiguration
+ -Djboss.osgi.framework.properties=jboss-osgi-felix.properties
+ -Dorg.jboss.osgi.husky.Invoker=org.jboss.osgi.husky.internal.OSGiInvoker
+ -Dtest.archive.directory=${workspace_loc:jboss-osgi-testsuite-example/target}/test-libs
+ -->
<property>
<name>java.protocol.handler.pkgs</name>
<value>org.jboss.net.protocol|org.jboss.virtual.protocol</value>
@@ -659,14 +679,16 @@
<value>${project.build.directory}</value>
</property>
<property>
+ <name>jboss.osgi.framework.properties</name>
+ <value>${jboss.osgi.framework.properties}</value>
+ </property>
+ <!--
+ <property>
<name>org.apache.xerces.xni.parser.XMLParserConfiguration</name>
<value>org.apache.xerces.parsers.XIncludeAwareParserConfiguration</value>
</property>
+ -->
<property>
- <name>jboss.osgi.framework.properties</name>
- <value>${jboss.osgi.framework.properties}</value>
- </property>
- <property>
<name>org.jboss.osgi.husky.Invoker</name>
<value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
</property>
Added: projects/jboss-osgi/trunk/runtime/.project
===================================================================
--- projects/jboss-osgi/trunk/runtime/.project (rev 0)
+++ projects/jboss-osgi/trunk/runtime/.project 2009-05-28 12:21:21 UTC (rev 89492)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jboss-osgi-runtime</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/assembly-bundles.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -21,7 +21,6 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
- <include>*:jboss-osgi-logging:jar</include>
<include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-remotelog:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceA.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/log/bundle/ServiceA.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -25,7 +25,7 @@
import static org.osgi.service.log.LogService.LOG_INFO;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,9 +23,9 @@
//$Id$
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_KERNEL;
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_MBEAN_SERVER;
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
+import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_KERNEL;
+import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_MBEAN_SERVER;
+import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
import static org.jboss.osgi.microcontainer.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
import static org.jboss.osgi.spi.management.ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK;
import static org.junit.Assert.assertFalse;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,9 +23,9 @@
//$Id$
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
+import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
-import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.jboss.osgi.common.service.MicrocontainerService;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/jboss-osgi-felix.properties 2009-05-28 12:21:21 UTC (rev 89492)
@@ -18,15 +18,15 @@
org.osgi.framework.system.packages.extra=\
org.jboss.logging, \
org.jboss.net.protocol, \
- org.jboss.osgi.spi, \
- org.jboss.osgi.spi.logging, \
- org.jboss.osgi.spi.management, \
+ org.jboss.osgi.spi;version=1.0, \
+ org.jboss.osgi.spi.logging;version=1.0, \
+ org.jboss.osgi.spi.management;version=1.0, \
org.jboss.virtual, \
org.jboss.virtual.plugins.registry, \
org.jboss.virtual.plugins.context.jar, \
org.jboss.virtual.plugins.vfs.helpers, \
org.jboss.virtual.protocol, \
- org.osgi.framework;version\=1.4, \
+ org.osgi.framework;version=1.4, \
org.apache.log4j, \
org.jboss.util, \
org.jboss.util.id, \
@@ -47,5 +47,4 @@
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,6 +1,9 @@
# bnd build -classpath target/test-classes -output target/test-libs/example-mcservice-bundleA.jar src/test/resources/mcservice/example-mcservice-bundleA.bnd
Bundle-SymbolicName: example-mcservice-bundleA
+
Bundle-Activator: org.jboss.test.osgi.example.microcontainer.bundleA.ServiceActivator
+
Export-Package: org.jboss.test.osgi.example.microcontainer.bundleA
-Import-Package: org.jboss.osgi.microcontainer, org.osgi.framework
+
+Import-Package: org.jboss.osgi.common.service, org.osgi.framework
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -1,6 +1,10 @@
# bnd build -classpath target/test-classes -output target/test-libs/mcservice-bundleB.jar src/test/resources/mcservice/mcservice-bundleB.bnd
Bundle-SymbolicName: example-mcservice-bundleB
+
Export-Package: org.jboss.test.osgi.example.microcontainer.bundleB
+
Import-Package: javax.management
-Include-Resource: META-INF/mcservice-jboss-beans.xml=META-INF/mcservice-jboss-beans.xml
\ No newline at end of file
+
+Include-Resource: META-INF/mcservice-jboss-beans.xml=META-INF/mcservice-jboss-beans.xml
+-removeheaders: Include-Resource
Modified: projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/functional/scripts/assembly-bundles.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -21,7 +21,6 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
- <include>*:jboss-osgi-logging:jar</include>
<include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-remotelog:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceA.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id: ServiceA.java 87351 2009-04-15 14:25:32Z thomas.diesler at jboss.com $
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.jbosgi37.subA.PojoA;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceB.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id: ServiceB.java 87351 2009-04-15 14:25:32Z thomas.diesler at jboss.com $
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.jbosgi37.subB.PojoB;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceA.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceA.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -28,7 +28,7 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceB.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceB.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -27,7 +27,7 @@
import java.util.Dictionary;
import java.util.Hashtable;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.Configuration;
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/bundle/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/bundle/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/startlevel/bundle/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id: ServiceActivator.java 87336 2009-04-15 11:31:26Z thomas.diesler at jboss.com $
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jboss-osgi-felix.properties 2009-05-28 12:21:21 UTC (rev 89492)
@@ -12,7 +12,7 @@
org.osgi.framework.storage.clean=onFirstInit
# Framework bootdelegation
-org.osgi.framework.bootdelegation=org.osgi.service.log
+# org.osgi.framework.bootdelegation=org.osgi.service.log
# Extra System Packages
org.osgi.framework.system.packages.extra=\
@@ -41,11 +41,10 @@
# org.jboss.util.propertyeditor
# Bundles that need to be installed with the Framework automatically
-org.jboss.osgi.spi.framework.autoInstall=\
- file://${test.archive.directory}/bundles/org.osgi.compendium.jar
+# org.jboss.osgi.spi.framework.autoInstall=
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
+ file://${test.archive.directory}/bundles/org.osgi.compendium.jar \
file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -88,11 +88,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-logging</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-microcontainer</artifactId>
<scope>provided</scope>
</dependency>
@@ -101,6 +96,8 @@
<artifactId>jboss-osgi-remotelog</artifactId>
<scope>provided</scope>
</dependency>
+
+ <!-- OSGi Dependencies -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/scripts/assembly-bundles.xml 2009-05-28 12:21:21 UTC (rev 89492)
@@ -21,7 +21,6 @@
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
<include>*:jboss-osgi-jndi:jar</include>
- <include>*:jboss-osgi-logging:jar</include>
<include>*:jboss-osgi-microcontainer:jar</include>
<include>*:jboss-osgi-remotelog:jar</include>
<include>*:jboss-osgi-xml-binding:jar</include>
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/HttpRenderServlet.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/HttpRenderServlet.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/HttpRenderServlet.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -34,7 +34,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.trailblazer.ShoppingMall;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/frontend/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/mall/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/mall/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/mall/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.trailblazer.ShoppingMall;
import org.jboss.test.osgi.trailblazer.frontend.HttpRenderServlet;
import org.osgi.framework.BundleActivator;
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/creditcard/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -25,7 +25,7 @@
import java.util.Hashtable;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.trailblazer.PaymentService;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/pay/paypal/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -25,7 +25,7 @@
import java.util.Hashtable;
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.trailblazer.PaymentService;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/pets/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.trailblazer.Shop;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/java/org/jboss/test/osgi/trailblazer/shop/sports/ServiceActivator.java 2009-05-28 12:21:21 UTC (rev 89492)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.common.LogServiceTracker;
import org.jboss.test.osgi.trailblazer.Shop;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties 2009-05-28 12:21:21 UTC (rev 89492)
@@ -47,5 +47,4 @@
# Bundles that need to be started automatically
org.jboss.osgi.spi.framework.autoStart=\
file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- file://${test.archive.directory}/bundles/jboss-osgi-logging.jar
\ No newline at end of file
+ file://${test.archive.directory}/bundles/jboss-osgi-common.jar
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/frontend.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/frontend.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/frontend.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -14,8 +14,11 @@
org.osgi.service.http, \
org.osgi.service.log, \
org.osgi.util.tracker, \
- org.jboss.osgi.common.log
+ org.jboss.osgi.common
Include-Resource: \
style/osgishop.css=../META-INF/style/osgishop.css, \
- notes=../META-INF/notes
\ No newline at end of file
+ notes=../META-INF/notes
+
+-removeheaders: Include-Resource
+
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/mall.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/mall.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/mall.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -9,6 +9,6 @@
Import-Package: \
org.osgi.framework, \
org.osgi.service.log, \
- org.jboss.osgi.common.log, \
+ org.jboss.osgi.common, \
org.jboss.test.osgi.trailblazer
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-creditcard.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-creditcard.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-creditcard.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -8,5 +8,5 @@
Import-Package: \
org.osgi.framework, \
org.osgi.service.log, \
- org.jboss.osgi.common.log, \
+ org.jboss.osgi.common, \
org.jboss.test.osgi.trailblazer
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-paypal.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-paypal.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/pay-paypal.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -8,5 +8,5 @@
Import-Package: \
org.osgi.framework, \
org.osgi.service.log, \
- org.jboss.osgi.common.log, \
+ org.jboss.osgi.common, \
org.jboss.test.osgi.trailblazer
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-pets.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-pets.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-pets.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -8,5 +8,5 @@
Import-Package: \
org.osgi.framework, \
org.osgi.service.log, \
- org.jboss.osgi.common.log, \
+ org.jboss.osgi.common, \
org.jboss.test.osgi.trailblazer
Modified: projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-sports.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-sports.bnd 2009-05-28 11:32:08 UTC (rev 89491)
+++ projects/jboss-osgi/trunk/testsuite/trailblazer/src/test/resources/trailblazer/shop-sports.bnd 2009-05-28 12:21:21 UTC (rev 89492)
@@ -10,5 +10,5 @@
org.osgi.framework, \
org.osgi.service.log, \
org.jboss.osgi.jndi, \
- org.jboss.osgi.common.log, \
+ org.jboss.osgi.common, \
org.jboss.test.osgi.trailblazer
More information about the jboss-osgi-commits
mailing list