JBoss-OSGI SVN: r100977 - projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2010-02-15 12:32:11 -0500 (Mon, 15 Feb 2010)
New Revision: 100977
Modified:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java
Log:
Make mdr demand optional.
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java 2010-02-15 17:30:56 UTC (rev 100976)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java 2010-02-15 17:32:11 UTC (rev 100977)
@@ -85,7 +85,8 @@
builder.addRelatedClass(exposedType, "OSGi");
}
}
- builder.addDemand(mdrService, ControllerState.PRE_INSTALL, null);
+ if (mdrService != null)
+ builder.addDemand(mdrService, ControllerState.PRE_INSTALL, null);
initialized = true;
}
15 years, 10 months
JBoss-OSGI SVN: r100976 - projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2010-02-15 12:30:56 -0500 (Mon, 15 Feb 2010)
New Revision: 100976
Modified:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java
Log:
Use bmd builder.
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java 2010-02-15 16:22:49 UTC (rev 100975)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java 2010-02-15 17:30:56 UTC (rev 100976)
@@ -23,11 +23,8 @@
package org.jboss.osgi.framework.metadata.internal;
import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractDemandMetaData;
-import org.jboss.beans.metadata.plugins.AbstractRelatedClassMetaData;
import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.DemandMetaData;
-import org.jboss.beans.metadata.spi.RelatedClassMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ManagementProperties;
@@ -35,7 +32,6 @@
import javax.xml.bind.annotation.*;
import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -81,32 +77,16 @@
{
if (initialized == false)
{
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(this);
if (exposedTypes != null && exposedTypes.isEmpty() == false)
{
- Set<RelatedClassMetaData> rcmds = getRelated();
- if (rcmds == null)
- {
- rcmds = new HashSet<RelatedClassMetaData>();
- setRelated(rcmds);
- }
for (String exposedType : exposedTypes)
{
- AbstractRelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(exposedType);
- rcmd.setEnabled(Collections.<Object>singleton("OSGi"));
- rcmds.add(rcmd);
+ builder.addRelatedClass(exposedType, "OSGi");
}
}
+ builder.addDemand(mdrService, ControllerState.PRE_INSTALL, null);
- Set<DemandMetaData> demands = getDemands();
- if (demands == null)
- {
- demands = new HashSet<DemandMetaData>();
- setDemands(demands);
- }
- AbstractDemandMetaData dmd = new AbstractDemandMetaData(mdrService);
- dmd.setWhenRequired(ControllerState.PRE_INSTALL);
- demands.add(dmd);
-
initialized = true;
}
return Collections.singletonList((BeanMetaData)this);
15 years, 10 months
JBoss-OSGI SVN: r100975 - projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2010-02-15 11:22:49 -0500 (Mon, 15 Feb 2010)
New Revision: 100975
Modified:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ContextComparator.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextPluginImpl.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleContextWrapper.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleValidatorR4.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleWrapper.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiControllerContextActions.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiFragmentState.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceRefDictionary.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSEntryPathsEnumeration.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSFindEntriesEnumeration.java
Log:
Optimize imports.
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,25 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.security.Permission;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.util.concurrent.atomic.AtomicInteger;
-
import org.jboss.dependency.plugins.tracker.AbstractContextTracker;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.tracker.ContextTracking;
@@ -52,23 +33,17 @@
import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.osgi.spi.util.ConstantsHelper;
import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.AdminPermission;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.BundleListener;
-import org.osgi.framework.Constants;
-import org.osgi.framework.Filter;
-import org.osgi.framework.FrameworkListener;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.framework.SynchronousBundleListener;
-import org.osgi.framework.Version;
+import org.osgi.framework.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.security.Permission;
+import java.security.cert.X509Certificate;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+
/**
* The abstract state of all bundles.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,16 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicLong;
-
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.osgi.deployment.deployer.Deployment;
@@ -41,6 +31,12 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicLong;
+
/**
* The abstract state of a user deployed {@link Bundle} or Fragment.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ContextComparator.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ContextComparator.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ContextComparator.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,10 +21,10 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.jboss.dependency.spi.ControllerContext;
+
import java.util.Comparator;
-import org.jboss.dependency.spi.ControllerContext;
-
/**
* Compare controller contexts.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextPluginImpl.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextPluginImpl.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -23,12 +23,6 @@
//$Id$
-import java.util.Collections;
-import java.util.Set;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-import java.util.jar.Attributes.Name;
-
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.deployers.structure.spi.DeploymentRegistry;
import org.jboss.deployers.structure.spi.DeploymentUnit;
@@ -40,6 +34,12 @@
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceRegistration;
+import java.util.Collections;
+import java.util.Set;
+import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
+import java.util.jar.Manifest;
+
/**
* A plugin that manages OSGi services
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,17 +21,17 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.Dictionary;
-
import org.jboss.kernel.spi.metadata.KernelMetaDataRepository;
+import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
import org.jboss.metadata.spi.loader.MutableMetaDataLoader;
import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
import org.jboss.metadata.spi.scope.CommonLevels;
import org.jboss.metadata.spi.scope.Scope;
import org.jboss.metadata.spi.scope.ScopeKey;
-import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
+import java.util.Dictionary;
+
/**
* Describe osgi service.
* Put its properties into MDR.
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DictionaryFactory.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/DictionaryFactory.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,10 +21,10 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.jboss.dependency.spi.ControllerContext;
+
import java.util.Dictionary;
-import org.jboss.dependency.spi.ControllerContext;
-
/**
* Get OSGi's dictionary from controller context instance.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,9 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.Dictionary;
-import java.util.Set;
-
import org.jboss.beans.metadata.api.model.QualifierContent;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.spi.qualifier.QualifierMatcher;
@@ -34,6 +31,9 @@
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.InvalidSyntaxException;
+import java.util.Dictionary;
+import java.util.Set;
+
/**
* OSGi filter parsing and matching.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,11 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Set;
-
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.tracker.ContextTracker;
import org.jboss.dependency.spi.tracker.ContextTracking;
@@ -33,6 +28,11 @@
import org.jboss.osgi.framework.util.KernelUtils;
import org.osgi.framework.Bundle;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* GenericServiceReferenceWrapper.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,10 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.Dictionary;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
import org.jboss.dependency.spi.Controller;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.Kernel;
@@ -36,6 +32,10 @@
import org.jboss.metadata.spi.scope.Scope;
import org.jboss.metadata.spi.scope.ScopeKey;
+import java.util.Dictionary;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
+
/**
* Add OSGi's dictionary to MDR.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,10 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.Dictionary;
-import java.util.HashSet;
-import java.util.Set;
-
import org.jboss.beans.info.spi.BeanInfo;
import org.jboss.beans.metadata.spi.BeanMetaData;
import org.jboss.beans.metadata.spi.RelatedClassMetaData;
@@ -34,6 +30,10 @@
import org.jboss.reflect.spi.ClassInfo;
import org.osgi.framework.Constants;
+import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.Set;
+
/**
* Kernel dictionary factory.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MDRUtils.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,11 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.Enumeration;
-
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.logging.Logger;
import org.jboss.metadata.spi.MetaData;
@@ -37,6 +32,11 @@
import org.osgi.framework.Bundle;
import org.osgi.framework.Constants;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Enumeration;
+
/**
* MetaDataRepository utils.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,7 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import org.jboss.dependency.plugins.tracker.NoopContextTracker;
import org.jboss.dependency.spi.tracker.ContextTracker;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.qualifier.QualifierMatchers;
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleContextWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleContextWrapper.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleContextWrapper.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -23,22 +23,13 @@
// $Id: $
+import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.*;
+
import java.io.File;
import java.io.InputStream;
import java.util.Dictionary;
-import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.BundleListener;
-import org.osgi.framework.Filter;
-import org.osgi.framework.FrameworkListener;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
-
/**
* A wrapper around the bundle state that just exposes the BundleContext API.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,33 +21,8 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicInteger;
-
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerState;
-import org.jboss.dependency.spi.tracker.ContextTracker;
import org.jboss.deployers.client.spi.DeployerClient;
import org.jboss.deployers.client.spi.IncompleteDeploymentException;
import org.jboss.deployers.client.spi.IncompleteDeployments;
@@ -61,42 +36,34 @@
import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.kernel.Kernel;
-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.deployment.deployer.Deployment;
import org.jboss.osgi.deployment.deployer.DeploymentFactory;
import org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer;
import org.jboss.osgi.framework.metadata.OSGiMetaData;
import org.jboss.osgi.framework.metadata.ParameterizedAttribute;
-import org.jboss.osgi.framework.plugins.AutoInstallPlugin;
-import org.jboss.osgi.framework.plugins.BundleStoragePlugin;
-import org.jboss.osgi.framework.plugins.FrameworkEventsPlugin;
-import org.jboss.osgi.framework.plugins.PackageAdminPlugin;
-import org.jboss.osgi.framework.plugins.Plugin;
-import org.jboss.osgi.framework.plugins.ResolverPlugin;
-import org.jboss.osgi.framework.plugins.ServicePlugin;
+import org.jboss.osgi.framework.plugins.*;
import org.jboss.osgi.framework.util.URLHelper;
import org.jboss.osgi.spi.util.BundleInfo;
import org.jboss.util.platform.Java;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VFSUtils;
import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleEvent;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.Version;
+import org.osgi.framework.*;
import org.osgi.service.packageadmin.PackageAdmin;
+import java.io.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
+
/**
* OSGiBundleManager.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -23,6 +23,15 @@
// $Id: $
+import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.framework.classloading.OSGiClassLoadingMetaData;
+import org.jboss.osgi.framework.classloading.OSGiClassLoadingMetaData.FragmentHostMetaData;
+import org.jboss.osgi.framework.metadata.OSGiMetaData;
+import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
+import org.osgi.framework.*;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -32,20 +41,6 @@
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.framework.classloading.OSGiClassLoadingMetaData;
-import org.jboss.osgi.framework.classloading.OSGiClassLoadingMetaData.FragmentHostMetaData;
-import org.jboss.osgi.framework.metadata.OSGiMetaData;
-import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
-import org.osgi.framework.AdminPermission;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Version;
-
/**
* The state of a user deployed {@link Bundle} and its associated {@link BundleContext}.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleValidatorR4.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleValidatorR4.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleValidatorR4.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,14 +21,14 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.jboss.osgi.framework.metadata.OSGiMetaData;
+import org.jboss.osgi.framework.metadata.PackageAttribute;
+import org.osgi.framework.Constants;
+
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.jboss.osgi.framework.metadata.OSGiMetaData;
-import org.jboss.osgi.framework.metadata.PackageAttribute;
-import org.osgi.framework.Constants;
-
/**
* A bundle validator for OSGi R4.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleWrapper.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleWrapper.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,6 +21,8 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.osgi.framework.*;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -30,12 +32,6 @@
import java.util.List;
import java.util.Map;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.Version;
-
/**
* OSGiBundleWrapper.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiControllerContextActions.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiControllerContextActions.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiControllerContextActions.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,14 +21,14 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.HashMap;
-import java.util.Map;
-
import org.jboss.dependency.plugins.AbstractControllerContextActions;
import org.jboss.dependency.plugins.action.ControllerContextAction;
import org.jboss.dependency.spi.ControllerContextActions;
import org.jboss.dependency.spi.ControllerState;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* OSGi actions.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiFragmentState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiFragmentState.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiFragmentState.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,16 +21,16 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.NotImplementedException;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-
/**
* The state of a fragment {@link Bundle}.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceRegistrationWrapper.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,11 +21,11 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.util.Dictionary;
-
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
+import java.util.Dictionary;
+
/**
* OSGiServiceRegistrationWrapper.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,18 +21,6 @@
*/
package org.jboss.osgi.framework.bundle;
-import java.security.AccessControlContext;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Dictionary;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicLong;
-
import org.jboss.beans.info.spi.BeanInfo;
import org.jboss.dependency.plugins.AbstractControllerContext;
import org.jboss.dependency.spi.ControllerContext;
@@ -51,16 +39,13 @@
import org.jboss.osgi.spi.util.BundleClassLoader;
import org.jboss.util.collection.CollectionsFactory;
import org.jboss.util.id.GUID;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceFactory;
-import org.osgi.framework.ServicePermission;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.*;
+import java.security.AccessControlContext;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicLong;
+
/**
* OSGiServiceState.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiSystemState.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,19 +21,19 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.jboss.osgi.framework.metadata.OSGiMetaData;
+import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
import java.util.jar.Attributes;
+import java.util.jar.Attributes.Name;
import java.util.jar.Manifest;
-import java.util.jar.Attributes.Name;
-import org.jboss.osgi.framework.metadata.OSGiMetaData;
-import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
/**
* OSGiSystemBundle.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceRefDictionary.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceRefDictionary.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceRefDictionary.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,11 +21,11 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.osgi.framework.ServiceReference;
+
import java.util.Dictionary;
import java.util.Enumeration;
-import org.osgi.framework.ServiceReference;
-
/**
* Service reference based dictionary.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSEntryPathsEnumeration.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSEntryPathsEnumeration.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSEntryPathsEnumeration.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,14 +21,14 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.jboss.virtual.VirtualFile;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
-import org.jboss.virtual.VirtualFile;
-
/**
* VFSEntryPathsEnumeration.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSFindEntriesEnumeration.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSFindEntriesEnumeration.java 2010-02-15 15:54:54 UTC (rev 100974)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/VFSFindEntriesEnumeration.java 2010-02-15 16:22:49 UTC (rev 100975)
@@ -21,6 +21,11 @@
*/
package org.jboss.osgi.framework.bundle;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileVisitor;
+import org.jboss.virtual.VisitorAttributes;
+import org.jboss.virtual.plugins.vfs.helpers.MatchAllVirtualFileFilter;
+
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
@@ -29,11 +34,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
-import org.jboss.virtual.plugins.vfs.helpers.MatchAllVirtualFileFilter;
-
/**
* VFSFindEntriesEnumeration.
*
15 years, 10 months
JBoss-OSGI SVN: r100973 - in projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src: main/java/org/jboss/osgi/framework/metadata/internal and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2010-02-15 10:52:06 -0500 (Mon, 15 Feb 2010)
New Revision: 100973
Added:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java
Modified:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml
Log:
Simplify pojo usage -- custom metadata.
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-02-15 15:45:12 UTC (rev 100972)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-02-15 15:52:06 UTC (rev 100973)
@@ -188,6 +188,22 @@
<bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer" class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />
+ <bean name="OSGiSingletonSchemaResolverFactory">
+ <constructor factoryClass="org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory" factoryMethod="getInstance"/>
+ </bean>
+ <bean name="Pojo2OSGiSchema" class="org.jboss.xb.binding.resolver.MutableSchemaResolver">
+ <constructor factoryMethod="getSchemaBindingResolver">
+ <factory bean="OSGiSingletonSchemaResolverFactory"/>
+ </constructor>
+ <install method="mapURIToClass">
+ <parameter>urn:jboss:pojo2osgi:1.0</parameter>
+ <parameter>org.jboss.osgi.framework.metadata.internal.OSGiPojoMetaData</parameter>
+ </install>
+ <uninstall method="removeURIToClassMapping">
+ <parameter>urn:jboss:pojo2osgi:1.0</parameter>
+ </uninstall>
+ </bean>
+
<!--
********************************
* *
Added: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/metadata/internal/OSGiPojoMetaData.java 2010-02-15 15:52:06 UTC (rev 100973)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.metadata.internal;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractDemandMetaData;
+import org.jboss.beans.metadata.plugins.AbstractRelatedClassMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.DemandMetaData;
+import org.jboss.beans.metadata.spi.RelatedClassMetaData;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+import javax.xml.bind.annotation.*;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Simplify pojo 2 osgi metadata.
+ *
+ * @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
+ */
+@ManagementObject(properties = ManagementProperties.EXPLICIT)
+@JBossXmlSchema(namespace="urn:jboss:pojo2osgi:1.0", elementFormDefault= XmlNsForm.QUALIFIED)
+@XmlRootElement(name="osgi")
+@XmlType(name="osgiType", propOrder={"exposedTypes", "aliasMetaData", "related", "annotations", "classLoader", "constructor", "properties", "create", "start", "stop", "destroy", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
+public class OSGiPojoMetaData extends AbstractBeanMetaData
+{
+ private Set<String> exposedTypes;
+ private String mdrService = "MDRService";
+ private volatile boolean initialized;
+
+ public Set<String> getExposedTypes()
+ {
+ return exposedTypes;
+ }
+
+ @XmlElement(name="exposed-type")
+ public void setExposedTypes(Set<String> exposedTypes)
+ {
+ this.exposedTypes = exposedTypes;
+ }
+
+ public String getMdrService()
+ {
+ return mdrService;
+ }
+
+ @XmlAttribute(name = "MDRService")
+ public void setMdrService(String mdrService)
+ {
+ this.mdrService = mdrService;
+ }
+
+ @Override
+ public List<BeanMetaData> getBeans()
+ {
+ if (initialized == false)
+ {
+ if (exposedTypes != null && exposedTypes.isEmpty() == false)
+ {
+ Set<RelatedClassMetaData> rcmds = getRelated();
+ if (rcmds == null)
+ {
+ rcmds = new HashSet<RelatedClassMetaData>();
+ setRelated(rcmds);
+ }
+ for (String exposedType : exposedTypes)
+ {
+ AbstractRelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(exposedType);
+ rcmd.setEnabled(Collections.<Object>singleton("OSGi"));
+ rcmds.add(rcmd);
+ }
+ }
+
+ Set<DemandMetaData> demands = getDemands();
+ if (demands == null)
+ {
+ demands = new HashSet<DemandMetaData>();
+ setDemands(demands);
+ }
+ AbstractDemandMetaData dmd = new AbstractDemandMetaData(mdrService);
+ dmd.setWhenRequired(ControllerState.PRE_INSTALL);
+ demands.add(dmd);
+
+ initialized = true;
+ }
+ return Collections.singletonList((BeanMetaData)this);
+ }
+}
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2010-02-15 15:45:12 UTC (rev 100972)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2010-02-15 15:52:06 UTC (rev 100973)
@@ -21,19 +21,12 @@
*/
package org.jboss.test.osgi.service;
-import java.lang.reflect.Method;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.List;
-
import junit.framework.Test;
-
import org.jboss.beans.metadata.spi.BeanMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.test.osgi.DeployersTest;
import org.jboss.test.osgi.service.support.LazyBundle;
import org.jboss.test.osgi.service.support.a.A;
import org.jboss.test.osgi.service.support.a.AMBean;
@@ -45,6 +38,10 @@
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+
/**
* Test MC's service mixture.
*
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-15 15:45:12 UTC (rev 100972)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-15 15:52:06 UTC (rev 100973)
@@ -197,6 +197,22 @@
<bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer" class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />
+ <bean name="OSGiSingletonSchemaResolverFactory">
+ <constructor factoryClass="org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory" factoryMethod="getInstance"/>
+ </bean>
+ <bean name="Pojo2OSGiSchema" class="org.jboss.xb.binding.resolver.MutableSchemaResolver">
+ <constructor factoryMethod="getSchemaBindingResolver">
+ <factory bean="OSGiSingletonSchemaResolverFactory"/>
+ </constructor>
+ <install method="mapURIToClass">
+ <parameter>urn:jboss:pojo2osgi:1.0</parameter>
+ <parameter>org.jboss.osgi.framework.metadata.internal.OSGiPojoMetaData</parameter>
+ </install>
+ <uninstall method="removeURIToClassMapping">
+ <parameter>urn:jboss:pojo2osgi:1.0</parameter>
+ </uninstall>
+ </bean>
+
<!--
********************************
* *
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml 2010-02-15 15:45:12 UTC (rev 100972)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml 2010-02-15 15:52:06 UTC (rev 100973)
@@ -1,7 +1,7 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="A" class="org.jboss.test.osgi.service.support.a.A">
- <related-class name="org.jboss.test.osgi.service.support.a.AMBean">OSGi</related-class>
- </bean>
+ <osgi xmlns="urn:jboss:pojo2osgi:1.0" name="A" class="org.jboss.test.osgi.service.support.a.A">
+ <exposed-type>org.jboss.test.osgi.service.support.a.AMBean</exposed-type>
+ </osgi>
</deployment>
\ No newline at end of file
15 years, 10 months
JBoss-OSGI SVN: r100969 - in projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix: src/etc/osgitck and 5 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2010-02-15 09:54:11 -0500 (Mon, 15 Feb 2010)
New Revision: 100969
Added:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java
Removed:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/StartLevelPlugin.java
Modified:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/pom.xml
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/PackageAdminPlugin.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/LifecycleInterceptorServiceImpl.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/StartLevelImpl.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
Log:
Fix MDR usage. Remove duplicate service registry.
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/pom.xml 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/pom.xml 2010-02-15 14:54:11 UTC (rev 100969)
@@ -46,9 +46,9 @@
<version.apache.felix.configadmin>1.0.10</version.apache.felix.configadmin>
<version.apache.felix.log>1.0.0</version.apache.felix.log>
<version.apache.felix.metatype>1.0.2</version.apache.felix.metatype>
- <version.jboss.classloading>2.2.0.Alpha1</version.jboss.classloading>
+ <version.jboss.classloading>2.2.0.Alpha2</version.jboss.classloading>
<version.jboss.deployers>2.2.0.Alpha1</version.jboss.deployers>
- <version.jboss.kernel>2.2.0-SNAPSHOT</version.jboss.kernel>
+ <version.jboss.kernel>2.2.0.Alpha6</version.jboss.kernel>
<version.jboss.logging>2.1.0.GA</version.jboss.logging>
<version.jboss.mdr>2.2.0.Alpha1</version.jboss.mdr>
<version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-02-15 14:54:11 UTC (rev 100969)
@@ -45,7 +45,33 @@
<uncallback method="removePlugin" />
</bean>
- <!--
+ <!--
+ ********************************
+ * *
+ * OSGi Framework MDR usage *
+ * *
+ ********************************
+ -->
+
+ <bean name="MDRService" class="org.jboss.osgi.framework.bundle.MetaDataRetrievalService">
+ <constructor>
+ <parameter><inject bean="jboss.kernel:service=Kernel"/></parameter>
+ <parameter><inject bean="OSGiBundleManager" property="systemBundle"/></parameter>
+ </constructor>
+ </bean>
+ <bean name="InstanceMDRFactory" class="org.jboss.osgi.framework.bundle.InstanceMetaDataRetrievalFactory">
+ <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+ <incallback method="addFactory"/>
+ <uncallback method="removeFactory"/>
+ </bean>
+ <bean name="OSGiDictionaryFactory" class="org.jboss.osgi.framework.bundle.OSGiServiceStateDictionaryFactory"/>
+ <bean name="KernelDictionaryFactory" class="org.jboss.osgi.framework.bundle.KernelDictionaryFactory">
+ <constructor>
+ <parameter><inject bean="jboss.kernel:service=KernelConfigurator"/></parameter>
+ </constructor>
+ </bean>
+
+ <!--
********************************
* *
* OSGi Framework Plugins *
@@ -58,6 +84,7 @@
<parameter><inject bean="OSGiBundleManager" /></parameter>
<parameter><inject bean="DeploymentRegistry" /></parameter>
</constructor>
+ <property name="factory"><inject bean="InstanceMDRFactory"/></property>
</bean>
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
@@ -71,8 +98,8 @@
<bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
-
- <!--
+
+ <!--
********************************
* *
* OSGi Service Plugins *
@@ -82,14 +109,20 @@
<bean name="MicrocontainerService" class="org.jboss.osgi.framework.service.internal.MicrocontainerServiceImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <related-class name="org.jboss.osgi.spi.service.MicrocontainerService">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
<bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <related-class name="org.osgi.service.startlevel.StartLevel">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
<bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <related-class name="org.osgi.service.packageadmin.PackageAdmin">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
-
+
<!--
********************************
* *
Copied: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java (from rev 100962, projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/InstanceMetaDataRetrievalFactory.java)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/MetaDataRetrievalService.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -0,0 +1,155 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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;
+
+import org.jboss.dependency.plugins.tracker.NoopContextTracker;
+import org.jboss.dependency.spi.tracker.ContextTracker;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.qualifier.QualifierMatchers;
+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;
+
+/**
+ * Apply MDR usage.
+ *
+ * @author <a href="ales.justin(a)jboss.org">Ales Justin</a>
+ */
+public class MetaDataRetrievalService
+{
+ /** The kernel */
+ private Kernel kernel;
+ /** The system tracker */
+ private ContextTracker systemTracker;
+ /** The mdr factory */
+ private MetaDataRetrievalFactory factory;
+ /** The previous context tracker */
+ private ContextTracker previousTracker;
+
+ public MetaDataRetrievalService(Kernel kernel, ContextTracker systemTracker)
+ {
+ if (kernel == null)
+ throw new IllegalArgumentException("Null kernel");
+ if (systemTracker == null)
+ throw new IllegalArgumentException("Null system tracker");
+
+ this.kernel = kernel;
+ this.systemTracker = systemTracker;
+ }
+
+ public void start()
+ {
+ applyMDRUsage(true);
+ }
+
+ public void stop()
+ {
+ applyMDRUsage(false);
+ }
+
+ /**
+ * 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)
+ {
+ previousTracker = mmd.addMetaData(systemTracker, 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 = factory;
+ if (mdrFactory == null)
+ {
+ InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(kernel);
+ imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
+ imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
+ // add JMX via configuration, as we don't wanna depend on JMX code
+ mdrFactory = imdrf;
+ }
+ return mdrFactory;
+ }
+
+ /**
+ * Set mdr factory.
+ *
+ * @param factory the factory
+ */
+ public void setFactory(MetaDataRetrievalFactory factory)
+ {
+ this.factory = factory;
+ }
+}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -47,6 +47,7 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.tracker.ContextTracker;
import org.jboss.deployers.client.spi.DeployerClient;
import org.jboss.deployers.client.spi.IncompleteDeploymentException;
import org.jboss.deployers.client.spi.IncompleteDeployments;
@@ -60,7 +61,15 @@
import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.kernel.Kernel;
+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.deployment.deployer.Deployment;
import org.jboss.osgi.deployment.deployer.DeploymentFactory;
import org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer;
@@ -165,7 +174,6 @@
*
* @param kernel the kernel
* @param deployerClient the deployer client
- * @param registry the deployment registry
* @throws IllegalArgumentException for a null parameter
*/
public OSGiBundleManager(Kernel kernel, DeployerClient deployerClient)
@@ -178,7 +186,6 @@
*
* @param kernel the kernel
* @param deployerClient the deployer client
- * @param registry the deployment registry
* @param executor the executor
* @throws IllegalArgumentException for a null parameter
*/
@@ -236,7 +243,7 @@
/**
* Set the framework properties
*
- * @param properties the properties
+ * @param props the properties
*/
public void setProperties(Map<String, Object> props)
{
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -23,41 +23,21 @@
//$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;
+import org.osgi.framework.*;
+import java.util.*;
+
/**
* A plugin that manages OSGi services.
*
@@ -71,15 +51,8 @@
*/
public class ServiceManagerPluginImpl extends AbstractPlugin implements ServiceManagerPlugin
{
- // Provide logging
- private final Logger log = Logger.getLogger(ServiceManagerPluginImpl.class);
-
/** The kernel */
private Kernel kernel;
- /** The mdr factory */
- private MetaDataRetrievalFactory factory;
- /** The previous context tracker */
- private ContextTracker previousTracker;
public ServiceManagerPluginImpl(OSGiBundleManager bundleManager)
{
@@ -89,14 +62,8 @@
public void start()
{
kernel = getBundleManager().getKernel();
- applyMDRUsage(true);
}
- public void stop()
- {
- applyMDRUsage(false);
- }
-
public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
{
ControllerContextPlugin plugin = getBundleManager().getPlugin(ControllerContextPlugin.class);
@@ -259,80 +226,6 @@
plugin.unregisterContexts(bundleState);
}
- /**
- * 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 = factory;
- if (mdrFactory == null)
- {
- InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(kernel);
- imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
- imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
- // add JMX via configuration, as we don't wanna depend on JMX code
- mdrFactory = imdrf;
- }
- return mdrFactory;
- }
-
private Collection<ServiceReference> getServices(AbstractBundleState bundle, String clazz, Filter filter, boolean checkAssignable)
{
Set<ControllerContext> contexts;
@@ -422,14 +315,4 @@
}
return true;
}
-
- /**
- * Set mdr factory.
- *
- * @param factory the factory
- */
- public void setFactory(MetaDataRetrievalFactory factory)
- {
- this.factory = factory;
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/PackageAdminPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/PackageAdminPlugin.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/PackageAdminPlugin.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -31,6 +31,6 @@
* @author thomas.diesler(a)jboss.com
* @since 07-Sep-2009
*/
-public interface PackageAdminPlugin extends ServicePlugin, PackageAdmin
+public interface PackageAdminPlugin extends Plugin, PackageAdmin
{
}
\ No newline at end of file
Deleted: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/StartLevelPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/StartLevelPlugin.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/plugins/StartLevelPlugin.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -1,34 +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.plugins;
-
-import org.osgi.service.startlevel.StartLevel;
-
-/**
- * The StartLevel service plugin
- *
- * @author thomas.diesler(a)jboss.com
- * @since 07-Sep-2009
- */
-public interface StartLevelPlugin extends ServicePlugin, StartLevel
-{
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/LifecycleInterceptorServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/LifecycleInterceptorServiceImpl.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/LifecycleInterceptorServiceImpl.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -27,7 +27,6 @@
import org.jboss.logging.Logger;
import org.jboss.osgi.deployment.interceptor.AbstractLifecycleInterceptorService;
import org.jboss.osgi.deployment.interceptor.InvocationContext;
-import org.jboss.osgi.deployment.interceptor.LifecycleInterceptorService;
import org.jboss.osgi.deployment.internal.InvocationContextImpl;
import org.jboss.osgi.framework.bundle.AbstractDeployedBundleState;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
@@ -36,7 +35,6 @@
import org.jboss.osgi.framework.util.DeploymentUnitAttachments;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
/**
* A plugin that manages bundle lifecycle interceptors.
@@ -50,7 +48,6 @@
final Logger log = Logger.getLogger(LifecycleInterceptorServiceImpl.class);
private AbstractLifecycleInterceptorService delegate;
- private ServiceRegistration registration;
public LifecycleInterceptorServiceImpl(final OSGiBundleManager bundleManager)
{
@@ -82,18 +79,11 @@
return inv;
}
};
-
- registration = sysContext.registerService(LifecycleInterceptorService.class.getName(), delegate, null);
}
public void stopService()
{
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- delegate = null;
- }
+ delegate = null;
}
public void handleStateChange(int state, Bundle bundle)
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -23,13 +23,6 @@
//$Id$
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.management.MBeanServer;
-import javax.management.StandardMBean;
-
import org.jboss.dependency.plugins.AbstractController;
import org.jboss.dependency.plugins.AbstractControllerContext;
import org.jboss.dependency.plugins.AbstractControllerContextActions;
@@ -46,13 +39,14 @@
import org.jboss.osgi.framework.plugins.internal.AbstractServicePlugin;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
import org.jboss.osgi.spi.service.MicrocontainerService;
-import org.osgi.framework.Constants;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceListener;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.*;
+import javax.management.MBeanServer;
+import javax.management.StandardMBean;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
/**
* An implementation of the {@link MicrocontainerService}.
*
@@ -65,7 +59,7 @@
private static final Logger log = Logger.getLogger(MicrocontainerServiceImpl.class);
private Kernel kernel;
- private ServiceRegistration registration;
+ private JMXServiceListener listener;
public MicrocontainerServiceImpl(OSGiBundleManager bundleManager)
{
@@ -77,13 +71,13 @@
public void startService()
{
installKernelBean(BEAN_BUNDLE_CONTEXT, getSystemContext());
- registration = getSystemContext().registerService(MicrocontainerService.class.getName(), this, null);
// Track the MBeanServer and register this service as an MBean
try
{
String filter = "(" + Constants.OBJECTCLASS + "=" + MBeanServer.class.getName() + ")";
- getSystemContext().addServiceListener(new JMXServiceListener(this), filter);
+ listener = new JMXServiceListener(this);
+ getSystemContext().addServiceListener(listener, filter);
}
catch (InvalidSyntaxException ex)
{
@@ -93,11 +87,7 @@
public void stopService()
{
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
+ getSystemContext().removeServiceListener(listener);
}
public Object getRegisteredBean(String beanName)
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/PackageAdminImpl.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -23,10 +23,6 @@
//$Id: StartLevelImpl.java 93118 2009-09-02 08:24:44Z thomas.diesler(a)jboss.com $
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
import org.jboss.classloading.plugins.metadata.PackageCapability;
import org.jboss.classloading.spi.dependency.ClassLoading;
import org.jboss.classloading.spi.dependency.Module;
@@ -36,26 +32,25 @@
import org.jboss.deployers.plugins.classloading.AbstractDeploymentClassLoaderPolicyModule;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.logging.Logger;
-import org.jboss.osgi.framework.bundle.AbstractBundleState;
-import org.jboss.osgi.framework.bundle.AbstractDeployedBundleState;
-import org.jboss.osgi.framework.bundle.OSGiBundleManager;
-import org.jboss.osgi.framework.bundle.OSGiBundleState;
-import org.jboss.osgi.framework.bundle.OSGiFragmentState;
+import org.jboss.osgi.framework.bundle.*;
import org.jboss.osgi.framework.plugins.PackageAdminPlugin;
+import org.jboss.osgi.framework.plugins.Plugin;
import org.jboss.osgi.framework.plugins.ResolverPlugin;
-import org.jboss.osgi.framework.plugins.internal.AbstractServicePlugin;
+import org.jboss.osgi.framework.plugins.internal.AbstractPlugin;
import org.jboss.osgi.framework.resolver.Resolver;
import org.jboss.osgi.framework.resolver.ResolverBundle;
import org.jboss.osgi.spi.NotImplementedException;
import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceRegistration;
import org.osgi.framework.Version;
import org.osgi.service.packageadmin.ExportedPackage;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.service.packageadmin.RequiredBundle;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
/**
* An implementation of the {@link PackageAdmin}.
*
@@ -64,33 +59,16 @@
* @author thomas.diesler(a)jboss.com
* @since 03-Sep-2009
*/
-public class PackageAdminImpl extends AbstractServicePlugin implements PackageAdminPlugin
+public class PackageAdminImpl extends AbstractPlugin implements PackageAdminPlugin
{
/** The log */
private static final Logger log = Logger.getLogger(PackageAdminImpl.class);
- private ServiceRegistration registration;
-
public PackageAdminImpl(OSGiBundleManager bundleManager)
{
super(bundleManager);
}
- public void startService()
- {
- BundleContext sysContext = getSystemContext();
- registration = sysContext.registerService(PackageAdmin.class.getName(), this, null);
- }
-
- public void stopService()
- {
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
- }
-
@SuppressWarnings("rawtypes")
public Bundle getBundle(Class clazz)
{
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/StartLevelImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/StartLevelImpl.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/service/internal/StartLevelImpl.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -25,10 +25,9 @@
import org.jboss.logging.Logger;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
-import org.jboss.osgi.framework.plugins.StartLevelPlugin;
-import org.jboss.osgi.framework.plugins.internal.AbstractServicePlugin;
+import org.jboss.osgi.framework.plugins.Plugin;
+import org.jboss.osgi.framework.plugins.internal.AbstractPlugin;
import org.osgi.framework.Bundle;
-import org.osgi.framework.ServiceRegistration;
import org.osgi.service.startlevel.StartLevel;
/**
@@ -39,32 +38,16 @@
* @author thomas.diesler(a)jboss.com
* @since 31-Aug-2009
*/
-public class StartLevelImpl extends AbstractServicePlugin implements StartLevelPlugin
+public class StartLevelImpl extends AbstractPlugin implements StartLevel, Plugin
{
/** The log */
private static final Logger log = Logger.getLogger(StartLevelImpl.class);
- private ServiceRegistration registration;
-
public StartLevelImpl(OSGiBundleManager bundleManager)
{
super(bundleManager);
}
- public void startService()
- {
- registration = getSystemContext().registerService(StartLevel.class.getName(), this, null);
- }
-
- public void stopService()
- {
- if (registration != null)
- {
- registration.unregister();
- registration = null;
- }
- }
-
public int getBundleStartLevel(Bundle bundle)
{
return 1;
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/fragments/subA/SubBeanA.java 2010-02-15 14:54:11 UTC (rev 100969)
@@ -34,8 +34,6 @@
{
ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
PackageAdmin packageAdmin = (PackageAdmin)context.getService(sref);
- Bundle provider = packageAdmin.getBundle(getClass());
- return provider;
+ return packageAdmin.getBundle(getClass());
}
-
}
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-15 14:20:10 UTC (rev 100968)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-15 14:54:11 UTC (rev 100969)
@@ -38,8 +38,35 @@
<uncallback method="removePlugin" />
</bean>
- <!--
+ <!--
********************************
+ * *
+ * OSGi Framework MDR usage *
+ * *
+ ********************************
+ -->
+
+ <bean name="MDRService" class="org.jboss.osgi.framework.bundle.MetaDataRetrievalService">
+ <constructor>
+ <parameter><inject bean="jboss.kernel:service=Kernel"/></parameter>
+ <parameter><inject bean="OSGiBundleManager" property="systemBundle"/></parameter>
+ </constructor>
+ <property name="factory"><inject bean="InstanceMDRFactory"/></property>
+ </bean>
+ <bean name="InstanceMDRFactory" class="org.jboss.osgi.framework.bundle.InstanceMetaDataRetrievalFactory">
+ <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
+ <incallback method="addFactory"/>
+ <uncallback method="removeFactory"/>
+ </bean>
+ <bean name="OSGiDictionaryFactory" class="org.jboss.osgi.framework.bundle.OSGiServiceStateDictionaryFactory"/>
+ <bean name="KernelDictionaryFactory" class="org.jboss.osgi.framework.bundle.KernelDictionaryFactory">
+ <constructor>
+ <parameter><inject bean="jboss.kernel:service=KernelConfigurator"/></parameter>
+ </constructor>
+ </bean>
+
+ <!--
+ ********************************
* *
* OSGi Framework Plugins *
* *
@@ -62,7 +89,6 @@
</bean>
<bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- <property name="factory"><inject bean="InstanceMDRFactory"/></property>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
@@ -71,19 +97,7 @@
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
- <bean name="InstanceMDRFactory" class="org.jboss.osgi.framework.bundle.InstanceMetaDataRetrievalFactory">
- <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
- <incallback method="addFactory"/>
- <uncallback method="removeFactory"/>
- </bean>
- <bean name="OSGiDictionaryFactory" class="org.jboss.osgi.framework.bundle.OSGiServiceStateDictionaryFactory"/>
- <bean name="KernelDictionaryFactory" class="org.jboss.osgi.framework.bundle.KernelDictionaryFactory">
- <constructor>
- <parameter><inject bean="jboss.kernel:service=KernelConfigurator"/></parameter>
- </constructor>
- </bean>
-
- <!--
+ <!--
********************************
* *
* OSGi Service Plugins *
@@ -93,18 +107,29 @@
<bean name="MicrocontainerService" class="org.jboss.osgi.framework.service.internal.MicrocontainerServiceImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <related-class name="org.jboss.osgi.spi.service.MicrocontainerService">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
<bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <related-class name="org.osgi.service.startlevel.StartLevel">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
<bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <related-class name="org.osgi.service.packageadmin.PackageAdmin">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
<bean name="DeployerService" class="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <!-- only expose full impl class; TODO on POJOs and properties -->
+ <related-class name="org.jboss.osgi.framework.service.internal.DeployerServiceImpl">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
<bean name="LifecycleInterceptorService" class="org.jboss.osgi.framework.service.internal.LifecycleInterceptorServiceImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <related-class name="org.jboss.osgi.deployment.interceptor.LifecycleInterceptorService">OSGi</related-class>
+ <demand state="PreInstall">MDRService</demand>
</bean>
<!--
15 years, 10 months
JBoss-OSGI SVN: r100964 - in projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src: test/java/org/jboss/test/osgi/service and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2010-02-15 07:02:10 -0500 (Mon, 15 Feb 2010)
New Revision: 100964
Added:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/MANIFEST.MF
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml
Modified:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
Log:
Test limited pojo exposure.
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java 2010-02-15 11:55:33 UTC (rev 100963)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java 2010-02-15 12:02:10 UTC (rev 100964)
@@ -24,7 +24,6 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.spi.config.KernelConfigurator;
import org.jboss.reflect.spi.ClassInfo;
-import org.jboss.system.microcontainer.ServiceControllerContext;
import org.jboss.util.collection.Iterators;
import org.osgi.framework.Constants;
@@ -64,12 +63,12 @@
}
}
- protected class ControllerContextDictionary extends Dictionary<String, Object>
+ protected abstract class AbstractDictionary extends Dictionary<String, Object>
{
private Map<Object, Object> map;
- private ControllerContext context;
+ private ControllerContext context;
- protected ControllerContextDictionary(ControllerContext context)
+ protected AbstractDictionary(ControllerContext context)
{
this.context = context;
this.map = new ConcurrentHashMap<Object, Object>(2);
@@ -110,6 +109,33 @@
if (value != EMPTY)
return value;
+ return getClasses(context);
+ }
+
+ protected abstract String[] getClasses(ControllerContext context);
+
+ public Object put(String key, Object value)
+ {
+ return map.put(key, value);
+ }
+
+ public Object remove(Object key)
+ {
+ return map.remove(key);
+ }
+ }
+
+ // this one exposes whole target type/class hierarchy
+ protected class GenericDictionary extends AbstractDictionary
+ {
+ protected GenericDictionary(ControllerContext context)
+ {
+ super(context);
+ }
+
+ @Override
+ protected String[] getClasses(ControllerContext context)
+ {
ClassInfo clazz;
Object target = context.getTarget();
if (target != null)
@@ -125,26 +151,16 @@
Set<String> clazzes = new HashSet<String>();
traverseClass(clazz, clazzes);
classes = clazzes.toArray(new String[clazzes.size()]);
- map.put(Constants.OBJECTCLASS, classes);
+ put(Constants.OBJECTCLASS, classes);
}
return classes;
}
-
+
protected ClassInfo getFromNullTarget(ControllerContext context)
{
return null;
}
- public Object put(String key, Object value)
- {
- return map.put(key, value);
- }
-
- public Object remove(Object key)
- {
- return map.remove(key);
- }
-
protected void traverseClass(ClassInfo clazz, Set<String> classes)
{
if (clazz == null || clazz == OBJECT)
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java 2010-02-15 11:55:33 UTC (rev 100963)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java 2010-02-15 12:02:10 UTC (rev 100964)
@@ -23,13 +23,14 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.spi.config.KernelConfigurator;
+import org.jboss.system.metadata.ServiceMetaData;
import org.jboss.system.microcontainer.ServiceControllerContext;
+import org.osgi.framework.Constants;
import java.util.Dictionary;
/**
* JMX dictionary factory.
- * TODO - expose all classes, or just explicit target class and its mbean interface?
*
* @author <a href="ales.justin(a)jboss.org">Ales Justin</a>
*/
@@ -47,6 +48,32 @@
public Dictionary<String, Object> getDictionary(ServiceControllerContext context)
{
- return new ControllerContextDictionary(context);
+ return new JMXDictionary(context);
}
+
+ private class JMXDictionary extends GenericDictionary
+ {
+ protected JMXDictionary(ServiceControllerContext context)
+ {
+ super(context);
+ }
+
+ @Override
+ protected String[] getClasses(ControllerContext context)
+ {
+ ServiceControllerContext scc = ServiceControllerContext.class.cast(context);
+ ServiceMetaData smd = scc.getServiceMetaData();
+ if (smd != null)
+ {
+ String interfaceName = smd.getInterfaceName();
+ if (interfaceName != null)
+ {
+ String[] result = {interfaceName};
+ put(Constants.OBJECTCLASS, result);
+ return result;
+ }
+ }
+ return super.getClasses(context);
+ }
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java 2010-02-15 11:55:33 UTC (rev 100963)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java 2010-02-15 12:02:10 UTC (rev 100964)
@@ -22,12 +22,17 @@
package org.jboss.osgi.framework.bundle;
import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.Set;
import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.RelatedClassMetaData;
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.kernel.spi.config.KernelConfigurator;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
import org.jboss.reflect.spi.ClassInfo;
+import org.osgi.framework.Constants;
/**
* Kernel dictionary factory.
@@ -51,7 +56,7 @@
return new KernelDictionary(context);
}
- private class KernelDictionary extends ControllerContextDictionary
+ private class KernelDictionary extends GenericDictionary
{
private KernelDictionary(KernelControllerContext context)
{
@@ -59,6 +64,35 @@
}
@Override
+ protected String[] getClasses(ControllerContext context)
+ {
+ KernelControllerContext kcc = KernelControllerContext.class.cast(context);
+ BeanMetaData bmd = kcc.getBeanMetaData();
+ if (bmd != null)
+ {
+ Set<RelatedClassMetaData> rcmds = bmd.getRelated();
+ if (rcmds != null && rcmds.isEmpty() == false)
+ {
+ Set<String> classes = new HashSet<String>();
+ for (RelatedClassMetaData rcmd : rcmds)
+ {
+ if ("OSGi".equalsIgnoreCase(rcmd.getEnabled(String.class)))
+ {
+ classes.add(rcmd.getClassName());
+ }
+ }
+ if (classes.isEmpty() == false)
+ {
+ String[] result = classes.toArray(new String[classes.size()]);
+ put(Constants.OBJECTCLASS, result);
+ return result;
+ }
+ }
+ }
+ return super.getClasses(context);
+ }
+
+ @Override
protected ClassInfo getFromNullTarget(ControllerContext context)
{
KernelControllerContext kcc = KernelControllerContext.class.cast(context);
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-15 11:55:33 UTC (rev 100963)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-15 12:02:10 UTC (rev 100964)
@@ -374,7 +374,7 @@
ServiceReference ref = getServiceReferenceForContext(context);
if (filter.match(ref) && hasPermission(context))
{
- if (clazz == null || isSystemBundle == false || MDRUtils.matchClass(context, clazz))
+ if (clazz == null || MDRUtils.matchClass(context, clazz))
{
// Check the assignability
if (checkAssignable == false || MDRUtils.isAssignableTo(context, bundle))
Modified: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2010-02-15 11:55:33 UTC (rev 100963)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2010-02-15 12:02:10 UTC (rev 100964)
@@ -36,6 +36,7 @@
import org.jboss.test.osgi.DeployersTest;
import org.jboss.test.osgi.service.support.LazyBundle;
import org.jboss.test.osgi.service.support.a.A;
+import org.jboss.test.osgi.service.support.a.AMBean;
import org.jboss.test.osgi.service.support.c.C;
import org.jboss.test.osgi.service.support.d.D;
import org.jboss.virtual.AssembledDirectory;
@@ -544,4 +545,40 @@
undeploy(bean);
}
}
+
+ public void testExposedClasses() throws Throwable
+ {
+ AssembledDirectory mix = createAssembledDirectory("beans3", "");
+ addPath(mix, "/bundles/service/service-beans3", "");
+ addPackage(mix, A.class);
+ Deployment deployment = addDeployment(mix);
+ try
+ {
+ checkComplete();
+
+ Bundle bundle = getBundle(getDeploymentUnit(deployment));
+ bundle.start();
+
+ Bundle osgi = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle1"));
+ try
+ {
+ osgi.start();
+ BundleContext bundleContext = osgi.getBundleContext();
+ assertNotNull(bundleContext);
+
+ ServiceReference[] refs = bundleContext.getServiceReferences(A.class.getName(), null);
+ assertNull(refs);
+ refs = bundleContext.getServiceReferences(AMBean.class.getName(), null);
+ assertNotNull(refs);
+ }
+ finally
+ {
+ uninstall(osgi);
+ }
+ }
+ finally
+ {
+ undeploy(deployment);
+ }
+ }
}
Copied: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/MANIFEST.MF (from rev 100962, projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/MANIFEST.MF 2010-02-15 12:02:10 UTC (rev 100964)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Implementation-Title: JBoss OSGi tests
+Implementation-Version: test
+Implementation-Vendor: jboss.org
+Bundle-Name: Beans3
+Bundle-SymbolicName: org.jboss.test.osgi.beans3
+Export-Package: org.jboss.test.osgi.service.support.a
Copied: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml (from rev 100962, projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/src/test/resources/bundles/service/service-beans3/META-INF/jboss-beans.xml 2010-02-15 12:02:10 UTC (rev 100964)
@@ -0,0 +1,7 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="A" class="org.jboss.test.osgi.service.support.a.A">
+ <related-class name="org.jboss.test.osgi.service.support.a.AMBean">OSGi</related-class>
+ </bean>
+
+</deployment>
\ No newline at end of file
15 years, 10 months
JBoss-OSGI SVN: r100962 - projects/jboss-osgi/projects/runtime/framework/branches.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2010-02-15 06:17:04 -0500 (Mon, 15 Feb 2010)
New Revision: 100962
Added:
projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix/
Log:
Temp service-mix branch.
Copied: projects/jboss-osgi/projects/runtime/framework/branches/alesj_service-mix (from rev 100792, projects/jboss-osgi/projects/runtime/framework/trunk)
15 years, 10 months
JBoss-OSGI SVN: r100946 - projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-14 05:55:47 -0500 (Sun, 14 Feb 2010)
New Revision: 100946
Modified:
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppExtenderTestCase.java
Log:
Test servlet access before resource access
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppExtenderTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppExtenderTestCase.java 2010-02-14 10:55:09 UTC (rev 100945)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppExtenderTestCase.java 2010-02-14 10:55:47 UTC (rev 100946)
@@ -53,7 +53,9 @@
runtime = osgiTestHelper.getDefaultRuntime();
runtime.addCapability(new HttpServiceCapability());
-
+
+ // Conditionally install the webapp extender in case we test against
+ // a runtime where it is not installed already
if (runtime.getBundle("org.ops4j.pax.web.pax-web-extender-war", null) == null)
runtime.installBundle("bundles/pax-web-extender-war.jar").start();
@@ -68,13 +70,6 @@
}
@Test
- public void testResourceAccess() throws Exception
- {
- String line = getHttpResponse("/message.txt", 5000);
- assertEquals("Hello from Resource", line);
- }
-
- @Test
public void testServletAccess() throws Exception
{
String line = getHttpResponse("/servlet?test=plain", 5000);
@@ -87,4 +82,11 @@
String line = getHttpResponse("/servlet?test=initProp", 5000);
assertEquals("initProp=SomeValue", line);
}
+
+ @Test
+ public void testResourceAccess() throws Exception
+ {
+ String line = getHttpResponse("/message.txt", 5000);
+ assertEquals("Hello from Resource", line);
+ }
}
\ No newline at end of file
15 years, 10 months
JBoss-OSGI SVN: r100945 - projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-14 05:55:09 -0500 (Sun, 14 Feb 2010)
New Revision: 100945
Modified:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java
Log:
typo
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java 2010-02-14 10:41:14 UTC (rev 100944)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/capability/HttpServiceCapability.java 2010-02-14 10:55:09 UTC (rev 100945)
@@ -50,7 +50,9 @@
{
super(HttpService.class.getName());
addSystemProperty("org.osgi.service.http.port", "8090");
+
addDependency(new ConfigAdminCapability());
+
addBundle("bundles/pax-web-jetty-bundle.jar");
}
}
\ No newline at end of file
15 years, 10 months
JBoss-OSGI SVN: r100944 - projects/jboss-osgi/trunk/testsuite.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-14 05:41:14 -0500 (Sun, 14 Feb 2010)
New Revision: 100944
Modified:
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
REmove duplicate slf4j binding with AS601 & AS600
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2010-02-14 10:08:10 UTC (rev 100943)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2010-02-14 10:41:14 UTC (rev 100944)
@@ -473,6 +473,12 @@
<version>6.0.0.M1</version>
<scope>provided</scope>
<type>pom</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
</profile>
@@ -499,6 +505,12 @@
<version>6.0.0.M1</version>
<scope>provided</scope>
<type>pom</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
</profile>
15 years, 10 months