JBoss-OSGI SVN: r100121 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle and 8 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-29 09:29:43 -0500 (Fri, 29 Jan 2010)
New Revision: 100121
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java
Removed:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
Log:
Fix initial AS integration issues
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-01-29 14:29:43 UTC (rev 100121)
@@ -62,7 +62,7 @@
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+ <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java (from rev 100115, projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java 2010-01-29 14:29:43 UTC (rev 100121)
@@ -0,0 +1,403 @@
+/*
+ * 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.framework.bundle;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.tracker.ContextTracker;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.qualifier.QualifierMatchers;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
+import org.jboss.metadata.spi.MutableMetaData;
+import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
+import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
+import org.jboss.metadata.spi.retrieval.MetaDataRetrievalFactory;
+import org.jboss.metadata.spi.scope.CommonLevels;
+import org.jboss.metadata.spi.scope.ScopeKey;
+import org.jboss.osgi.framework.plugins.ControllerContextPlugin;
+import org.jboss.osgi.framework.plugins.FrameworkEventsPlugin;
+import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
+import org.jboss.osgi.framework.plugins.internal.AbstractPlugin;
+import org.jboss.osgi.framework.util.KernelUtils;
+import org.jboss.osgi.framework.util.NoFilter;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A plugin that manages OSGi services.
+ *
+ * This implementation handles service integration with the MC.
+ *
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 20-Jan-2010
+ */
+public class ControllerContextServiceManager extends AbstractPlugin implements ServiceManagerPlugin
+{
+ // Provide logging
+ final Logger log = Logger.getLogger(ControllerContextServiceManager.class);
+
+ /** The kernel */
+ private Kernel kernel;
+ /** The previous context tracker */
+ private ContextTracker previousTracker;
+
+ public ControllerContextServiceManager(OSGiBundleManager bundleManager)
+ {
+ super(bundleManager);
+ }
+
+ public void start()
+ {
+ kernel = getBundleManager().getKernel();
+ applyMDRUsage(true);
+ }
+
+ public void stop()
+ {
+ applyMDRUsage(false);
+ }
+
+ public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
+ {
+ ControllerContextPlugin plugin = getBundleManager().getPlugin(ControllerContextPlugin.class);
+ Set<ControllerContext> contexts = plugin.getRegisteredContexts(bundleState);
+ if (contexts.isEmpty())
+ return null;
+
+ Set<ServiceReference> result = new HashSet<ServiceReference>();
+ for (ControllerContext context : contexts)
+ {
+ ServiceReference ref = getServiceReferenceForContext(context);
+ if (ref != null)
+ result.add(ref);
+ }
+ if (result.isEmpty())
+ return null;
+
+ return result.toArray(new ServiceReference[result.size()]);
+ }
+
+ public ServiceReference[] getServicesInUse(AbstractBundleState bundleState)
+ {
+ Set<ControllerContext> contexts = bundleState.getUsedContexts(bundleState);
+ if (contexts == null || contexts.isEmpty())
+ return null;
+
+ List<ServiceReference> references = new ArrayList<ServiceReference>();
+ for (ControllerContext context : contexts)
+ {
+ ServiceReference ref = getServiceReferenceForContext(context);
+ if (ref != null)
+ references.add(ref);
+ }
+
+ if (references.isEmpty())
+ return null;
+
+ return references.toArray(new ServiceReference[references.size()]);
+ }
+
+ public ServiceReference[] getAllServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
+ {
+ Filter filter = NoFilter.INSTANCE;
+ if (filterStr != null)
+ filter = FrameworkUtil.createFilter(filterStr);
+
+ Collection<ServiceReference> services = getServices(bundle, clazz, filter, false);
+ if (services == null || services.isEmpty())
+ return null;
+
+ return services.toArray(new ServiceReference[services.size()]);
+ }
+
+ /**
+ * Get a service
+ *
+ * @param bundleState the bundle that requests the service
+ * @param reference the service reference
+ * @return the service
+ */
+ public Object getService(AbstractBundleState bundleState, ServiceReference reference)
+ {
+ if (reference == null)
+ throw new IllegalArgumentException("Null reference");
+
+ ControllerContextHandle handle = (ControllerContextHandle)reference;
+ ControllerContext context = handle.getContext();
+ if (KernelUtils.isUnregistered(context)) // we're probably not installed anymore
+ return null;
+
+ return bundleState.addContextInUse(context);
+ }
+
+ public ServiceReference getServiceReference(AbstractBundleState bundle, String clazz)
+ {
+ if (clazz == null)
+ throw new IllegalArgumentException("Null clazz");
+
+ Collection<ServiceReference> services = getServices(bundle, clazz, null, true);
+ if (services == null || services.isEmpty())
+ return null;
+
+ return services.iterator().next();
+ }
+
+ public ServiceReference[] getServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
+ {
+ Filter filter = NoFilter.INSTANCE;
+ if (filterStr != null)
+ filter = FrameworkUtil.createFilter(filterStr);
+
+ Collection<ServiceReference> services = getServices(bundle, clazz, filter, true);
+ if (services == null || services.isEmpty())
+ return null;
+
+ return services.toArray(new ServiceReference[services.size()]);
+ }
+
+ @SuppressWarnings("rawtypes")
+ public OSGiServiceState registerService(AbstractBundleState bundleState, String[] clazzes, Object service, Dictionary properties)
+ {
+ OSGiServiceState result = new OSGiServiceState(bundleState, clazzes, service, properties);
+ result.internalRegister();
+ try
+ {
+ Controller controller = kernel.getController();
+ controller.install(result);
+ }
+ catch (Throwable t)
+ {
+ getBundleManager().fireError(bundleState, "installing service to MC in", t);
+ throw new RuntimeException(t);
+ }
+
+ FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
+ plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
+
+ return result;
+ }
+
+ public void unregisterService(OSGiServiceState serviceState)
+ {
+ AbstractBundleState bundleState = serviceState.getBundleState();
+
+ Controller controller = kernel.getController();
+ controller.uninstall(serviceState.getName());
+
+ serviceState.internalUnregister();
+
+ FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
+ plugin.fireServiceEvent(bundleState, ServiceEvent.UNREGISTERING, serviceState);
+ }
+
+ public boolean ungetService(AbstractBundleState bundleState, ServiceReference reference)
+ {
+ if (reference == null)
+ throw new IllegalArgumentException("Null reference");
+
+ ControllerContextHandle serviceReference = (ControllerContextHandle)reference;
+ ControllerContext context = serviceReference.getContext();
+ if (KernelUtils.isUnregistered(context))
+ return false;
+
+ return bundleState.removeContextInUse(context);
+ }
+
+ /**
+ * Apply OSGi's MDR usage:
+ * - add/remove system bundle as default context tracker
+ * - add/remove instance metadata retrieval factory
+ *
+ * @param register do we register or unregister
+ */
+ private void applyMDRUsage(boolean register)
+ {
+ MutableMetaDataRepository repository = kernel.getMetaDataRepository().getMetaDataRepository();
+ MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(ScopeKey.DEFAULT_SCOPE);
+ if (register && retrieval == null)
+ {
+ retrieval = new MemoryMetaDataLoader(ScopeKey.DEFAULT_SCOPE);
+ repository.addMetaDataRetrieval(retrieval);
+ }
+ if (retrieval != null && retrieval instanceof MutableMetaData)
+ {
+ MutableMetaData mmd = (MutableMetaData)retrieval;
+ if (register)
+ {
+ OSGiSystemState systemBundle = getBundleManager().getSystemBundle();
+ previousTracker = mmd.addMetaData(systemBundle, ContextTracker.class);
+ }
+ else
+ {
+ if (previousTracker == null)
+ {
+ mmd.removeMetaData(ContextTracker.class);
+ if (retrieval.isEmpty())
+ repository.removeMetaDataRetrieval(retrieval.getScope());
+ }
+ else
+ {
+ mmd.addMetaData(previousTracker, ContextTracker.class);
+ }
+ }
+ }
+
+ // osgi ldap filter parsing and matching
+ FilterParserAndMatcher fpm = FilterParserAndMatcher.INSTANCE;
+ QualifierMatchers matchers = QualifierMatchers.getInstance();
+
+ if (register)
+ {
+ matchers.addParser(fpm);
+ matchers.addMatcher(fpm);
+
+ MetaDataRetrievalFactory mdrFactory = getMetaDataRetrievalFactory();
+ repository.addMetaDataRetrievalFactory(CommonLevels.INSTANCE, mdrFactory);
+ }
+ else
+ {
+ repository.removeMetaDataRetrievalFactory(CommonLevels.INSTANCE);
+
+ matchers.removeParser(fpm.getHandledContent());
+ matchers.removeMatcher(fpm.getHandledType());
+ }
+ }
+
+ private MetaDataRetrievalFactory getMetaDataRetrievalFactory()
+ {
+ MetaDataRetrievalFactory mdrFactory;
+ Controller controller = kernel.getController();
+ InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(controller);
+ imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
+ imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
+ // TODO - JMX?
+ mdrFactory = imdrf;
+ return mdrFactory;
+ }
+
+ private Collection<ServiceReference> getServices(AbstractBundleState bundle, String clazz, Filter filter, boolean checkAssignable)
+ {
+ Set<ControllerContext> contexts;
+ KernelController controller = kernel.getController();
+
+ // Don't check assignabilty for the system bundle
+ boolean isSystemBundle = (bundle.getBundleId() == 0);
+ if (isSystemBundle)
+ checkAssignable = false;
+
+ // TODO - a bit slow for system bundle
+ if (clazz != null && isSystemBundle == false)
+ {
+ Class<?> type = getBundleManager().loadClassFailsafe(bundle, clazz);
+ if (type == null)
+ return null; // or check all?
+
+ contexts = controller.getContexts(type, ControllerState.INSTALLED);
+ }
+ else
+ {
+ contexts = controller.getContextsByState(ControllerState.INSTALLED);
+ }
+
+ if (contexts == null || contexts.isEmpty())
+ return null;
+
+ if (filter == null)
+ filter = NoFilter.INSTANCE;
+
+ List<ControllerContext> sorted = new ArrayList<ControllerContext>(contexts);
+ Collections.sort(sorted, ContextComparator.INSTANCE); // Sort by the spec, should bubble up
+ Collection<ServiceReference> result = new ArrayList<ServiceReference>();
+ for (ControllerContext context : sorted)
+ {
+ // re-check?? -- we already only get INSTALLED
+ if (KernelUtils.isUnregistered(context) == false)
+ {
+ ServiceReference ref = getServiceReferenceForContext(context);
+ if (filter.match(ref) && hasPermission(context))
+ {
+ if (clazz == null || isSystemBundle == false || MDRUtils.matchClass(context, clazz))
+ {
+ // Check the assignability
+ if (checkAssignable == false || MDRUtils.isAssignableTo(context, bundle))
+ result.add(ref);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Get service reference for context.
+ *
+ * @param context the context
+ * @return service reference
+ */
+ private ServiceReference getServiceReferenceForContext(ControllerContext context)
+ {
+ if (context instanceof OSGiServiceState)
+ {
+ OSGiServiceState service = (OSGiServiceState)context;
+ return service.hasPermission() ? service.getReferenceInternal() : null;
+ }
+
+ OSGiBundleManager manager = getBundleManager();
+ ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+ AbstractBundleState bundleState = plugin.getBundleForContext(context);
+ return new GenericServiceReferenceWrapper(context, bundleState);
+ }
+
+ /**
+ * Do we have a permission to use context.
+ *
+ * @param context the context
+ * @return true if allowed to use context, false otherwise
+ */
+ private boolean hasPermission(ControllerContext context)
+ {
+ // TODO - make thisa generic, w/o casting
+ if (context instanceof OSGiServiceState)
+ {
+ OSGiServiceState serviceState = (OSGiServiceState)context;
+ return serviceState.hasPermission();
+ }
+ return true;
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-01-29 14:29:43 UTC (rev 100121)
@@ -1,400 +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.framework.bundle;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.dependency.spi.Controller;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.dependency.spi.tracker.ContextTracker;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.kernel.spi.qualifier.QualifierMatchers;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
-import org.jboss.metadata.spi.MutableMetaData;
-import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrievalFactory;
-import org.jboss.metadata.spi.scope.CommonLevels;
-import org.jboss.metadata.spi.scope.ScopeKey;
-import org.jboss.osgi.framework.plugins.ControllerContextPlugin;
-import org.jboss.osgi.framework.plugins.FrameworkEventsPlugin;
-import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
-import org.jboss.osgi.framework.plugins.internal.AbstractPlugin;
-import org.jboss.osgi.framework.util.KernelUtils;
-import org.jboss.osgi.framework.util.NoFilter;
-import org.osgi.framework.Filter;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceReference;
-
-/**
- * A plugin that manages OSGi services
- *
- * @author thomas.diesler(a)jboss.com
- * @since 20-Jan-2010
- */
-public class ServiceManagerPluginImpl extends AbstractPlugin implements ServiceManagerPlugin
-{
- // Provide logging
- final Logger log = Logger.getLogger(ServiceManagerPluginImpl.class);
-
- /** The kernel */
- private Kernel kernel;
- /** The previous context tracker */
- private ContextTracker previousTracker;
-
- public ServiceManagerPluginImpl(OSGiBundleManager bundleManager)
- {
- super(bundleManager);
- }
-
- public void start()
- {
- kernel = getBundleManager().getKernel();
- applyMDRUsage(true);
- }
-
- public void stop()
- {
- applyMDRUsage(false);
- }
-
- public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
- {
- ControllerContextPlugin plugin = getBundleManager().getPlugin(ControllerContextPlugin.class);
- Set<ControllerContext> contexts = plugin.getRegisteredContexts(bundleState);
- if (contexts.isEmpty())
- return null;
-
- Set<ServiceReference> result = new HashSet<ServiceReference>();
- for (ControllerContext context : contexts)
- {
- ServiceReference ref = getServiceReferenceForContext(context);
- if (ref != null)
- result.add(ref);
- }
- if (result.isEmpty())
- return null;
-
- return result.toArray(new ServiceReference[result.size()]);
- }
-
- public ServiceReference[] getServicesInUse(AbstractBundleState bundleState)
- {
- Set<ControllerContext> contexts = bundleState.getUsedContexts(bundleState);
- if (contexts == null || contexts.isEmpty())
- return null;
-
- List<ServiceReference> references = new ArrayList<ServiceReference>();
- for (ControllerContext context : contexts)
- {
- ServiceReference ref = getServiceReferenceForContext(context);
- if (ref != null)
- references.add(ref);
- }
-
- if (references.isEmpty())
- return null;
-
- return references.toArray(new ServiceReference[references.size()]);
- }
-
- public ServiceReference[] getAllServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
- {
- Filter filter = NoFilter.INSTANCE;
- if (filterStr != null)
- filter = FrameworkUtil.createFilter(filterStr);
-
- Collection<ServiceReference> services = getServices(bundle, clazz, filter, false);
- if (services == null || services.isEmpty())
- return null;
-
- return services.toArray(new ServiceReference[services.size()]);
- }
-
- /**
- * Get a service
- *
- * @param bundleState the bundle that requests the service
- * @param reference the service reference
- * @return the service
- */
- public Object getService(AbstractBundleState bundleState, ServiceReference reference)
- {
- if (reference == null)
- throw new IllegalArgumentException("Null reference");
-
- ControllerContextHandle handle = (ControllerContextHandle)reference;
- ControllerContext context = handle.getContext();
- if (KernelUtils.isUnregistered(context)) // we're probably not installed anymore
- return null;
-
- return bundleState.addContextInUse(context);
- }
-
- public ServiceReference getServiceReference(AbstractBundleState bundle, String clazz)
- {
- if (clazz == null)
- throw new IllegalArgumentException("Null clazz");
-
- Collection<ServiceReference> services = getServices(bundle, clazz, null, true);
- if (services == null || services.isEmpty())
- return null;
-
- return services.iterator().next();
- }
-
- public ServiceReference[] getServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
- {
- Filter filter = NoFilter.INSTANCE;
- if (filterStr != null)
- filter = FrameworkUtil.createFilter(filterStr);
-
- Collection<ServiceReference> services = getServices(bundle, clazz, filter, true);
- if (services == null || services.isEmpty())
- return null;
-
- return services.toArray(new ServiceReference[services.size()]);
- }
-
- @SuppressWarnings("rawtypes")
- public OSGiServiceState registerService(AbstractBundleState bundleState, String[] clazzes, Object service, Dictionary properties)
- {
- OSGiServiceState result = new OSGiServiceState(bundleState, clazzes, service, properties);
- result.internalRegister();
- try
- {
- Controller controller = kernel.getController();
- controller.install(result);
- }
- catch (Throwable t)
- {
- getBundleManager().fireError(bundleState, "installing service to MC in", t);
- throw new RuntimeException(t);
- }
-
- FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
- plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
-
- return result;
- }
-
- public void unregisterService(OSGiServiceState serviceState)
- {
- AbstractBundleState bundleState = serviceState.getBundleState();
-
- Controller controller = kernel.getController();
- controller.uninstall(serviceState.getName());
-
- serviceState.internalUnregister();
-
- FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
- plugin.fireServiceEvent(bundleState, ServiceEvent.UNREGISTERING, serviceState);
- }
-
- public boolean ungetService(AbstractBundleState bundleState, ServiceReference reference)
- {
- if (reference == null)
- throw new IllegalArgumentException("Null reference");
-
- ControllerContextHandle serviceReference = (ControllerContextHandle)reference;
- ControllerContext context = serviceReference.getContext();
- if (KernelUtils.isUnregistered(context))
- return false;
-
- return bundleState.removeContextInUse(context);
- }
-
- /**
- * Apply OSGi's MDR usage:
- * - add/remove system bundle as default context tracker
- * - add/remove instance metadata retrieval factory
- *
- * @param register do we register or unregister
- */
- private void applyMDRUsage(boolean register)
- {
- MutableMetaDataRepository repository = kernel.getMetaDataRepository().getMetaDataRepository();
- MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(ScopeKey.DEFAULT_SCOPE);
- if (register && retrieval == null)
- {
- retrieval = new MemoryMetaDataLoader(ScopeKey.DEFAULT_SCOPE);
- repository.addMetaDataRetrieval(retrieval);
- }
- if (retrieval != null && retrieval instanceof MutableMetaData)
- {
- MutableMetaData mmd = (MutableMetaData)retrieval;
- if (register)
- {
- OSGiSystemState systemBundle = getBundleManager().getSystemBundle();
- previousTracker = mmd.addMetaData(systemBundle, ContextTracker.class);
- }
- else
- {
- if (previousTracker == null)
- {
- mmd.removeMetaData(ContextTracker.class);
- if (retrieval.isEmpty())
- repository.removeMetaDataRetrieval(retrieval.getScope());
- }
- else
- {
- mmd.addMetaData(previousTracker, ContextTracker.class);
- }
- }
- }
-
- // osgi ldap filter parsing and matching
- FilterParserAndMatcher fpm = FilterParserAndMatcher.INSTANCE;
- QualifierMatchers matchers = QualifierMatchers.getInstance();
-
- if (register)
- {
- matchers.addParser(fpm);
- matchers.addMatcher(fpm);
-
- MetaDataRetrievalFactory mdrFactory = getMetaDataRetrievalFactory();
- repository.addMetaDataRetrievalFactory(CommonLevels.INSTANCE, mdrFactory);
- }
- else
- {
- repository.removeMetaDataRetrievalFactory(CommonLevels.INSTANCE);
-
- matchers.removeParser(fpm.getHandledContent());
- matchers.removeMatcher(fpm.getHandledType());
- }
- }
-
- private MetaDataRetrievalFactory getMetaDataRetrievalFactory()
- {
- MetaDataRetrievalFactory mdrFactory;
- Controller controller = kernel.getController();
- InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(controller);
- imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
- imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
- // TODO - JMX?
- mdrFactory = imdrf;
- return mdrFactory;
- }
-
- private Collection<ServiceReference> getServices(AbstractBundleState bundle, String clazz, Filter filter, boolean checkAssignable)
- {
- Set<ControllerContext> contexts;
- KernelController controller = kernel.getController();
-
- // Don't check assignabilty for the system bundle
- boolean isSystemBundle = (bundle.getBundleId() == 0);
- if (isSystemBundle)
- checkAssignable = false;
-
- // TODO - a bit slow for system bundle
- if (clazz != null && isSystemBundle == false)
- {
- Class<?> type = getBundleManager().loadClassFailsafe(bundle, clazz);
- if (type == null)
- return null; // or check all?
-
- contexts = controller.getContexts(type, ControllerState.INSTALLED);
- }
- else
- {
- contexts = controller.getContextsByState(ControllerState.INSTALLED);
- }
-
- if (contexts == null || contexts.isEmpty())
- return null;
-
- if (filter == null)
- filter = NoFilter.INSTANCE;
-
- List<ControllerContext> sorted = new ArrayList<ControllerContext>(contexts);
- Collections.sort(sorted, ContextComparator.INSTANCE); // Sort by the spec, should bubble up
- Collection<ServiceReference> result = new ArrayList<ServiceReference>();
- for (ControllerContext context : sorted)
- {
- // re-check?? -- we already only get INSTALLED
- if (KernelUtils.isUnregistered(context) == false)
- {
- ServiceReference ref = getServiceReferenceForContext(context);
- if (filter.match(ref) && hasPermission(context))
- {
- if (clazz == null || isSystemBundle == false || MDRUtils.matchClass(context, clazz))
- {
- // Check the assignability
- if (checkAssignable == false || MDRUtils.isAssignableTo(context, bundle))
- result.add(ref);
- }
- }
- }
- }
- return result;
- }
-
- /**
- * Get service reference for context.
- *
- * @param context the context
- * @return service reference
- */
- private ServiceReference getServiceReferenceForContext(ControllerContext context)
- {
- if (context instanceof OSGiServiceState)
- {
- OSGiServiceState service = (OSGiServiceState)context;
- return service.hasPermission() ? service.getReferenceInternal() : null;
- }
-
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- AbstractBundleState bundleState = plugin.getBundleForContext(context);
- return new GenericServiceReferenceWrapper(context, bundleState);
- }
-
- /**
- * Do we have a permission to use context.
- *
- * @param context the context
- * @return true if allowed to use context, false otherwise
- */
- private boolean hasPermission(ControllerContext context)
- {
- // TODO - make thisa generic, w/o casting
- if (context instanceof OSGiServiceState)
- {
- OSGiServiceState serviceState = (OSGiServiceState)context;
- return serviceState.hasPermission();
- }
- return true;
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java 2010-01-29 14:29:43 UTC (rev 100121)
@@ -29,6 +29,7 @@
import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
import org.jboss.osgi.spi.OSGiConstants;
import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.Version;
/**
* OSGiManifestParsingDeployer.<p>
@@ -55,11 +56,13 @@
// At least one of these manifest headers must be there
// Note, in R3 and R4 there is no common mandatory header
String bundleName = osgiMetaData.getBundleName();
- String bundleVersion = osgiMetaData.getBundleVersion();
String bundleSymbolicName = osgiMetaData.getBundleSymbolicName();
- if (bundleName == null && bundleVersion == null && bundleSymbolicName == null)
- osgiMetaData = null;
+ Version bundleVersion = Version.parseVersion(osgiMetaData.getBundleVersion());
+ boolean isEmptyVersion = Version.emptyVersion.equals(bundleVersion);
+ if (bundleName == null && bundleSymbolicName == null && isEmptyVersion == true)
+ return null;
+
return osgiMetaData;
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java 2010-01-29 14:29:43 UTC (rev 100121)
@@ -114,17 +114,14 @@
@Override
protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
{
- OSGiClassLoadingMetaData classLoadingMetaData = (OSGiClassLoadingMetaData)unit.getAttachment(ClassLoadingMetaData.class);
- if (classLoadingMetaData == null)
- throw new IllegalStateException("No ClassLoadingMetaData");
-
AbstractBundleState absBundleState = unit.getAttachment(AbstractBundleState.class);
- if (absBundleState == null)
- throw new IllegalStateException("No AbstractBundleState");
-
if ((absBundleState instanceof OSGiBundleState) == false)
return;
+ OSGiClassLoadingMetaData classLoadingMetaData = (OSGiClassLoadingMetaData)unit.getAttachment(ClassLoadingMetaData.class);
+ if (classLoadingMetaData == null)
+ throw new IllegalStateException("No ClassLoadingMetaData");
+
OSGiBundleState bundleState = (OSGiBundleState)absBundleState;
OSGiBundleManager bundleManager = bundleState.getBundleManager();
OSGiMetaData osgiMetaData = bundleState.getOSGiMetaData();
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java 2010-01-29 14:29:43 UTC (rev 100121)
@@ -48,10 +48,7 @@
public WebXMLVerifierInterceptor(OSGiBundleManager bundleManager)
{
super(bundleManager);
- }
-
- public void startService()
- {
+
delegate = new AbstractLifecycleInterceptor()
{
public void invoke(int state, InvocationContext context) throws LifecycleInterceptorException
@@ -78,7 +75,10 @@
}
}
};
+ }
+ public void startService()
+ {
getSystemContext().registerService(LifecycleInterceptor.class.getName(), delegate, null);
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-01-29 14:29:43 UTC (rev 100121)
@@ -49,13 +49,13 @@
<bean name="OSGiControllerContextPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextPluginImpl">
<constructor>
<parameter><inject bean="OSGiBundleManager" /></parameter>
- <parameter><inject bean="DeploymentRegistry" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
</constructor>
</bean>
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+ <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
@@ -103,9 +103,6 @@
<property name="deployers"><inject bean="Deployers" /></property>
</bean>
- <!-- The deployment registry -->
- <bean name="DeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
-
<!-- The holder for deployers that determine structure -->
<bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
<property name="structureBuilder">
@@ -139,9 +136,12 @@
<constructor>
<parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
</constructor>
- <property name="deploymentRegistry"><inject bean="DeploymentRegistry"/></property>
+ <property name="deploymentRegistry"><inject bean="OSGiDeploymentRegistry"/></property>
</bean>
+ <!-- The deployment registry -->
+ <bean name="OSGiDeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
+
<!-- OSGI Deployment -->
<bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
<bean name="OSGiBundleStateAddDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateAddDeployer">
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml 2010-01-29 14:29:43 UTC (rev 100121)
@@ -29,8 +29,8 @@
<field type="radio" variable="jbossSelection">
<description align="left" txt="Please choose your target container" />
<spec>
- <choice txt="JBoss-6.0.0.M1" value="jboss600" set="true"/>
- <choice txt="JBoss-6.0.0-SNAPSHOT" value="jboss601"/>
+ <!-- choice txt="JBoss-6.0.0.M2" value="jboss600" set="true"/ -->
+ <choice txt="JBoss-6.0.0-SNAPSHOT" value="jboss601" set="true"/>
</spec>
</field>
<field type="text" variable="jbossTargetServer">
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-01-29 14:29:43 UTC (rev 100121)
@@ -99,13 +99,13 @@
<bean name="OSGiControllerContextPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextPluginImpl">
<constructor>
<parameter><inject bean="OSGiBundleManager" /></parameter>
- <parameter><inject bean="DeploymentRegistry" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
</constructor>
</bean>
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+ <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
@@ -139,18 +139,6 @@
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <!--
- ********************************
- * *
- * Framework *
- * *
- ********************************
- -->
-
- <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.framework.launch.OSGiFramework">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
<!--
********************************
* *
@@ -171,6 +159,9 @@
********************************
-->
+ <!-- The deployment registry -->
+ <bean name="OSGiDeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
+
<bean name="OSGiDeployersWrapper" class="org.jboss.osgi.framework.deployers.OSGiDeployersWrapper" >
<constructor>
<parameter><inject bean="MainDeployer"/></parameter>
@@ -215,24 +206,18 @@
<property name="domain"><inject bean="OSGiClassLoaderDomain"/></property>
<property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
</bean>
- <bean name="OSGiModuleDeployer" class="org.jboss.osgi.framework.deployers.OSGiModuleDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- </bean>
<bean name="OSGiFragmentAttachmentDeployer" class="org.jboss.osgi.framework.deployers.OSGiFragmentAttachmentDeployer"/>
- <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
- <incallback method="addModule" state="Configured" />
- <uncallback method="removeModule" state="Configured" />
- </bean>
- <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
- <property name="defaultMetaData">
- <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
- </property>
- </bean>
- <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
- <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- <property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
- </bean>
+ <!--
+ ********************************
+ * *
+ * Framework *
+ * *
+ ********************************
+ -->
+ <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.framework.launch.OSGiFramework">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+
</deployment>
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2010-01-29 14:29:43 UTC (rev 100121)
@@ -99,7 +99,7 @@
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+ <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-01-29 14:29:43 UTC (rev 100121)
@@ -82,7 +82,7 @@
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+ <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-01-29 14:29:43 UTC (rev 100121)
@@ -81,7 +81,7 @@
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+ <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
15 years, 10 months
JBoss-OSGI SVN: r100117 - in projects/jboss-osgi: trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161 and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-29 05:28:07 -0500 (Fri, 29 Jan 2010)
New Revision: 100117
Added:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/LoggingDelegate.java
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd
Log:
[JBOSGI-279] Update to jboss-cl-2.2.x stable release
Update to 2.2.0.Alpha1
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-01-29 09:40:50 UTC (rev 100116)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-01-29 10:28:07 UTC (rev 100117)
@@ -47,9 +47,10 @@
<version.apache.felix.log>1.0.0</version.apache.felix.log>
<version.apache.felix.metatype>1.0.2</version.apache.felix.metatype>
<version.drools>5.0.1</version.drools>
- <version.jboss.classloading>2.2.0-SNAPSHOT</version.jboss.classloading>
+ <version.jboss.classloading>2.2.0.Alpha1</version.jboss.classloading>
<version.jboss.deployers>2.2.0.Alpha1</version.jboss.deployers>
<version.jboss.kernel>2.2.0.Alpha2</version.jboss.kernel>
+ <version.jboss.logging>2.1.0.GA</version.jboss.logging>
<version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
@@ -116,6 +117,11 @@
<version>${version.jboss.kernel}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>${version.jboss.logging}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
<version>${version.jboss.osgi.spi}</version>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java 2010-01-29 09:40:50 UTC (rev 100116)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java 2010-01-29 10:28:07 UTC (rev 100117)
@@ -26,7 +26,8 @@
import org.jboss.osgi.spi.capability.LogServiceCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.test.osgi.jbosgi161.bundle.LoggingDelegate;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -38,19 +39,22 @@
* @author thomas.diesler(a)jboss.com
* @since 07-Oct-2009
*/
-public class OSGi161TestCase
+public class OSGi161TestCase extends OSGiTest
{
@Test
public void testClientLogging() throws Exception
{
+ String logmsg = "testClientLogging";
+ LoggingDelegate.assertJBossLogging(logmsg);
+ LoggingDelegate.assertCommonsLogging(logmsg);
+ LoggingDelegate.assertSL4J(logmsg);
}
@Test
public void testFrameworkLogging() throws Exception
{
- OSGiTestHelper helper = new OSGiTestHelper();
- OSGiRuntime runtime = helper.getDefaultRuntime();
+ OSGiRuntime runtime = getDefaultRuntime();
try
{
runtime.addCapability(new LogServiceCapability());
@@ -58,7 +62,7 @@
OSGiBundle bundleA = runtime.installBundle("jbosgi161-bundle.jar");
bundleA.start();
- helper.assertBundleState(Bundle.ACTIVE, bundleA.getState());
+ assertBundleState(Bundle.ACTIVE, bundleA.getState());
bundleA.uninstall();
}
finally
Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/LoggingDelegate.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/LoggingDelegate.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/LoggingDelegate.java 2010-01-29 10:28:07 UTC (rev 100117)
@@ -0,0 +1,85 @@
+/*
+ * 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.test.osgi.jbosgi161.bundle;
+
+// $Id:$
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class LoggingDelegate
+{
+ public static void assertJBossLogging(String message)
+ {
+ org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LoggingDelegate.class);
+
+ String loggerClass = log.getClass().getName();
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("org.jboss.logging.Logger");
+
+ if (expected.contains(loggerClass) == false)
+ throw new IllegalStateException("Unexpected logger: " + loggerClass);
+
+ log.info("*******************************************");
+ log.info("* jboss: " + message);
+ log.info("*******************************************");
+ }
+
+ public static void assertCommonsLogging(String message)
+ {
+ org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LoggingDelegate.class);
+
+ String loggerClass = log.getClass().getName();
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("org.apache.commons.logging.impl.SLF4JLog");
+ expected.add("org.apache.commons.logging.impl.Log4JLogger");
+ expected.add("org.apache.commons.logging.impl.SLF4JLocationAwareLog");
+
+ if (expected.contains(loggerClass) == false)
+ throw new IllegalStateException("Unexpected logger: " + loggerClass);
+
+ log.info("*******************************************");
+ log.info("* jcl: " + message);
+ log.info("*******************************************");
+ }
+
+ public static void assertSL4J(String message)
+ {
+ org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LoggingDelegate.class);
+
+ String loggerClass = log.getClass().getName();
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("org.jboss.slf4j.JBossLoggerAdapter");
+ expected.add("org.slf4j.impl.Log4jLoggerAdapter");
+ expected.add("org.slf4j.impl.Slf4jLogger");
+
+ if (expected.contains(loggerClass) == false)
+ throw new IllegalStateException("Unexpected logger: " + loggerClass);
+
+ log.info("*******************************************");
+ log.info("* slf4j: " + message);
+ log.info("*******************************************");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/LoggingDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java 2010-01-29 09:40:50 UTC (rev 100116)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java 2010-01-29 10:28:07 UTC (rev 100117)
@@ -23,64 +23,21 @@
// $Id:$
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class OSGi161Activator implements BundleActivator
{
public void start(BundleContext context) throws Exception
{
- assertCommonsLogging(context);
+ String logmsg = context.getBundle().getSymbolicName();
- assertSL4J(context);
+ LoggingDelegate.assertJBossLogging(logmsg);
+ LoggingDelegate.assertCommonsLogging(logmsg);
+ LoggingDelegate.assertSL4J(logmsg);
}
public void stop(BundleContext context) throws Exception
{
}
-
- private void assertCommonsLogging(BundleContext context)
- {
- Log log = LogFactory.getLog(OSGi161Activator.class);
-
- String loggerClass = log.getClass().getName();
-
- List<String> expected = new ArrayList<String>();
- expected.add("org.apache.commons.logging.impl.SLF4JLog");
- expected.add("org.apache.commons.logging.impl.Log4JLogger");
- expected.add("org.apache.commons.logging.impl.SLF4JLocationAwareLog");
-
- if (expected.contains(loggerClass) == false)
- throw new IllegalStateException("Unexpected logger: " + loggerClass);
-
- log.info("*******************************************");
- log.info("* jcl: " + context.getBundle());
- log.info("*******************************************");
- }
-
- private void assertSL4J(BundleContext context)
- {
- Logger log = LoggerFactory.getLogger(OSGi161Activator.class);
-
- String loggerClass = log.getClass().getName();
-
- List<String> expected = new ArrayList<String>();
- expected.add("org.jboss.slf4j.JBossLoggerAdapter");
- expected.add("org.slf4j.impl.Log4jLoggerAdapter");
- expected.add("org.slf4j.impl.Slf4jLogger");
-
- if (expected.contains(loggerClass) == false)
- throw new IllegalStateException("Unexpected logger: " + loggerClass);
-
- log.info("*******************************************");
- log.info("* slf4j: " + context.getBundle());
- log.info("*******************************************");
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd 2010-01-29 09:40:50 UTC (rev 100116)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd 2010-01-29 10:28:07 UTC (rev 100117)
@@ -3,4 +3,4 @@
Bundle-SymbolicName: jbosgi161-bundle
Bundle-Activator: org.jboss.test.osgi.jbosgi161.bundle.OSGi161Activator
Private-Package: org.jboss.test.osgi.jbosgi161.bundle
-Import-Package: org.apache.commons.logging, org.slf4j, org.osgi.framework
+Import-Package: org.apache.commons.logging, org.slf4j, org.jboss.logging, org.osgi.framework
15 years, 10 months
JBoss-OSGI SVN: r100116 - in projects/jboss-osgi/trunk/testsuite/functional/src/test: java/org/jboss/test/osgi/jbosgi108/bundleB and 23 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-29 04:40:50 -0500 (Fri, 29 Jan 2010)
New Revision: 100116
Added:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/OSGi108ActivatorA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/OSGi108ActivatorB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/OSGi112ActivatorA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/OSGi112ActivatorB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGi214Activator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/OSGi37ActivatorA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/OSGi37ActivatorB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/OSGi38ActivatorA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/OSGi38ActivatorB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/OSGi39ActivatorB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/OSGi41Activator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/OSGi99Activator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/OSGi36Activator.java
Removed:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/ActivatorBundleA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/ActivatorBundleB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/ActivatorBundleA.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/ActivatorBundleB.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceActivator.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/Activator99.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/ServiceActivator.java
Modified:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi41/jbosgi41-bundleA.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi99/jbosgi99-failonstart.bnd
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbossas/jbosgi36/jbosgi36.bnd
Log:
Unify BundleActivators
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/ActivatorBundleA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/ActivatorBundleA.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/ActivatorBundleA.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,75 +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.test.osgi.jbosgi108.bundleA;
-
-//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
-
-import javax.management.MBeanServer;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-public class ActivatorBundleA implements BundleActivator
-{
- private SomeBean bean;
-
- public void start(BundleContext context)
- {
- bean = new SomeBean();
-
- // Register the MBean
- try
- {
- ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
- MBeanServer service = (MBeanServer)context.getService(sref);
- service.registerMBean(bean, SomeBean.MBEAN_NAME);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException(ex);
- }
-
- ClassLoader cl = getClass().getClassLoader();
- String msg = "start with " + cl + " - hashCode: " + cl.hashCode();
- bean.addMessage(msg);
- }
-
- public void stop(BundleContext context)
- {
- ClassLoader cl = getClass().getClassLoader();
- String msg = "stop with " + cl + " - hashCode: " + cl.hashCode();
- bean.addMessage(msg);
-
- // Register the MBean
- try
- {
- ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
- MBeanServer service = (MBeanServer)context.getService(sref);
- service.unregisterMBean(SomeBean.MBEAN_NAME);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException(ex);
- }
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/OSGi108ActivatorA.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/ActivatorBundleA.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/OSGi108ActivatorA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleA/OSGi108ActivatorA.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,75 @@
+/*
+ * 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.test.osgi.jbosgi108.bundleA;
+
+//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
+
+import javax.management.MBeanServer;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+public class OSGi108ActivatorA implements BundleActivator
+{
+ private SomeBean bean;
+
+ public void start(BundleContext context)
+ {
+ bean = new SomeBean();
+
+ // Register the MBean
+ try
+ {
+ ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
+ MBeanServer service = (MBeanServer)context.getService(sref);
+ service.registerMBean(bean, SomeBean.MBEAN_NAME);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException(ex);
+ }
+
+ ClassLoader cl = getClass().getClassLoader();
+ String msg = "start with " + cl + " - hashCode: " + cl.hashCode();
+ bean.addMessage(msg);
+ }
+
+ public void stop(BundleContext context)
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ String msg = "stop with " + cl + " - hashCode: " + cl.hashCode();
+ bean.addMessage(msg);
+
+ // Register the MBean
+ try
+ {
+ ServiceReference sref = context.getServiceReference(MBeanServer.class.getName());
+ MBeanServer service = (MBeanServer)context.getService(sref);
+ service.unregisterMBean(SomeBean.MBEAN_NAME);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException(ex);
+ }
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/ActivatorBundleB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/ActivatorBundleB.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/ActivatorBundleB.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,47 +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.test.osgi.jbosgi108.bundleB;
-
-//$Id$
-
-import org.jboss.test.osgi.jbosgi108.bundleA.SomeBean;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ActivatorBundleB implements BundleActivator
-{
- private SomeBean bean = new SomeBean();
-
- public void start(BundleContext context)
- {
- ClassLoader cl = getClass().getClassLoader();
- String msg = "start with " + cl + " - hashCode: " + cl.hashCode();
- bean.addMessage(msg);
- }
-
- public void stop(BundleContext context)
- {
- ClassLoader cl = getClass().getClassLoader();
- String msg = "stop with " + cl + " - hashCode: " + cl.hashCode();
- bean.addMessage(msg);
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/OSGi108ActivatorB.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/ActivatorBundleB.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/OSGi108ActivatorB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi108/bundleB/OSGi108ActivatorB.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,47 @@
+/*
+ * 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.test.osgi.jbosgi108.bundleB;
+
+//$Id$
+
+import org.jboss.test.osgi.jbosgi108.bundleA.SomeBean;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi108ActivatorB implements BundleActivator
+{
+ private SomeBean bean = new SomeBean();
+
+ public void start(BundleContext context)
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ String msg = "start with " + cl + " - hashCode: " + cl.hashCode();
+ bean.addMessage(msg);
+ }
+
+ public void stop(BundleContext context)
+ {
+ ClassLoader cl = getClass().getClassLoader();
+ String msg = "stop with " + cl + " - hashCode: " + cl.hashCode();
+ bean.addMessage(msg);
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/ActivatorBundleA.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/ActivatorBundleA.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/ActivatorBundleA.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,57 +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.test.osgi.jbosgi112.bundleA;
-
-//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleListener;
-import org.osgi.framework.SynchronousBundleListener;
-
-public class ActivatorBundleA implements BundleActivator
-{
- public void start(BundleContext context)
- {
- BundleListener listener = new SynchronousBundleListener()
- {
- public void bundleChanged(BundleEvent evt)
- {
- if (BundleEvent.STARTING == evt.getType())
- {
- Bundle bundle = evt.getBundle();
- if ("jbosgi112-bundleB".equals(bundle.getSymbolicName()))
- {
- throw new RuntimeException("Cannot start bundle: " + bundle);
- }
- }
- }
- };
- context.addBundleListener(listener);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/OSGi112ActivatorA.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/ActivatorBundleA.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/OSGi112ActivatorA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleA/OSGi112ActivatorA.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,57 @@
+/*
+ * 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.test.osgi.jbosgi112.bundleA;
+
+//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.framework.SynchronousBundleListener;
+
+public class OSGi112ActivatorA implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ BundleListener listener = new SynchronousBundleListener()
+ {
+ public void bundleChanged(BundleEvent evt)
+ {
+ if (BundleEvent.STARTING == evt.getType())
+ {
+ Bundle bundle = evt.getBundle();
+ if ("jbosgi112-bundleB".equals(bundle.getSymbolicName()))
+ {
+ throw new RuntimeException("Cannot start bundle: " + bundle);
+ }
+ }
+ }
+ };
+ context.addBundleListener(listener);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/ActivatorBundleB.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/ActivatorBundleB.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/ActivatorBundleB.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,38 +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.test.osgi.jbosgi112.bundleB;
-
-//$Id$
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ActivatorBundleB implements BundleActivator
-{
- public void start(BundleContext context)
- {
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/OSGi112ActivatorB.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/ActivatorBundleB.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/OSGi112ActivatorB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/bundleB/OSGi112ActivatorB.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,38 @@
+/*
+ * 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.test.osgi.jbosgi112.bundleB;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi112ActivatorB implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/OSGi161TestCase.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -26,7 +26,7 @@
import org.jboss.osgi.spi.capability.LogServiceCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
-import org.jboss.osgi.testing.OSGiTest;
+import org.jboss.osgi.testing.OSGiTestHelper;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -38,12 +38,19 @@
* @author thomas.diesler(a)jboss.com
* @since 07-Oct-2009
*/
-public class OSGi161TestCase extends OSGiTest
+public class OSGi161TestCase
{
@Test
- public void testLogging() throws Exception
+ public void testClientLogging() throws Exception
{
- OSGiRuntime runtime = getDefaultRuntime();
+
+ }
+
+ @Test
+ public void testFrameworkLogging() throws Exception
+ {
+ OSGiTestHelper helper = new OSGiTestHelper();
+ OSGiRuntime runtime = helper.getDefaultRuntime();
try
{
runtime.addCapability(new LogServiceCapability());
@@ -51,7 +58,7 @@
OSGiBundle bundleA = runtime.installBundle("jbosgi161-bundle.jar");
bundleA.start();
- assertBundleState(Bundle.ACTIVE, bundleA.getState());
+ helper.assertBundleState(Bundle.ACTIVE, bundleA.getState());
bundleA.uninstall();
}
finally
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,86 +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.test.osgi.jbosgi161.bundle;
-
-// $Id:$
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class Activator161 implements BundleActivator
-{
- public void start(BundleContext context) throws Exception
- {
- assertCommonsLogging(context);
-
- assertSL4J(context);
- }
-
- public void stop(BundleContext context) throws Exception
- {
- }
-
- private void assertCommonsLogging(BundleContext context)
- {
- Log log = LogFactory.getLog(Activator161.class);
-
- String loggerClass = log.getClass().getName();
-
- List<String> expected = new ArrayList<String>();
- expected.add("org.apache.commons.logging.impl.SLF4JLog");
- expected.add("org.apache.commons.logging.impl.Log4JLogger");
- expected.add("org.apache.commons.logging.impl.SLF4JLocationAwareLog");
-
- if (expected.contains(loggerClass) == false)
- throw new IllegalStateException("Unexpected logger: " + loggerClass);
-
- log.info("*******************************************");
- log.info("* jcl: " + context.getBundle());
- log.info("*******************************************");
- }
-
- private void assertSL4J(BundleContext context)
- {
- Logger log = LoggerFactory.getLogger(Activator161.class);
-
- String loggerClass = log.getClass().getName();
-
- List<String> expected = new ArrayList<String>();
- expected.add("org.jboss.slf4j.JBossLoggerAdapter");
- expected.add("org.slf4j.impl.Log4jLoggerAdapter");
- expected.add("org.slf4j.impl.Slf4jLogger");
-
- if (expected.contains(loggerClass) == false)
- throw new IllegalStateException("Unexpected logger: " + loggerClass);
-
- log.info("*******************************************");
- log.info("* slf4j: " + context.getBundle());
- log.info("*******************************************");
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/Activator161.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi161/bundle/OSGi161Activator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -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.test.osgi.jbosgi161.bundle;
+
+// $Id:$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OSGi161Activator implements BundleActivator
+{
+ public void start(BundleContext context) throws Exception
+ {
+ assertCommonsLogging(context);
+
+ assertSL4J(context);
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ }
+
+ private void assertCommonsLogging(BundleContext context)
+ {
+ Log log = LogFactory.getLog(OSGi161Activator.class);
+
+ String loggerClass = log.getClass().getName();
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("org.apache.commons.logging.impl.SLF4JLog");
+ expected.add("org.apache.commons.logging.impl.Log4JLogger");
+ expected.add("org.apache.commons.logging.impl.SLF4JLocationAwareLog");
+
+ if (expected.contains(loggerClass) == false)
+ throw new IllegalStateException("Unexpected logger: " + loggerClass);
+
+ log.info("*******************************************");
+ log.info("* jcl: " + context.getBundle());
+ log.info("*******************************************");
+ }
+
+ private void assertSL4J(BundleContext context)
+ {
+ Logger log = LoggerFactory.getLogger(OSGi161Activator.class);
+
+ String loggerClass = log.getClass().getName();
+
+ List<String> expected = new ArrayList<String>();
+ expected.add("org.jboss.slf4j.JBossLoggerAdapter");
+ expected.add("org.slf4j.impl.Log4jLoggerAdapter");
+ expected.add("org.slf4j.impl.Slf4jLogger");
+
+ if (expected.contains(loggerClass) == false)
+ throw new IllegalStateException("Unexpected logger: " + loggerClass);
+
+ log.info("*******************************************");
+ log.info("* slf4j: " + context.getBundle());
+ log.info("*******************************************");
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,47 +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.test.osgi.jbosgi214.bundle;
-
-//$Id$
-
-import org.jboss.test.osgi.jbosgi214.SomeService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * A Service Activator
- *
- * @author thomas.diesler(a)jboss.com
- * @since 24-Apr-2009
- */
-public class Activator214 implements BundleActivator
-{
- public void start(BundleContext context)
- {
- // Register a service that is bound to an interface from the system classpath
- context.registerService(SomeService.class.getName(), new SomeServiceImpl(), null);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGi214Activator.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/Activator214.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGi214Activator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi214/bundle/OSGi214Activator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,47 @@
+/*
+ * 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.test.osgi.jbosgi214.bundle;
+
+//$Id$
+
+import org.jboss.test.osgi.jbosgi214.SomeService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A Service Activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 24-Apr-2009
+ */
+public class OSGi214Activator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ // Register a service that is bound to an interface from the system classpath
+ context.registerService(SomeService.class.getName(), new SomeServiceImpl(), null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/OSGi37ActivatorA.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/OSGi37ActivatorA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/OSGi37ActivatorA.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,40 @@
+/*
+ * 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.test.osgi.jbosgi37.bundleA;
+
+//$Id: ServiceActivator.java 87103 2009-04-09 22:18:31Z thomas.diesler(a)jboss.com $
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi37ActivatorA implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ ServiceA service = new ServiceA(context);
+ context.registerService(ServiceA.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleA/ServiceActivator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,40 +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.test.osgi.jbosgi37.bundleA;
-
-//$Id: ServiceActivator.java 87103 2009-04-09 22:18:31Z thomas.diesler(a)jboss.com $
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ServiceActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- ServiceA service = new ServiceA(context);
- context.registerService(ServiceA.class.getName(), service, null);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/OSGi37ActivatorB.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/OSGi37ActivatorB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/OSGi37ActivatorB.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,40 @@
+/*
+ * 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.test.osgi.jbosgi37.bundleB;
+
+//$Id: ServiceActivator.java 87103 2009-04-09 22:18:31Z thomas.diesler(a)jboss.com $
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi37ActivatorB implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ ServiceB service = new ServiceB(context);
+ context.registerService(ServiceB.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi37/bundleB/ServiceActivator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,40 +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.test.osgi.jbosgi37.bundleB;
-
-//$Id: ServiceActivator.java 87103 2009-04-09 22:18:31Z thomas.diesler(a)jboss.com $
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ServiceActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- ServiceB service = new ServiceB(context);
- context.registerService(ServiceB.class.getName(), service, null);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/OSGi38ActivatorA.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/OSGi38ActivatorA.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/OSGi38ActivatorA.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,40 @@
+/*
+ * 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.test.osgi.jbosgi38.bundleA;
+
+//$Id: ServiceActivator.java 85100 2009-03-02 13:58:48Z thomas.diesler(a)jboss.com $
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi38ActivatorA implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ ServiceA service = new ServiceA(context);
+ context.registerService(ServiceA.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/ServiceActivator.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleA/ServiceActivator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,40 +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.test.osgi.jbosgi38.bundleA;
-
-//$Id: ServiceActivator.java 85100 2009-03-02 13:58:48Z thomas.diesler(a)jboss.com $
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ServiceActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- ServiceA service = new ServiceA(context);
- context.registerService(ServiceA.class.getName(), service, null);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/OSGi38ActivatorB.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/OSGi38ActivatorB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/OSGi38ActivatorB.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,40 @@
+/*
+ * 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.test.osgi.jbosgi38.bundleB;
+
+//$Id: ServiceActivator.java 85100 2009-03-02 13:58:48Z thomas.diesler(a)jboss.com $
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi38ActivatorB implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ ServiceB service = new ServiceB();
+ context.registerService(ServiceB.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/ServiceActivator.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi38/bundleB/ServiceActivator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,40 +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.test.osgi.jbosgi38.bundleB;
-
-//$Id: ServiceActivator.java 85100 2009-03-02 13:58:48Z thomas.diesler(a)jboss.com $
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ServiceActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- ServiceB service = new ServiceB();
- context.registerService(ServiceB.class.getName(), service, null);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/OSGi39ActivatorB.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/OSGi39ActivatorB.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/OSGi39ActivatorB.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,40 @@
+/*
+ * 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.test.osgi.jbosgi39.bundleB;
+
+//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi39ActivatorB implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ ServiceB service = new ServiceB();
+ context.registerService(ServiceB.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/bundleB/ServiceActivator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,40 +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.test.osgi.jbosgi39.bundleB;
-
-//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ServiceActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- ServiceB service = new ServiceB();
- context.registerService(ServiceB.class.getName(), service, null);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/OSGi41Activator.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/OSGi41Activator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/OSGi41Activator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,52 @@
+/*
+ * 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.test.osgi.jbosgi41.bundleA;
+
+//$Id: ServiceActivator.java 85293 2009-03-05 13:45:47Z thomas.diesler(a)jboss.com $
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi41Activator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ ServiceA serviceA = new ServiceA(context);
+ context.registerService(ServiceA.class.getName(), serviceA, null);
+
+ Dictionary<String, String> props = new Hashtable<String, String>();
+ props.put("service.pid", ServiceB.class.getName());
+
+ ServiceB serviceB = new ServiceB(context);
+ context.registerService(ServiceB.class.getName(), serviceB, props);
+
+ serviceB.updateConfig("xxx", "yyy");
+ serviceB.updateConfig("xxx", "zzz");
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceActivator.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi41/bundleA/ServiceActivator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,52 +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.test.osgi.jbosgi41.bundleA;
-
-//$Id: ServiceActivator.java 85293 2009-03-05 13:45:47Z thomas.diesler(a)jboss.com $
-
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class ServiceActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- ServiceA serviceA = new ServiceA(context);
- context.registerService(ServiceA.class.getName(), serviceA, null);
-
- Dictionary<String, String> props = new Hashtable<String, String>();
- props.put("service.pid", ServiceB.class.getName());
-
- ServiceB serviceB = new ServiceB(context);
- context.registerService(ServiceB.class.getName(), serviceB, props);
-
- serviceB.updateConfig("xxx", "yyy");
- serviceB.updateConfig("xxx", "zzz");
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/Activator99.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/Activator99.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/Activator99.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,39 +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.test.osgi.jbosgi99.bundle;
-
-//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
-
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class Activator99 implements BundleActivator
-{
- public void start(BundleContext context)
- {
- throw new IllegalStateException("Fail on start");
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/OSGi99Activator.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/Activator99.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/OSGi99Activator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/bundle/OSGi99Activator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,39 @@
+/*
+ * 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.test.osgi.jbosgi99.bundle;
+
+//$Id: ServiceActivator.java 87064 2009-04-09 11:08:56Z thomas.diesler(a)jboss.com $
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class OSGi99Activator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ throw new IllegalStateException("Fail on start");
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/OSGi36Activator.java (from rev 100115, projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/ServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/OSGi36Activator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/OSGi36Activator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -0,0 +1,47 @@
+/*
+ * 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.test.osgi.jbossas.jbosgi36.bundle.internal;
+
+//$Id: SomeServiceActivator.java 86968 2009-04-08 15:51:12Z thomas.diesler(a)jboss.com $
+
+import org.jboss.test.osgi.jbossas.jbosgi36.bundle.SomeService;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A Service Activator
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 04-Feb-2009
+ */
+public class OSGi36Activator implements BundleActivator
+{
+ public void start(BundleContext context)
+ {
+ SomeService service = new SomeService();
+ context.registerService(SomeService.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/ServiceActivator.java 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/bundle/internal/ServiceActivator.java 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,47 +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.test.osgi.jbossas.jbosgi36.bundle.internal;
-
-//$Id: SomeServiceActivator.java 86968 2009-04-08 15:51:12Z thomas.diesler(a)jboss.com $
-
-import org.jboss.test.osgi.jbossas.jbosgi36.bundle.SomeService;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * A Service Activator
- *
- * @author thomas.diesler(a)jboss.com
- * @since 04-Feb-2009
- */
-public class ServiceActivator implements BundleActivator
-{
- public void start(BundleContext context)
- {
- SomeService service = new SomeService();
- context.registerService(SomeService.class.getName(), service, null);
- }
-
- public void stop(BundleContext context)
- {
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleA.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleA.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi108-bundleA.jar src/test/resources/jbosgi108/jbosgi108-bundleA.bnd
Bundle-SymbolicName: jbosgi108-bundleA
-Bundle-Activator: org.jboss.test.osgi.jbosgi108.bundleA.ActivatorBundleA
+Bundle-Activator: org.jboss.test.osgi.jbosgi108.bundleA.OSGi108ActivatorA
Export-Package: org.jboss.test.osgi.jbosgi108.bundleA
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleB.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi108/jbosgi108-bundleB.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,7 +1,7 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi108-bundleB.jar src/test/resources/jbosgi108/jbosgi108-bundleB.bnd
Bundle-SymbolicName: jbosgi108-bundleB
-Bundle-Activator: org.jboss.test.osgi.jbosgi108.bundleB.ActivatorBundleB
+Bundle-Activator: org.jboss.test.osgi.jbosgi108.bundleB.OSGi108ActivatorB
Export-Package: org.jboss.test.osgi.jbosgi108.bundleB
Import-Package: org.osgi.framework, org.jboss.test.osgi.jbosgi108.bundleA
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleA.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleA.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi112-bundleA.jar src/test/resources/jbosgi112/jbosgi112-bundleA.bnd
Bundle-SymbolicName: jbosgi112-bundleA
-Bundle-Activator: org.jboss.test.osgi.jbosgi112.bundleA.ActivatorBundleA
+Bundle-Activator: org.jboss.test.osgi.jbosgi112.bundleA.OSGi112ActivatorA
Export-Package: org.jboss.test.osgi.jbosgi112.bundleA
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleB.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi112/jbosgi112-bundleB.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,7 +1,7 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi112-bundleB.jar src/test/resources/jbosgi112/jbosgi112-bundleB.bnd
Bundle-SymbolicName: jbosgi112-bundleB
-Bundle-Activator: org.jboss.test.osgi.jbosgi112.bundleB.ActivatorBundleB
+Bundle-Activator: org.jboss.test.osgi.jbosgi112.bundleB.OSGi112ActivatorB
Export-Package: org.jboss.test.osgi.jbosgi112.bundleB
Import-Package: org.osgi.framework, org.jboss.test.osgi.jbosgi112.bundleA
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi161/jbosgi161-bundle.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi161-bundle.jar src/test/resources/jbosgi161/bundle.bnd
Bundle-SymbolicName: jbosgi161-bundle
-Bundle-Activator: org.jboss.test.osgi.jbosgi161.bundle.Activator161
+Bundle-Activator: org.jboss.test.osgi.jbosgi161.bundle.OSGi161Activator
Private-Package: org.jboss.test.osgi.jbosgi161.bundle
Import-Package: org.apache.commons.logging, org.slf4j, org.osgi.framework
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi214/jbosgi214-bundle.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi214-bundle.jar src/test/resources/jbosgi214/jbosgi214-bundle.bnd
Bundle-SymbolicName: jbosgi214-bundle
-Bundle-Activator: org.jboss.test.osgi.jbosgi214.bundle.Activator214
+Bundle-Activator: org.jboss.test.osgi.jbosgi214.bundle.OSGi214Activator
Export-Package: org.jboss.test.osgi.jbosgi214.bundle
Import-Package: org.jboss.test.osgi.jbosgi214, org.osgi.framework
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleA.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,7 +1,7 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi37-bundleA.jar src/test/resources/jbosgi37/jbosgi37-bundleA.bnd
Bundle-SymbolicName: jbosgi37-bundleA
-Bundle-Activator: org.jboss.test.osgi.jbosgi37.bundleA.ServiceActivator
+Bundle-Activator: org.jboss.test.osgi.jbosgi37.bundleA.OSGi37ActivatorA
Export-Package: org.jboss.test.osgi.jbosgi37.bundleA
Include-Resource: ../../../target/test-libs/jbosgi37-subA.jar
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi37/jbosgi37-bundleB.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,7 +1,7 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi37-bundleB.jar src/test/resources/jbosgi37/jbosgi37-bundleB.bnd
Bundle-SymbolicName: jbosgi37-bundleB
-Bundle-Activator: org.jboss.test.osgi.jbosgi37.bundleB.ServiceActivator
+Bundle-Activator: org.jboss.test.osgi.jbosgi37.bundleB.OSGi37ActivatorB
Export-Package: org.jboss.test.osgi.jbosgi37.bundleB
Include-Resource: ../../../target/test-libs/jbosgi37-subB.jar
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleA.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleA.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi38-bundleA.jar src/test/resources/jbosgi38/bundleA.bnd
Bundle-SymbolicName: jbosgi38-bundleA
-Bundle-Activator: org.jboss.test.osgi.jbosgi38.bundleA.ServiceActivator
+Bundle-Activator: org.jboss.test.osgi.jbosgi38.bundleA.OSGi38ActivatorA
Export-Package: org.jboss.test.osgi.jbosgi38.bundleA
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleB.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi38/jbosgi38-bundleB.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi38-bundleB.jar src/test/resources/jbosgi38/bundleB.bnd
Bundle-SymbolicName: jbosgi38-bundleB
-Bundle-Activator: org.jboss.test.osgi.jbosgi38.bundleB.ServiceActivator
+Bundle-Activator: org.jboss.test.osgi.jbosgi38.bundleB.OSGi38ActivatorB
Export-Package: org.jboss.test.osgi.jbosgi38.bundleB
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi39/jbosgi39-bundleB.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi39-bundleB.jar src/test/resources/jbosgi39/bundleB.bnd
Bundle-SymbolicName: jbosgi39-bundleB
-Bundle-Activator: org.jboss.test.osgi.jbosgi39.bundleB.ServiceActivator
+Bundle-Activator: org.jboss.test.osgi.jbosgi39.bundleB.OSGi39ActivatorB
Export-Package: org.jboss.test.osgi.jbosgi39.bundleB
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi41/jbosgi41-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi41/jbosgi41-bundleA.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi41/jbosgi41-bundleA.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi41-bundleA.jar src/test/resources/jbosgi41/jbosgi41-bundleA.bnd
Bundle-SymbolicName: jbosgi41-bundleA
-Bundle-Activator: org.jboss.test.osgi.jbosgi41.bundleA.ServiceActivator
+Bundle-Activator: org.jboss.test.osgi.jbosgi41.bundleA.OSGi41Activator
Export-Package: org.jboss.test.osgi.jbosgi41.bundleA
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi99/jbosgi99-failonstart.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi99/jbosgi99-failonstart.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi99/jbosgi99-failonstart.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi99-bundleA.jar src/test/resources/jbosgi99/jbosgi99-bundleA.bnd
Bundle-SymbolicName: jbosgi99-failonstart
-Bundle-Activator: org.jboss.test.osgi.jbosgi99.bundle.Activator99
+Bundle-Activator: org.jboss.test.osgi.jbosgi99.bundle.OSGi99Activator
Private-Package: org.jboss.test.osgi.jbosgi99.bundle
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbossas/jbosgi36/jbosgi36.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbossas/jbosgi36/jbosgi36.bnd 2010-01-29 08:33:40 UTC (rev 100115)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbossas/jbosgi36/jbosgi36.bnd 2010-01-29 09:40:50 UTC (rev 100116)
@@ -1,7 +1,7 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi36-bundle.jar src/test/resources/jbosgi36/jbosgi36.bnd
Bundle-SymbolicName: jbosgi36
-Bundle-Activator: org.jboss.test.osgi.jbossas.jbosgi36.bundle.internal.ServiceActivator
+Bundle-Activator: org.jboss.test.osgi.jbossas.jbosgi36.bundle.internal.OSGi36Activator
Export-Package: org.jboss.test.osgi.jbossas.jbosgi36.bundle
Private-Package: org.jboss.test.osgi.jbossas.jbosgi36.bundle.internal
15 years, 10 months
JBoss-OSGI SVN: r100114 - projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-29 03:13:06 -0500 (Fri, 29 Jan 2010)
New Revision: 100114
Modified:
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java
Log:
[JBOSGI-210] Bundle installed but not started with hot deploy
Use atomic move instead of copy
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java 2010-01-29 07:51:03 UTC (rev 100113)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi99/OSGi99TestCase.java 2010-01-29 08:13:06 UTC (rev 100114)
@@ -131,6 +131,7 @@
}
@Test
+ // [JBOSGI-210] Bundle installed but not started with hot deploy
public void testHotDeploy() throws Exception
{
if (runtime.isRemoteRuntime() == false)
@@ -138,11 +139,15 @@
File inFile = getTestArchiveFile("jbosgi99-allgood.jar");
- // Copy the bundle to the deploy directory
- String outPath = runtime.getBundle(0).getDataFile("dummy").getAbsolutePath();
+ // Copy the bundle to the data directory
+ String outPath = runtime.getBundle(0).getDataFile("jbosgi99-allgood.jar").getAbsolutePath();
+ File outFile = new File(outPath);
+ copyfile(inFile, outFile);
+
+ // Move the bundle to the deploy directory
outPath = outPath.substring(0, outPath.indexOf("data/osgi-store"));
- File outFile = new File(outPath + "deploy/jbosgi99-allgood.jar");
- copyfile(inFile, outFile);
+ File deployFile = new File(outPath + "deploy/jbosgi99-allgood.jar");
+ outFile.renameTo(deployFile);
int timeout = 5000;
OSGiBundle bundle = null;
@@ -160,7 +165,7 @@
assertBundleState(Bundle.ACTIVE, bundle.getState());
// Delete the bundle from the deploy directory
- outFile.delete();
+ deployFile.delete();
timeout = 5000;
while (timeout > 0)
15 years, 10 months
JBoss-OSGI SVN: r100092 - projects/jboss-osgi/projects/osgitck/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-28 17:49:17 -0500 (Thu, 28 Jan 2010)
New Revision: 100092
Modified:
projects/jboss-osgi/projects/osgitck/trunk/build.xml
Log:
setup.vi
Modified: projects/jboss-osgi/projects/osgitck/trunk/build.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-01-28 22:28:11 UTC (rev 100091)
+++ projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-01-28 22:49:17 UTC (rev 100092)
@@ -11,7 +11,7 @@
<!-- $Id: build.xml 93515 2009-09-15 07:18:21Z thomas.diesler(a)jboss.com $ -->
-<project default="setup.jboss">
+<project default="setup.vi">
<property name="target.dir" value="${basedir}/target" />
<property name="reports.dir" value="${target.dir}/test-reports" />
@@ -75,8 +75,8 @@
<ant dir="${osgitck.dir}" target="build-clean" />
</target>
- <!-- Setup the TCK to use the JBoss OSGi Framework -->
- <target name="setup.jboss" description="Setup the TCK using the JBoss OSGi Framework" depends="init">
+ <!-- Setup the TCK to use the Vendor Implemenation -->
+ <target name="setup.vi" description="Setup the TCK using the Vendor Implemenation" depends="init">
<!-- Overlay the TCK setup -->
<copy todir="${osgitck.dir}" overwrite="true">
15 years, 10 months
JBoss-OSGI SVN: r100082 - projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-28 15:21:58 -0500 (Thu, 28 Jan 2010)
New Revision: 100082
Modified:
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/config.xml
Log:
numExecutors=1
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/config.xml 2010-01-28 20:12:13 UTC (rev 100081)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/config.xml 2010-01-28 20:21:58 UTC (rev 100082)
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<version>1.336</version>
- <numExecutors>2</numExecutors>
+ <numExecutors>1</numExecutors>
<mode>NORMAL</mode>
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
15 years, 10 months
JBoss-OSGI SVN: r100081 - projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-28 15:12:13 -0500 (Thu, 28 Jan 2010)
New Revision: 100081
Modified:
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml
Log:
Add jta tests
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml 2010-01-28 20:11:07 UTC (rev 100080)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml 2010-01-28 20:12:13 UTC (rev 100081)
@@ -42,8 +42,8 @@
# Setup the TCK
ant clean setup.ri
-# Run the jndi tests
-ant run-jndi-tests
+# Run the jta tests
+ant run-jta-tests
</command>
</hudson.tasks.Shell>
</builders>
15 years, 10 months
JBoss-OSGI SVN: r100080 - in projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs: osgi.core.tests and 4 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-28 15:11:07 -0500 (Thu, 28 Jan 2010)
New Revision: 100080
Modified:
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.blueprint.tests/config.xml
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.core.tests/config.xml
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jdbc.tests/config.xml
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jmx.tests/config.xml
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.webapp.tests/config.xml
Log:
Fix test reports dir
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.blueprint.tests/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.blueprint.tests/config.xml 2010-01-28 20:06:03 UTC (rev 100079)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.blueprint.tests/config.xml 2010-01-28 20:11:07 UTC (rev 100080)
@@ -49,7 +49,7 @@
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver>
- <testResults>osgitck-setup/target/osgitck-r4v42/*/generated/**/test-reports/TEST-*.xml</testResults>
+ <testResults>osgitck.dir/*/generated/**/test-reports/TEST-*.xml</testResults>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.core.tests/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.core.tests/config.xml 2010-01-28 20:06:03 UTC (rev 100079)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.core.tests/config.xml 2010-01-28 20:11:07 UTC (rev 100080)
@@ -62,7 +62,7 @@
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver>
- <testResults>osgitck-setup/target/osgitck-r4v42/*/generated/**/test-reports/TEST-*.xml</testResults>
+ <testResults>osgitck.dir/*/generated/**/test-reports/TEST-*.xml</testResults>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jdbc.tests/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jdbc.tests/config.xml 2010-01-28 20:06:03 UTC (rev 100079)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jdbc.tests/config.xml 2010-01-28 20:11:07 UTC (rev 100080)
@@ -49,7 +49,7 @@
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver>
- <testResults>osgitck-setup/target/osgitck-r4v42/*/generated/**/test-reports/TEST-*.xml</testResults>
+ <testResults>osgitck.dir/*/generated/**/test-reports/TEST-*.xml</testResults>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jmx.tests/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jmx.tests/config.xml 2010-01-28 20:06:03 UTC (rev 100079)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jmx.tests/config.xml 2010-01-28 20:11:07 UTC (rev 100080)
@@ -49,7 +49,7 @@
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver>
- <testResults>osgitck-setup/target/osgitck-r4v42/*/generated/**/test-reports/TEST-*.xml</testResults>
+ <testResults>osgitck.dir/*/generated/**/test-reports/TEST-*.xml</testResults>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml 2010-01-28 20:06:03 UTC (rev 100079)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.jndi.tests/config.xml 2010-01-28 20:11:07 UTC (rev 100080)
@@ -49,7 +49,7 @@
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver>
- <testResults>osgitck-setup/target/osgitck-r4v42/*/generated/**/test-reports/TEST-*.xml</testResults>
+ <testResults>osgitck.dir/*/generated/**/test-reports/TEST-*.xml</testResults>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>
Modified: projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.webapp.tests/config.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.webapp.tests/config.xml 2010-01-28 20:06:03 UTC (rev 100079)
+++ projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.webapp.tests/config.xml 2010-01-28 20:11:07 UTC (rev 100080)
@@ -49,7 +49,7 @@
</builders>
<publishers>
<hudson.tasks.junit.JUnitResultArchiver>
- <testResults>osgitck-setup/target/osgitck-r4v42/*/generated/**/test-reports/TEST-*.xml</testResults>
+ <testResults>osgitck.dir/*/generated/**/test-reports/TEST-*.xml</testResults>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
</publishers>
15 years, 10 months
JBoss-OSGI SVN: r100079 - projects/jboss-osgi/projects/osgitck/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-28 15:06:03 -0500 (Thu, 28 Jan 2010)
New Revision: 100079
Modified:
projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example
Log:
Update ant.properties
Modified: projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example 2010-01-28 20:05:20 UTC (rev 100078)
+++ projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example 2010-01-28 20:06:03 UTC (rev 100079)
@@ -18,6 +18,12 @@
# Hudson Setup ----------------------------------------------------------------
+# Hudson workspace root
+# hudson.root=/home/username/workspace/osgitck
+
+# Hudson QA Environment
+# hudson.username=username
+
# The Hudson OSGi TCK checkout URL
osgitck.svn.url=https://www.osgi.org/members/svn/build/trunk
osgitck.core.svn.url=https://www.osgi.org/members/svn/build/tags/r4v42-co...
@@ -30,12 +36,6 @@
hudson.maven.name=apache-maven-2.2.1
hudson.maven.path=/usr/java/apache-maven-2.2.1
-# Hudson QA Environment
-# hudson.username=username
-
-# Hudson workspace root
-# hudson.root=/home/username/workspace/osgitck
-
hudson.host=localhost
hudson.admin.port=8150
hudson.http.port=8180
15 years, 10 months
JBoss-OSGI SVN: r100078 - projects/jboss-osgi/projects/osgitck/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-01-28 15:05:20 -0500 (Thu, 28 Jan 2010)
New Revision: 100078
Modified:
projects/jboss-osgi/projects/osgitck/trunk/build.xml
Log:
Run build-clean in tck root
Modified: projects/jboss-osgi/projects/osgitck/trunk/build.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-01-28 19:55:57 UTC (rev 100077)
+++ projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-01-28 20:05:20 UTC (rev 100078)
@@ -72,7 +72,7 @@
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
<!-- Build the TCK -->
- <ant dir="${osgitck.dir}/osgi.ct" target="build-clean" />
+ <ant dir="${osgitck.dir}" target="build-clean" />
</target>
<!-- Setup the TCK to use the JBoss OSGi Framework -->
@@ -87,7 +87,7 @@
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
<!-- Build the TCK -->
- <ant dir="${osgitck.dir}/osgi.ct" target="build-clean" />
+ <ant dir="${osgitck.dir}" target="build-clean" />
</target>
<!-- ================================================================== -->
15 years, 10 months