JBoss-OSGI SVN: r100802 - projects/jboss-osgi/projects/osgitck/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-10 07:47:53 -0500 (Wed, 10 Feb 2010)
New Revision: 100802
Modified:
projects/jboss-osgi/projects/osgitck/trunk/build.xml
Log:
Fix bnd update
Modified: projects/jboss-osgi/projects/osgitck/trunk/build.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-02-10 12:35:25 UTC (rev 100801)
+++ projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-02-10 12:47:53 UTC (rev 100802)
@@ -78,9 +78,6 @@
<!-- Copy the aQute.bnd -->
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
- <!-- Copy the core framework jar -->
- <copy file="${jboss.osgi.framework.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
-
<!-- Overlay the TCK setup -->
<copy todir="${osgitck.dir}" overwrite="true">
<fileset dir="${basedir}/overlay" />
14 years, 4 months
JBoss-OSGI SVN: r100801 - projects/jboss-osgi/projects/osgitck/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-10 07:35:25 -0500 (Wed, 10 Feb 2010)
New Revision: 100801
Modified:
projects/jboss-osgi/projects/osgitck/trunk/build.xml
Log:
Restore target update-framework
Modified: projects/jboss-osgi/projects/osgitck/trunk/build.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-02-10 12:22:22 UTC (rev 100800)
+++ projects/jboss-osgi/projects/osgitck/trunk/build.xml 2010-02-10 12:35:25 UTC (rev 100801)
@@ -42,7 +42,7 @@
<echo message="osgitck.dir=${osgitck.dir}" />
<echo>************************************************</echo>
- <!-- Check if the osgitck export is available -->
+ <!-- Check if the osgitck dir is available -->
<available property="osgitck.dir.available" file="${osgitck.dir}" />
<fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
@@ -56,9 +56,6 @@
<available property="jboss.osgi.framework.available" file="${jboss.osgi.framework.jar}" />
<fail message="Cannot find: ${jboss.osgi.framework.jar}" unless="jboss.osgi.framework.available" />
- <!-- Check if the osgitck dir is available -->
- <available property="osgitck.dir.available" file="${osgitck.dir}" />
-
</target>
<!-- ================================================================== -->
@@ -76,20 +73,31 @@
</target>
<!-- Setup the TCK to use the Vendor Implemenation -->
- <target name="setup.vi" description="Setup the TCK using the Vendor Implemenation" depends="init">
+ <target name="setup.vi" description="Setup the TCK using the Vendor Implemenation" depends="init,update-framework">
+ <!-- Copy the aQute.bnd -->
+ <copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
+
+ <!-- Copy the core framework jar -->
+ <copy file="${jboss.osgi.framework.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
+
<!-- Overlay the TCK setup -->
<copy todir="${osgitck.dir}" overwrite="true">
<fileset dir="${basedir}/overlay" />
</copy>
- <!-- Copy the aQute.bnd -->
- <copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
-
<!-- Build the TCK -->
<ant dir="${osgitck.dir}" target="build-clean" />
</target>
+ <!-- Update the JBoss OSGi Framework -->
+ <target name="update-framework" description="Update the JBoss OSGi Framework" depends="init">
+ <!-- Copy the OSGi Framework -->
+ <mkdir dir="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework" />
+ <copy file="${jboss.osgi.framework.jar}" tofile="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework/org.jboss.osgi.framework-1.0.0.jar"
+ overwrite="true" />
+ </target>
+
<!-- ================================================================== -->
<!-- Hudson -->
<!-- ================================================================== -->
14 years, 4 months
JBoss-OSGI SVN: r100800 - projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-10 07:22:22 -0500 (Wed, 10 Feb 2010)
New Revision: 100800
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
Log:
Update TCK config
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-02-10 12:14:54 UTC (rev 100799)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2010-02-10 12:22:22 UTC (rev 100800)
@@ -56,14 +56,17 @@
<bean name="OSGiControllerContextPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextPluginImpl">
<constructor>
<parameter><inject bean="OSGiBundleManager" /></parameter>
- <parameter><inject bean="DeploymentRegistry" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
</constructor>
</bean>
<bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <constructor>
+ <parameter><inject bean="OSGiBundleManager" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
+ </constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
@@ -104,9 +107,6 @@
<property name="deployers"><inject bean="Deployers" /></property>
</bean>
- <!-- The deployment registry -->
- <bean name="DeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
-
<!-- The holder for deployers that determine structure -->
<bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
<property name="structureBuilder">
@@ -140,9 +140,12 @@
<constructor>
<parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
</constructor>
- <property name="deploymentRegistry"><inject bean="DeploymentRegistry"/></property>
+ <property name="deploymentRegistry"><inject bean="OSGiDeploymentRegistry"/></property>
</bean>
+ <!-- The deployment registry -->
+ <bean name="OSGiDeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
+
<!-- OSGI Deployment -->
<bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
<bean name="OSGiBundleStateAddDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateAddDeployer">
14 years, 4 months
JBoss-OSGI SVN: r100799 - projects/jboss-osgi/projects/osgitck/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-10 07:14:54 -0500 (Wed, 10 Feb 2010)
New Revision: 100799
Modified:
projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example
Log:
Update to 1.0.0.Alpha4-SNAPSHOT
Modified: projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example 2010-02-10 11:52:51 UTC (rev 100798)
+++ projects/jboss-osgi/projects/osgitck/trunk/ant.properties.example 2010-02-10 12:14:54 UTC (rev 100799)
@@ -4,7 +4,7 @@
# $Id: ant.properties.example 3995 2007-07-26 08:52:45Z thomas.diesler(a)jboss.com $
# The JBoss OSGi framework version
-framework.version=1.0.0-SNAPSHOT
+framework.version=1.0.0.Alpha4-SNAPSHOT
framework.svn.url=https://svn.jboss.org/repos/jbossas/projects/jboss-osgi...
# The aQute Bnd version
14 years, 4 months
JBoss-OSGI SVN: r100796 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins and 4 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-10 06:38:18 -0500 (Wed, 10 Feb 2010)
New Revision: 100796
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ControllerContextPlugin.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
Log:
[JBOSGi-278] Revisit ControllerContext handling
Move more of the context bleed into ServiceManagerPlugin
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-10 11:38:18 UTC (rev 100796)
@@ -525,13 +525,11 @@
checkValidBundleContext();
ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
OSGiServiceState serviceState = (OSGiServiceState)plugin.registerService(this, clazzes, service, properties);
- afterServiceRegistration(serviceState);
return serviceState.getRegistration();
}
void unregisterService(OSGiServiceState serviceState)
{
- beforeServiceUnregistration(serviceState);
ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
plugin.unregisterService(serviceState);
}
@@ -543,20 +541,6 @@
return plugin.ungetService(this, reference);
}
- /**
- * After service registration callback.
- */
- protected void afterServiceRegistration(OSGiServiceState service)
- {
- }
-
- /**
- * Before service unregistration callback.
- */
- protected void beforeServiceUnregistration(OSGiServiceState service)
- {
- }
-
boolean ungetContext(ControllerContext context)
{
return removeContextInUse(context);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-10 11:38:18 UTC (rev 100796)
@@ -30,7 +30,6 @@
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.List;
-import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
@@ -39,7 +38,7 @@
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.ControllerContextPlugin;
+import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
import org.osgi.framework.AdminPermission;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
@@ -132,13 +131,6 @@
return false;
}
- protected Set<ControllerContext> getRegisteredContexts()
- {
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- return plugin.getRegisteredContexts(this);
- }
-
public Class<?> loadClass(String name) throws ClassNotFoundException
{
checkInstalled();
@@ -314,8 +306,8 @@
Throwable rethrow = null;
if (priorState == Bundle.ACTIVE)
{
- BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
BundleContext bundleContext = getBundleContext();
+ BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
if (bundleActivator != null && bundleContext != null)
{
try
@@ -330,9 +322,8 @@
}
// Any services registered by this bundle must be unregistered
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- plugin.unregisterContexts(this);
+ ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
+ plugin.unregisterServices(this);
// Any services used by this bundle must be released
for (ControllerContext context : getUsedContexts(this))
@@ -407,20 +398,4 @@
return super.getHeaders(locale);
}
-
- @Override
- protected void afterServiceRegistration(OSGiServiceState service)
- {
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- plugin.putContext(service, getDeploymentUnit());
- }
-
- @Override
- protected void beforeServiceUnregistration(OSGiServiceState service)
- {
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- plugin.removeContext(service, getDeploymentUnit());
- }
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java 2010-02-10 11:38:18 UTC (rev 100796)
@@ -49,11 +49,6 @@
this.serviceState = serviceState;
}
- ControllerContext getContext()
- {
- return getServiceState();
- }
-
public Bundle getBundle()
{
return serviceState.getBundle();
@@ -102,13 +97,13 @@
return serviceState.toString();
}
- /**
- * Get the serviceState.
- *
- * @return the serviceState.
- */
OSGiServiceState getServiceState()
{
return serviceState;
}
+
+ ControllerContext getContext()
+ {
+ return getServiceState();
+ }
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-10 11:38:18 UTC (rev 100796)
@@ -35,6 +35,8 @@
import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.dependency.spi.tracker.ContextTracker;
+import org.jboss.deployers.structure.spi.DeploymentRegistry;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.qualifier.QualifierMatchers;
@@ -57,6 +59,7 @@
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceEvent;
import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
/**
* A plugin that manages OSGi services.
@@ -78,12 +81,20 @@
private Kernel kernel;
/** The previous context tracker */
private ContextTracker previousTracker;
+ /** The deployment registry */
+ private DeploymentRegistry registry;
+
/** Enable MDR usage */
private boolean enableMDRUsage = true;
- public ServiceManagerPluginImpl(OSGiBundleManager bundleManager)
+ public ServiceManagerPluginImpl(OSGiBundleManager bundleManager, DeploymentRegistry registry)
{
super(bundleManager);
+
+ if (registry == null)
+ throw new IllegalArgumentException("Null deployment registry");
+
+ this.registry = registry;
}
public void setEnableMDRUsage(boolean mdrUsage)
@@ -106,8 +117,7 @@
public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
{
- ControllerContextPlugin plugin = getBundleManager().getPlugin(ControllerContextPlugin.class);
- Set<ControllerContext> contexts = plugin.getRegisteredContexts(bundleState);
+ Set<ControllerContext> contexts = getRegisteredContexts(bundleState);
if (contexts.isEmpty())
return null;
@@ -218,19 +228,27 @@
throw new RuntimeException(t);
}
- FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
- plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
+ if (bundleState instanceof OSGiBundleState)
+ {
+ putContext(result, ((OSGiBundleState)bundleState).getDeploymentUnit());
+ }
+ FrameworkEventsPlugin eventsPlugin = getPlugin(FrameworkEventsPlugin.class);
+ eventsPlugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
+
return result;
}
public void unregisterService(OSGiServiceState serviceState)
{
AbstractBundleState bundleState = serviceState.getBundleState();
-
+ if (bundleState instanceof OSGiBundleState)
+ {
+ removeContext(serviceState, ((OSGiBundleState)bundleState).getDeploymentUnit());
+ }
+
Controller controller = kernel.getController();
controller.uninstall(serviceState.getName());
-
serviceState.internalUnregister();
FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
@@ -250,6 +268,11 @@
return bundleState.removeContextInUse(context);
}
+ public void unregisterServices(AbstractBundleState bundleState)
+ {
+ unregisterContexts(bundleState);
+ }
+
/**
* Apply OSGi's MDR usage:
* - add/remove system bundle as default context tracker
@@ -410,4 +433,40 @@
}
return true;
}
+
+ private DeploymentUnit putContext(ControllerContext context, DeploymentUnit unit)
+ {
+ return registry.putContext(context, unit);
+ }
+
+ private DeploymentUnit removeContext(ControllerContext context, DeploymentUnit unit)
+ {
+ return registry.removeContext(context, unit);
+ }
+
+ private Set<ControllerContext> getRegisteredContexts(AbstractBundleState bundleState)
+ {
+ if (bundleState instanceof OSGiBundleState == false)
+ return Collections.emptySet();
+
+ DeploymentUnit unit = ((OSGiBundleState)bundleState).getDeploymentUnit();
+ return registry.getContexts(unit);
+ }
+
+ private void unregisterContexts(AbstractBundleState bundleState)
+ {
+ if (bundleState instanceof OSGiBundleState)
+ {
+ DeploymentUnit unit = ((OSGiBundleState)bundleState).getDeploymentUnit();
+ Set<ControllerContext> contexts = registry.getContexts(unit);
+ for (ControllerContext context : contexts)
+ {
+ if (context instanceof ServiceRegistration)
+ {
+ ServiceRegistration service = (ServiceRegistration)context;
+ service.unregister();
+ }
+ }
+ }
+ }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ControllerContextPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ControllerContextPlugin.java 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ControllerContextPlugin.java 2010-02-10 11:38:18 UTC (rev 100796)
@@ -21,10 +21,7 @@
*/
package org.jboss.osgi.framework.plugins;
-import java.util.Set;
-
import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.osgi.framework.bundle.AbstractBundleState;
@@ -37,39 +34,6 @@
public interface ControllerContextPlugin extends Plugin
{
/**
- * Put context to deployment mapping.
- *
- * @param context the context
- * @param unit the deployment
- * @return previous mapping value
- */
- DeploymentUnit putContext(ControllerContext context, DeploymentUnit unit);
-
- /**
- * Remove context to deployment mapping.
- *
- * @param context the context
- * @param unit the deployment
- * @return is previous mapping value same as unit param
- */
- DeploymentUnit removeContext(ControllerContext context, DeploymentUnit unit);
-
- /**
- * Get registered contexts for bundle.
- *
- * @param bundleState the owning bundle
- * @return registered contexts
- */
- Set<ControllerContext> getRegisteredContexts(AbstractBundleState bundleState);
-
- /**
- * Unregister contexts.
- *
- * @param bundleState the stopping bundle
- */
- void unregisterContexts(AbstractBundleState bundleState);
-
- /**
* Get bundle for user tracker.
*
* @param user the user tracker object
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java 2010-02-10 11:38:18 UTC (rev 100796)
@@ -140,4 +140,10 @@
*
*/
void unregisterService(OSGiServiceState serviceState);
+
+ /**
+ * Unregister all services that were registered on behalf of the given bundle.
+ * @param bundleState The bundle that registered the services.
+ */
+ void unregisterServices(AbstractBundleState bundleState);
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-10 11:38:18 UTC (rev 100796)
@@ -61,7 +61,10 @@
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <constructor>
+ <parameter><inject bean="OSGiBundleManager" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
+ </constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-02-10 11:38:18 UTC (rev 100796)
@@ -110,7 +110,10 @@
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <constructor>
+ <parameter><inject bean="OSGiBundleManager" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
+ </constructor>
<property name="enableMDRUsage">false</property>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-10 11:38:18 UTC (rev 100796)
@@ -85,7 +85,10 @@
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <constructor>
+ <parameter><inject bean="OSGiBundleManager" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
+ </constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-10 11:07:51 UTC (rev 100795)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-02-10 11:38:18 UTC (rev 100796)
@@ -70,7 +70,10 @@
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
<bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ <constructor>
+ <parameter><inject bean="OSGiBundleManager" /></parameter>
+ <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
+ </constructor>
</bean>
<bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
14 years, 4 months
JBoss-OSGI SVN: r100793 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle and 9 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-10 05:39:45 -0500 (Wed, 10 Feb 2010)
New Revision: 100793
Removed:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
Log:
[JBOSGI-141] Restore AS integration to a working state
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-02-10 10:39:45 UTC (rev 100793)
@@ -48,7 +48,7 @@
<version.apache.felix.metatype>1.0.2</version.apache.felix.metatype>
<version.jboss.classloading>2.2.0.Alpha1</version.jboss.classloading>
<version.jboss.deployers>2.2.0.Alpha1</version.jboss.deployers>
- <version.jboss.kernel>2.2.0-SNAPSHOT</version.jboss.kernel>
+ <version.jboss.kernel>2.2.0.Alpha5</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>
@@ -131,26 +131,24 @@
<groupId>org.jboss.deployers</groupId>
<artifactId>jboss-deployers-jmx</artifactId>
<version>${version.jboss.deployers}</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.kernel</groupId>
<artifactId>jboss-kernel</artifactId>
<version>${version.jboss.kernel}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.kernel</groupId>
- <artifactId>jboss-jmx-mc-int</artifactId>
- <version>${version.jboss.kernel}</version>
- </dependency>
<dependency>
<groupId>org.jboss.kernel</groupId>
<artifactId>jboss-jmx-aop-mc-int</artifactId>
<version>${version.jboss.kernel}</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.kernel</groupId>
+ <artifactId>jboss-jmx-mc-int</artifactId>
+ <version>${version.jboss.kernel}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.kernel</groupId>
<artifactId>jboss-dependency</artifactId>
<version>${version.jboss.kernel}</version>
</dependency>
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -525,11 +525,13 @@
checkValidBundleContext();
ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
OSGiServiceState serviceState = (OSGiServiceState)plugin.registerService(this, clazzes, service, properties);
+ afterServiceRegistration(serviceState);
return serviceState.getRegistration();
}
void unregisterService(OSGiServiceState serviceState)
{
+ beforeServiceUnregistration(serviceState);
ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
plugin.unregisterService(serviceState);
}
@@ -541,6 +543,20 @@
return plugin.ungetService(this, reference);
}
+ /**
+ * After service registration callback.
+ */
+ protected void afterServiceRegistration(OSGiServiceState service)
+ {
+ }
+
+ /**
+ * Before service unregistration callback.
+ */
+ protected void beforeServiceUnregistration(OSGiServiceState service)
+ {
+ }
+
boolean ungetContext(ControllerContext context)
{
return removeContextInUse(context);
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,170 +0,0 @@
-/*
-* 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.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;
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Abstract dictionary factory.
- *
- * @author <a href="ales.justin(a)jboss.org">Ales Justin</a>
- */
-public abstract class AbstractDictionaryFactory<T extends ControllerContext> implements DictionaryFactory<T>
-{
- protected static final String NAME = "bean.name";
- protected static final String[] EMPTY = new String[0];
- private KernelConfigurator configurator;
- private final ClassInfo OBJECT;
-
- public AbstractDictionaryFactory(KernelConfigurator configurator)
- {
- if (configurator == null)
- throw new IllegalArgumentException("Null configurator");
-
- this.configurator = configurator;
- OBJECT = getClassInfo(Object.class);
- }
-
- protected ClassInfo getClassInfo(Class<?> clazz)
- {
- try
- {
- return configurator.getClassInfo(clazz);
- }
- catch (Throwable t)
- {
- throw new RuntimeException(t);
- }
- }
-
- protected class ControllerContextDictionary extends Dictionary<String, Object>
- {
- private Map<Object, Object> map;
- private ControllerContext context;
-
- protected ControllerContextDictionary(ControllerContext context)
- {
- this.context = context;
- this.map = new ConcurrentHashMap<Object, Object>(2);
- map.put(NAME, getName(context));
- map.put(Constants.OBJECTCLASS, EMPTY);
- }
-
- protected Object getName(ControllerContext context)
- {
- return context.getName();
- }
-
- public int size()
- {
- return map.size();
- }
-
- public boolean isEmpty()
- {
- return size() == 0;
- }
-
- @SuppressWarnings({"unchecked"})
- public Enumeration<String> keys()
- {
- return Iterators.toEnumeration(map.keySet().iterator());
- }
-
- @SuppressWarnings({"unchecked"})
- public Enumeration<Object> elements()
- {
- return Iterators.toEnumeration(map.values().iterator());
- }
-
- public Object get(Object key)
- {
- Object value = map.get(key);
- if (value != EMPTY)
- return value;
-
- ClassInfo clazz;
- Object target = context.getTarget();
- if (target != null)
- {
- clazz = getClassInfo(target.getClass());
- }
- else
- clazz = getFromNullTarget(context);
-
- String[] classes = EMPTY;
- if (clazz != null)
- {
- Set<String> clazzes = new HashSet<String>();
- traverseClass(clazz, clazzes);
- classes = clazzes.toArray(new String[clazzes.size()]);
- map.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)
- {
- return;
- }
-
- classes.add(clazz.getName());
-
- // traverse superclass
- traverseClass(clazz.getSuperclass(), classes);
- ClassInfo[] interfaces = clazz.getInterfaces();
- if (interfaces != null)
- {
- // traverse interfaces
- for(ClassInfo intface : interfaces)
- {
- traverseClass(intface, classes);
- }
- }
- }
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -45,7 +45,7 @@
KernelMetaDataRepository repository = getRepository(context);
ScopeKey contextScopeKey = context.getScopeInfo().getMutableScope();
Scope scope = contextScopeKey.getScope(CommonLevels.INSTANCE);
- ScopeKey key = new ScopeKey(scope).getOptimizedKey();
+ ScopeKey key = new ScopeKey(scope);
MutableMetaDataRepository mutable = repository.getMetaDataRepository();
MetaDataRetrieval retrieval = mutable.getMetaDataRetrieval(key);
if (retrieval == null)
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,52 +0,0 @@
-/*
-* 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.spi.ControllerContext;
-import org.jboss.kernel.spi.config.KernelConfigurator;
-import org.jboss.system.microcontainer.ServiceControllerContext;
-
-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>
- */
-public class JMXDictionaryFactory extends AbstractDictionaryFactory<ServiceControllerContext>
-{
- public JMXDictionaryFactory(KernelConfigurator configurator)
- {
- super(configurator);
- }
-
- public Class<ServiceControllerContext> getContextType()
- {
- return ServiceControllerContext.class;
- }
-
- public Dictionary<String, Object> getDictionary(ServiceControllerContext context)
- {
- return new ControllerContextDictionary(context);
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -22,25 +22,52 @@
package org.jboss.osgi.framework.bundle;
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 org.jboss.beans.info.spi.BeanInfo;
-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.jboss.util.collection.Iterators;
+import org.osgi.framework.Constants;
/**
* Kernel dictionary factory.
*
* @author <a href="ales.justin(a)jboss.org">Ales Justin</a>
*/
-public class KernelDictionaryFactory extends AbstractDictionaryFactory<KernelControllerContext>
+public class KernelDictionaryFactory implements DictionaryFactory<KernelControllerContext>
{
+ private static final String NAME = "bean.name";
+ private static final String[] EMPTY = new String[0];
+ private KernelConfigurator configurator;
+ private final ClassInfo OBJECT;
+
public KernelDictionaryFactory(KernelConfigurator configurator)
{
- super(configurator);
+ if (configurator == null)
+ throw new IllegalArgumentException("Null configurator");
+
+ this.configurator = configurator;
+ OBJECT = getClassInfo(Object.class);
}
+ private ClassInfo getClassInfo(Class<?> clazz)
+ {
+ try
+ {
+ return configurator.getClassInfo(clazz);
+ }
+ catch (Throwable t)
+ {
+ throw new RuntimeException(t);
+ }
+ }
+
public Class<KernelControllerContext> getContextType()
{
return KernelControllerContext.class;
@@ -51,19 +78,100 @@
return new KernelDictionary(context);
}
- private class KernelDictionary extends ControllerContextDictionary
+ private class KernelDictionary extends Dictionary<String, Object>
{
+ private Map<Object, Object> map;
+ private KernelControllerContext context;
+
private KernelDictionary(KernelControllerContext context)
{
- super(context);
+ this.context = context;
+ this.map = new ConcurrentHashMap<Object, Object>(2);
+ map.put(NAME, context.getName());
+ map.put(Constants.OBJECTCLASS, EMPTY);
}
- @Override
- protected ClassInfo getFromNullTarget(ControllerContext context)
+ public int size()
{
- KernelControllerContext kcc = KernelControllerContext.class.cast(context);
- BeanInfo beanInfo = kcc.getBeanInfo();
- return beanInfo != null ? beanInfo.getClassInfo() : null;
+ return map.size();
}
+
+ public boolean isEmpty()
+ {
+ return size() == 0;
+ }
+
+ @SuppressWarnings({"unchecked"})
+ public Enumeration<String> keys()
+ {
+ return Iterators.toEnumeration(map.keySet().iterator());
+ }
+
+ @SuppressWarnings({"unchecked"})
+ public Enumeration<Object> elements()
+ {
+ return Iterators.toEnumeration(map.values().iterator());
+ }
+
+ public Object get(Object key)
+ {
+ Object value = map.get(key);
+ if (value != EMPTY)
+ return value;
+
+ ClassInfo clazz = null;
+ Object target = context.getTarget();
+ BeanInfo info = context.getBeanInfo();
+ if (target != null)
+ {
+ clazz = getClassInfo(target.getClass());
+ }
+ else if (info != null)
+ {
+ clazz = info.getClassInfo();
+ }
+
+ String[] classes = EMPTY;
+ if (clazz != null)
+ {
+ Set<String> clazzes = new HashSet<String>();
+ traverseClass(clazz, clazzes);
+ classes = clazzes.toArray(new String[clazzes.size()]);
+ map.put(Constants.OBJECTCLASS, classes);
+ }
+ return classes;
+ }
+
+ 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)
+ {
+ return;
+ }
+
+ classes.add(clazz.getName());
+
+ // traverse superclass
+ traverseClass(clazz.getSuperclass(), classes);
+ ClassInfo[] interfaces = clazz.getInterfaces();
+ if (interfaces != null)
+ {
+ // traverse interfaces
+ for(ClassInfo intface : interfaces)
+ {
+ traverseClass(intface, classes);
+ }
+ }
+ }
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -30,6 +30,7 @@
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.List;
+import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
@@ -38,7 +39,7 @@
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.jboss.osgi.framework.plugins.ControllerContextPlugin;
import org.osgi.framework.AdminPermission;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
@@ -131,6 +132,13 @@
return false;
}
+ protected Set<ControllerContext> getRegisteredContexts()
+ {
+ OSGiBundleManager manager = getBundleManager();
+ ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+ return plugin.getRegisteredContexts(this);
+ }
+
public Class<?> loadClass(String name) throws ClassNotFoundException
{
checkInstalled();
@@ -306,8 +314,8 @@
Throwable rethrow = null;
if (priorState == Bundle.ACTIVE)
{
+ BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
BundleContext bundleContext = getBundleContext();
- BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
if (bundleActivator != null && bundleContext != null)
{
try
@@ -322,8 +330,9 @@
}
// Any services registered by this bundle must be unregistered
- ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
- plugin.unregisterServices(this);
+ OSGiBundleManager manager = getBundleManager();
+ ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+ plugin.unregisterContexts(this);
// Any services used by this bundle must be released
for (ControllerContext context : getUsedContexts(this))
@@ -398,4 +407,20 @@
return super.getHeaders(locale);
}
+
+ @Override
+ protected void afterServiceRegistration(OSGiServiceState service)
+ {
+ OSGiBundleManager manager = getBundleManager();
+ ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+ plugin.putContext(service, getDeploymentUnit());
+ }
+
+ @Override
+ protected void beforeServiceUnregistration(OSGiServiceState service)
+ {
+ OSGiBundleManager manager = getBundleManager();
+ ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+ plugin.removeContext(service, getDeploymentUnit());
+ }
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -49,6 +49,11 @@
this.serviceState = serviceState;
}
+ ControllerContext getContext()
+ {
+ return getServiceState();
+ }
+
public Bundle getBundle()
{
return serviceState.getBundle();
@@ -97,13 +102,13 @@
return serviceState.toString();
}
+ /**
+ * Get the serviceState.
+ *
+ * @return the serviceState.
+ */
OSGiServiceState getServiceState()
{
return serviceState;
}
-
- ControllerContext getContext()
- {
- return getServiceState();
- }
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -36,6 +36,7 @@
if (install)
{
repository.addMetaData(context);
+ repository.getMetaData(context); // TODO - remove this once we fix it in MC core
}
else
{
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -72,29 +72,36 @@
public class ServiceManagerPluginImpl extends AbstractPlugin implements ServiceManagerPlugin
{
// Provide logging
- private final Logger log = Logger.getLogger(ServiceManagerPluginImpl.class);
+ 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;
-
+ /** Enable MDR usage */
+ private boolean enableMDRUsage = true;
+
public ServiceManagerPluginImpl(OSGiBundleManager bundleManager)
{
super(bundleManager);
}
+ public void setEnableMDRUsage(boolean mdrUsage)
+ {
+ this.enableMDRUsage = mdrUsage;
+ }
+
public void start()
{
kernel = getBundleManager().getKernel();
- applyMDRUsage(true);
+ if (enableMDRUsage == true)
+ applyMDRUsage(true);
}
public void stop()
{
- applyMDRUsage(false);
+ if (enableMDRUsage == true)
+ applyMDRUsage(false);
}
public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
@@ -211,29 +218,19 @@
throw new RuntimeException(t);
}
- if (bundleState instanceof OSGiBundleState)
- {
- ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
- plugin.putContext(result, ((OSGiBundleState)bundleState).getDeploymentUnit());
- }
+ FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
+ plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
- FrameworkEventsPlugin eventsPlugin = getPlugin(FrameworkEventsPlugin.class);
- eventsPlugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
-
return result;
}
public void unregisterService(OSGiServiceState serviceState)
{
AbstractBundleState bundleState = serviceState.getBundleState();
- if (bundleState instanceof OSGiBundleState)
- {
- ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
- plugin.removeContext(serviceState, ((OSGiBundleState)bundleState).getDeploymentUnit());
- }
-
+
Controller controller = kernel.getController();
controller.uninstall(serviceState.getName());
+
serviceState.internalUnregister();
FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
@@ -253,12 +250,6 @@
return bundleState.removeContextInUse(context);
}
- public void unregisterServices(AbstractBundleState bundleState)
- {
- ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
- plugin.unregisterContexts(bundleState);
- }
-
/**
* Apply OSGi's MDR usage:
* - add/remove system bundle as default context tracker
@@ -321,15 +312,12 @@
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;
- }
+ MetaDataRetrievalFactory mdrFactory;
+ InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(kernel);
+ imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
+ imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
+ // TODO - JMX?
+ mdrFactory = imdrf;
return mdrFactory;
}
@@ -414,7 +402,7 @@
*/
private boolean hasPermission(ControllerContext context)
{
- // TODO - make this generic, w/o casting
+ // TODO - make thisa generic, w/o casting
if (context instanceof OSGiServiceState)
{
OSGiServiceState serviceState = (OSGiServiceState)context;
@@ -422,14 +410,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/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -140,10 +140,4 @@
*
*/
void unregisterService(OSGiServiceState serviceState);
-
- /**
- * Unregister all services that were registered on behalf of the given bundle.
- * @param bundleState The bundle that registered the services.
- */
- void unregisterServices(AbstractBundleState bundleState);
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -25,16 +25,12 @@
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
import org.jboss.virtual.AssembledDirectory;
import org.jboss.virtual.VirtualFile;
import org.jboss.osgi.framework.bundle.AbstractDeployedBundleState;
import org.jboss.osgi.framework.bundle.OSGiBundleState;
import org.osgi.framework.Bundle;
-import javax.management.ObjectName;
-
/**
* Deployers test - generic deployment test.
*
@@ -97,29 +93,6 @@
return addBean(name, beanClass, null, references);
}
- protected Deployment addJMX(String name, Class<?> serviceClass, String serviceName, ServiceMetaData smd, Class<?> ... references) throws Exception
- {
- AssembledDirectory dir = createAssembledDirectory(name, "");
- if (serviceClass != null)
- addPackage(dir, serviceClass);
- if (references != null)
- {
- for (Class<?> reference : references)
- addPackage(dir, reference);
- }
- if (smd == null)
- {
- if (serviceClass == null)
- throw new IllegalArgumentException("Null service class");
-
- smd = new ServiceMetaData();
- smd.setConstructor(new ServiceConstructorMetaData());
- smd.setCode(serviceClass.getName());
- smd.setObjectName(ObjectName.getInstance(serviceName));
- }
- return addDeployment(dir, smd, ServiceMetaData.class);
- }
-
protected Deployment addBean(String name, Class<?> beanClass, BeanMetaData bmd, Class<?> ... references) throws Exception
{
AssembledDirectory dir = createAssembledDirectory(name, "");
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -22,25 +22,9 @@
package org.jboss.test.osgi.service;
import junit.framework.Test;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.deployers.client.spi.Deployment;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceInjectionValueMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.test.osgi.service.support.LazyBundle;
import org.jboss.test.osgi.service.support.MockInvokerMBean;
-import org.jboss.test.osgi.service.support.a.A;
-import org.jboss.test.osgi.service.support.c.C;
-import org.jboss.virtual.AssembledDirectory;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
import javax.management.ObjectName;
-import java.util.Hashtable;
/**
* Test MC's jmx support.
@@ -70,101 +54,6 @@
public void testMBeans() throws Throwable
{
- AssembledDirectory mix = createAssembledDirectory("jmx1", "");
- addPath(mix, "/bundles/service/service-jmx1", "");
- addPackage(mix, A.class);
- Deployment deployment = addDeployment(mix);
- try
- {
- checkComplete();
-
- Bundle bundle = getBundle(getDeploymentUnit(deployment));
- bundle.start();
-
- Object a = getService("test:service=A");
- assertNotNull(a);
-
- ServiceReference[] refs = bundle.getRegisteredServices();
- assertNotNull(refs);
- assertEquals(1, refs.length);
- ServiceReference ref = refs[0];
- assertEquals(bundle, ref.getBundle());
- assertEquals("test:service=A", ref.getProperty("bean.name"));
- Class<?> aClass = bundle.loadClass(A.class.getName());
- BundleContext bc = bundle.getBundleContext();
- assertNotNull(bc);
- Object service = bc.getService(ref);
- assertInstanceOf(service, aClass, false);
- assertSame(service, a);
- assertFalse(bc.ungetService(ref));
- }
- finally
- {
- undeploy(deployment);
- }
+ // mix mbean services with bundles -- TODO
}
-
- public void testInjectionIntoJMX() throws Throwable
- {
- ServiceMetaData smd = new ServiceMetaData();
- smd.setConstructor(new ServiceConstructorMetaData());
- smd.setCode(C.class.getName());
- smd.setObjectName(ObjectName.getInstance("test:service=C"));
- ServiceAttributeMetaData attrib = new ServiceAttributeMetaData();
- attrib.setName("A");
- attrib.setValue(new ServiceInjectionValueMetaData("A"));
- smd.addAttribute(attrib);
- Deployment bean = addJMX("jmxA", C.class, null, smd, A.class);
- try
- {
- ControllerContext context = getServiceContext("test:service=C", null);
-
- Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle3"));
- try
- {
- bundle1.start();
- BundleContext bundleContext1 = bundle1.getBundleContext();
- assertNotNull(bundleContext1);
-
- Class<?> aClass = bundle1.loadClass(A.class.getName());
- Object a = aClass.newInstance();
- Hashtable<String, Object> table = new Hashtable<String, Object>();
- table.put("service.alias.1", "A");
- ServiceRegistration reg1 = bundleContext1.registerService(A.class.getName(), a, table);
- assertNotNull(reg1);
- try
- {
- checkComplete();
-
- Object c = getService("test:service=C");
- assertSame(a, getter(c, "getA", "test:service=C"));
-
- ServiceReference ref1 = bundleContext1.getServiceReference(A.class.getName());
- assertUsingBundles(ref1, LazyBundle.getBundle(getDeploymentUnit(bean)));
-
- changeContext(context, ControllerState.DESCRIBED);
- // we did un-injection, should be removed now
- assertUsingBundles(ref1);
-
- changeContext(context, ControllerState.INSTALLED);
- assertEquals(ControllerState.INSTALLED, context.getState());
- }
- finally
- {
- reg1.unregister();
- }
-
- // check if the bean was unwinded as well
- assertEquals(ControllerState.INSTANTIATED, context.getState());
- }
- finally
- {
- uninstall(bundle1);
- }
- }
- finally
- {
- undeploy(bean);
- }
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -429,7 +429,6 @@
assertEquals(1, refs.length);
ServiceReference ref = refs[0];
assertEquals(bundle, ref.getBundle());
- assertEquals("A", ref.getProperty("bean.name"));
Class<?> aClass = bundle.loadClass(A.class.getName());
BundleContext bc = bundle.getBundleContext();
assertNotNull(bc);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -24,8 +24,6 @@
import junit.framework.Test;
import org.jboss.beans.metadata.spi.BeanMetaData;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.dependency.spi.Controller;
-import org.jboss.dependency.spi.ControllerContext;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
@@ -52,8 +50,6 @@
*/
public abstract class ServicesTest extends DeployersTest
{
- private static final String ANCHOR = "OSGiBundleManager";
-
public ServicesTest(String name)
{
super(name);
@@ -75,30 +71,4 @@
Method m = clazz.getDeclaredMethod(setter, value.getClass());
return m.invoke(target, value);
}
-
- private Controller getController() throws Throwable
- {
- KernelControllerContext kcc = getControllerContext(ANCHOR);
- assertNotNull(kcc);
- return kcc.getController();
- }
-
- protected ControllerContext getServiceContext(Object name, ControllerState state) throws Throwable
- {
- Controller controller = getController();
- return controller.getContext(name, state);
- }
-
- protected Object getService(Object name) throws Throwable
- {
- ControllerContext context = getServiceContext(name, ControllerState.INSTALLED);
- assertNotNull(context);
- return context.getTarget();
- }
-
- protected void changeContext(ControllerContext context, ControllerState state) throws Throwable
- {
- Controller controller = getController();
- controller.change(context, state);
- }
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -27,7 +27,7 @@
* @author <a href="adrian(a)jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
-public class A implements AMBean
+public class A
{
public String msg;
private int x;
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,38 +0,0 @@
-/*
-* 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.test.osgi.service.support.a;
-
-/**
- * A mbean.
- *
- * @author <a href="ales.justin(a)jboss.org">Ales Justin</a>
- */
-public interface AMBean
-{
- String getMsg();
-
- void setMsg(String msg);
-
- void calc(int x);
-
- int getX();
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -26,7 +26,7 @@
/**
* @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
*/
-public class C implements CMBean
+public class C
{
private A a;
private String msg;
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java 2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, 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.test.osgi.service.support.c;
-
-import org.jboss.test.osgi.service.support.a.A;
-
-/**
- * @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
- */
-public interface CMBean
-{
- A getA();
-
- void setA(A a);
-
- String getMsg();
-
- void setMsg(String msg);
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-02-10 10:39:45 UTC (rev 100793)
@@ -62,7 +62,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>
@@ -70,19 +69,7 @@
<bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
<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>
-
+
<!--
********************************
* *
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml 2010-02-10 10:39:45 UTC (rev 100793)
@@ -12,15 +12,8 @@
<bean name="ServiceDeploymentDeployer" class="org.jboss.system.deployers.ServiceDeploymentDeployer"/>
<bean name="ServiceDeployer" class="org.jboss.system.deployers.ServiceDeployer">
<constructor><parameter><inject bean="JMXKernel" property="serviceController"/></parameter></constructor>
- <property name="deploymentRegistry"><inject bean="OSGiDeploymentRegistry"/></property>
</bean>
- <bean name="JMXDictionaryFactory" class="org.jboss.osgi.framework.bundle.JMXDictionaryFactory">
- <constructor>
- <parameter><inject bean="jboss.kernel:service=KernelConfigurator"/></parameter>
- </constructor>
- </bean>
-
<!-- Intercept all annotation plugings -->
<bean name="BeanAnnotationAdapterFactory" class="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory">
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2010-02-10 10:39:45 UTC (rev 100793)
@@ -412,7 +412,7 @@
<include name="jboss-osgi-jndi.jar" />
<include name="jboss-osgi-webconsole.jar" />
<include name="jboss-osgi-reflect.jar" />
- <include name="jboss-osgi-serviceloader.jar" />
+ <!-- include name="jboss-osgi-serviceloader.jar" / -->
<include name="jboss-osgi-xml-binding.jar" />
<include name="org.apache.aries.blueprint.jar" />
<include name="org.apache.aries.util.jar" />
@@ -489,5 +489,26 @@
</pack>
+ <!--
+ *********************************
+ * *
+ * JBossAS Overwrites *
+ * *
+ *********************************
+ -->
+
+ <!--
+ This pack MUST NOT be part of an JBoss OSGi release
+ - ->
+ <pack name="JBossMC SNAPSHOT overwrites" required="no" preselected="yes">
+ <description>Temporarily overwrite AS provided jars with SNAPSHOT versions</description>
+
+ <fileset condition="isJBossMC" dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/lib"
+ override="true">
+ <include name="jboss-jmx-mc-int.jar" />
+ </fileset>
+ </pack>
+ -->
+
</packs>
</installation>
\ No newline at end of file
14 years, 4 months
JBoss-OSGI SVN: r100778 - in projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework: plugins and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-09 17:08:51 -0500 (Tue, 09 Feb 2010)
New Revision: 100778
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java
Log:
[JBOSGi-278] Revisit ControllerContext handling
Move some of the context bleed into ServiceManagerPlugin
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-09 21:44:00 UTC (rev 100777)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-02-09 22:08:51 UTC (rev 100778)
@@ -525,13 +525,11 @@
checkValidBundleContext();
ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
OSGiServiceState serviceState = (OSGiServiceState)plugin.registerService(this, clazzes, service, properties);
- afterServiceRegistration(serviceState);
return serviceState.getRegistration();
}
void unregisterService(OSGiServiceState serviceState)
{
- beforeServiceUnregistration(serviceState);
ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
plugin.unregisterService(serviceState);
}
@@ -543,20 +541,6 @@
return plugin.ungetService(this, reference);
}
- /**
- * After service registration callback.
- */
- protected void afterServiceRegistration(OSGiServiceState service)
- {
- }
-
- /**
- * Before service unregistration callback.
- */
- protected void beforeServiceUnregistration(OSGiServiceState service)
- {
- }
-
boolean ungetContext(ControllerContext context)
{
return removeContextInUse(context);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-09 21:44:00 UTC (rev 100777)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java 2010-02-09 22:08:51 UTC (rev 100778)
@@ -30,7 +30,6 @@
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.List;
-import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
@@ -39,7 +38,7 @@
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.ControllerContextPlugin;
+import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
import org.osgi.framework.AdminPermission;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
@@ -132,13 +131,6 @@
return false;
}
- protected Set<ControllerContext> getRegisteredContexts()
- {
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- return plugin.getRegisteredContexts(this);
- }
-
public Class<?> loadClass(String name) throws ClassNotFoundException
{
checkInstalled();
@@ -314,8 +306,8 @@
Throwable rethrow = null;
if (priorState == Bundle.ACTIVE)
{
- BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
BundleContext bundleContext = getBundleContext();
+ BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
if (bundleActivator != null && bundleContext != null)
{
try
@@ -330,9 +322,8 @@
}
// Any services registered by this bundle must be unregistered
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- plugin.unregisterContexts(this);
+ ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
+ plugin.unregisterServices(this);
// Any services used by this bundle must be released
for (ControllerContext context : getUsedContexts(this))
@@ -407,20 +398,4 @@
return super.getHeaders(locale);
}
-
- @Override
- protected void afterServiceRegistration(OSGiServiceState service)
- {
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- plugin.putContext(service, getDeploymentUnit());
- }
-
- @Override
- protected void beforeServiceUnregistration(OSGiServiceState service)
- {
- OSGiBundleManager manager = getBundleManager();
- ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
- plugin.removeContext(service, getDeploymentUnit());
- }
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java 2010-02-09 21:44:00 UTC (rev 100777)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java 2010-02-09 22:08:51 UTC (rev 100778)
@@ -49,11 +49,6 @@
this.serviceState = serviceState;
}
- ControllerContext getContext()
- {
- return getServiceState();
- }
-
public Bundle getBundle()
{
return serviceState.getBundle();
@@ -102,13 +97,13 @@
return serviceState.toString();
}
- /**
- * Get the serviceState.
- *
- * @return the serviceState.
- */
OSGiServiceState getServiceState()
{
return serviceState;
}
+
+ ControllerContext getContext()
+ {
+ return getServiceState();
+ }
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-09 21:44:00 UTC (rev 100777)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java 2010-02-09 22:08:51 UTC (rev 100778)
@@ -86,12 +86,6 @@
super(bundleManager);
}
- @Deprecated
- public void setEnableMDRUsage(boolean mdrUsage)
- {
- log.warn("This flag is no longer supported.");
- }
-
public void start()
{
kernel = getBundleManager().getKernel();
@@ -217,19 +211,29 @@
throw new RuntimeException(t);
}
- FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
- plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
+ if (bundleState instanceof OSGiBundleState)
+ {
+ ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
+ plugin.putContext(result, ((OSGiBundleState)bundleState).getDeploymentUnit());
+ }
+ FrameworkEventsPlugin eventsPlugin = getPlugin(FrameworkEventsPlugin.class);
+ eventsPlugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
+
return result;
}
public void unregisterService(OSGiServiceState serviceState)
{
AbstractBundleState bundleState = serviceState.getBundleState();
-
+ if (bundleState instanceof OSGiBundleState)
+ {
+ ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
+ plugin.removeContext(serviceState, ((OSGiBundleState)bundleState).getDeploymentUnit());
+ }
+
Controller controller = kernel.getController();
controller.uninstall(serviceState.getName());
-
serviceState.internalUnregister();
FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
@@ -249,6 +253,12 @@
return bundleState.removeContextInUse(context);
}
+ public void unregisterServices(AbstractBundleState bundleState)
+ {
+ ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
+ plugin.unregisterContexts(bundleState);
+ }
+
/**
* Apply OSGi's MDR usage:
* - add/remove system bundle as default context tracker
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java 2010-02-09 21:44:00 UTC (rev 100777)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java 2010-02-09 22:08:51 UTC (rev 100778)
@@ -140,4 +140,10 @@
*
*/
void unregisterService(OSGiServiceState serviceState);
+
+ /**
+ * Unregister all services that were registered on behalf of the given bundle.
+ * @param bundleState The bundle that registered the services.
+ */
+ void unregisterServices(AbstractBundleState bundleState);
}
\ No newline at end of file
14 years, 4 months
JBoss-OSGI SVN: r100713 - in projects/jboss-osgi/projects/runtime/framework/trunk: src/main/java/org/jboss/osgi/framework/resolver/internal and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-08 13:22:55 -0500 (Mon, 08 Feb 2010)
New Revision: 100713
Removed:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/resolver/internal/drools/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/META-INF/resolver-rules.drl
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
Log:
Remove drools resolver implementation
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-02-08 18:15:35 UTC (rev 100712)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-02-08 18:22:55 UTC (rev 100713)
@@ -46,7 +46,6 @@
<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.drools>5.0.1</version.drools>
<version.jboss.classloading>2.2.0.Alpha1</version.jboss.classloading>
<version.jboss.deployers>2.2.0.Alpha1</version.jboss.deployers>
<version.jboss.kernel>2.2.0-SNAPSHOT</version.jboss.kernel>
@@ -74,11 +73,6 @@
<artifactId>bnd</artifactId>
</dependency>
<dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-compiler</artifactId>
- <version>${version.drools}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.cl</groupId>
<artifactId>jboss-classloader</artifactId>
<version>${version.jboss.classloading}</version>
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java 2010-02-08 18:15:35 UTC (rev 100712)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java 2010-02-08 18:22:55 UTC (rev 100713)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.osgi.resolver;
-
-// $Id$
-
-import org.jboss.osgi.framework.bundle.OSGiBundleManager;
-import org.jboss.osgi.framework.resolver.Resolver;
-import org.jboss.osgi.framework.resolver.internal.drools.RuleBasedResolverImpl;
-
-/**
- * Test the rule based {@link Resolver}
- *
- * @author thomas.diesler(a)jboss.com
- * @since 10-Nov-2009
- */
-public class RuleBasedResolverTest extends AbstractImportExportTest
-{
- @Override
- protected Resolver getTestResolver()
- {
- Resolver resolver = getInstalledResolver();
- if (resolver == null || resolver.getClass() != RuleBasedResolverImpl.class)
- {
- OSGiBundleManager bundleManager = framework.getBundleManager();
- resolver = new RuleBasedResolverImpl(bundleManager);
- resolver.addBundle(bundleManager.getSystemBundle());
- }
- return resolver;
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/META-INF/resolver-rules.drl
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/META-INF/resolver-rules.drl 2010-02-08 18:15:35 UTC (rev 100712)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/META-INF/resolver-rules.drl 2010-02-08 18:22:55 UTC (rev 100713)
@@ -1,396 +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.resolver
-
-import org.jboss.osgi.framework.resolver.internal.drools.WireCandidate
-import org.jboss.osgi.framework.metadata.VersionRange
-import org.osgi.framework.Bundle
-import org.osgi.framework.Version
-
-global org.jboss.logging.Logger log;
-
-# Functions #######################################################################################
-
-/**
-* Returns TRUE is the version is in the given version range
-*/
-function boolean inRange(VersionRange range, Version version)
-{
- return range.isInRange(version);
-}
-
-# Types ###########################################################################################
-
-
-# Rules ###########################################################################################
-
-/**************************************************************************************************
-* A rule that inserts the ImportPackage facts for newly inserted
-* ResolverBundle objects.
-*/
-rule "Add ImportPackage for new ResolverBundle"
-salience 2000
-when
- $importer : ResolverBundle( state == Bundle.INSTALLED, resolved == false )
- $import : ImportPackage( ) from $importer.importPackages
- not ImportPackage( owner == $importer, this == $import )
-then
- log.debug("Add " + $import);
- insert( $import );
-end
-
-/**************************************************************************************************
-* A rule that inserts the ExportPackage facts for newly inserted
-* ResolverBundle objects.
-*/
-rule "Add ExportPackage for new ResolverBundle"
-salience 2000
-when
- $exporter : ResolverBundle( (state == Bundle.INSTALLED || bundleId == 0), resolved == false )
- $export : ExportPackage( ) from $exporter.exportPackages
- not ExportPackage( owner == $exporter, this == $export )
-then
- log.debug("Add " + $export);
- insert( $export );
-end
-
-/**************************************************************************************************
-* A rule that inserts the RequiredBundle facts for newly inserted
-* ResolverBundle objects.
-*/
-rule "Add RequiredBundle for new ResolverBundle"
-salience 2000
-when
- $importer : ResolverBundle( state == Bundle.INSTALLED, resolved == false )
- $reqbnd : RequiredBundle( ) from $importer.requiredBundles
- not RequiredBundle( owner == $importer, this == $reqbnd )
-then
- log.debug("Add " + $reqbnd);
- insert( $reqbnd );
-end
-
-
-/**************************************************************************************************
-* A rule that inserts the WireCandidate facts for every combination
-* of matching import/export package names.
-*/
-rule "Add WireCandidate"
-salience 1000
-when
- $export : ExportPackage( )
- $import : ImportPackage( name == $export.name, exporter == null )
-then
- WireCandidate wc = new WireCandidate();
- wc.setImportPackage( $import );
- wc.setExportPackage( $export );
- log.debug("Add " + wc);
- insert ( wc );
-end
-
-/**************************************************************************************************
-* A rule that retracts the WireCandidate if there is a package
-* version miss-match.
-*/
-rule "Retract package version miss-match"
-salience 1000
-when
- $import : ImportPackage( exporter == null, version != VersionRange.allVersions )
- $wc : WireCandidate( importPackage == $import )
- not( eval( inRange( $import.getVersion(), $wc.getExportPackage().getVersion())))
-then
- log.debug("Package version missmatch - Retract " + $wc);
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that retracts the WireCandidate if there is a miss-match
-* of the bundle-symbolic-name on the ImportPackage.
-*/
-rule "Retract bundle symbolic name miss-match"
-salience 1000
-when
- $import : ImportPackage( exporter == null, bundleSymbolicName != null )
- $wc : WireCandidate( importPackage == $import, exportPackage.owner.symbolicName != $import.bundleSymbolicName )
-then
- log.debug("Bundle-SymbolicName missmatch - Retract " + $wc);
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that retracts the WireCandidate if there is a miss-match
-* of the bundle-version on the ImportPackage.
-*/
-rule "Retract bundle version miss-match"
-salience 1000
-when
- $import : ImportPackage( exporter == null, bundleVersion != null )
- $wc : WireCandidate( importPackage == $import )
- not( eval( inRange( $import.getBundleVersion(), $wc.getExportPackage().getOwner().getVersion())))
-then
- log.debug("Bundle-Version missmatch - Retract " + $wc);
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that retracts the WireCandidate if there is a miss-match
-* of package attributes.
-*/
-rule "Retract package attributre miss-match"
-salience 1000
-when
- $export : ExportPackage( )
- $import : ImportPackage( exporter == null )
- $wc : WireCandidate( importPackage == $import, exportPackage == $export )
- not( eval( $export.matchAttributes( $import ) ) )
-then
- log.debug("Attribute missmatch - Retract " + $wc);
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that retracts a WireCandidate if there is another
-* associated with a higher version on the ExportPackage.
-*/
-rule "Retract WireCandidate to lower version"
-salience 400
-when
- $bndkeep : ResolverBundle( )
- $expkeep : ExportPackage( owner == $bndkeep )
- $wckeep : WireCandidate( exportPackage == $expkeep )
- $bnddel : ResolverBundle( )
- $expdel : ExportPackage( this != $expkeep, owner == $bnddel )
- $wcdel : WireCandidate( importPackage == $wckeep.importPackage, exportPackage == $expdel )
- eval( $expkeep.getVersion().compareTo($expdel.getVersion()) > 0 )
- eval( $bnddel.isResolved() == false || ( $bnddel.isResolved() == true && $bndkeep.isResolved() == true ) )
-then
- log.debug("Retract lower version " + $wcdel);
- retract ( $wcdel );
-end
-
-/**************************************************************************************************
-* A rule that retracts a WireCandidate if there is another
-* associated with a lower bundle id.
-*/
-rule "Retract WireCandidate to higher bundle id"
-salience 300
-when
- $bndkeep : ResolverBundle( )
- $expkeep : ExportPackage( owner == $bndkeep )
- $wckeep : WireCandidate( exportPackage == $expkeep )
- $bnddel : ResolverBundle( )
- $expdel : ExportPackage( this != $expkeep, owner == $bnddel )
- $wcdel : WireCandidate( importPackage == $wckeep.importPackage, exportPackage == $expdel )
- eval ( $bnddel.getBundleId() > $bndkeep.getBundleId() )
- eval( $bnddel.isResolved() == false || ( $bnddel.isResolved() == true && $bndkeep.isResolved() == true ) )
-then
- log.debug("Retract higher bundle id " + $wcdel);
- retract ( $wcdel );
-end
-
-/**************************************************************************************************
-* A rule that retracts a WireCandidate if there is another
-* associated with an already resolved exporter.
-*/
-rule "Retract WireCandidate to unresolved exporter"
-salience 200
-when
- $bndkeep : ResolverBundle( resolved == true )
- $expkeep : ExportPackage( owner == $bndkeep )
- $wckeep : WireCandidate( exportPackage == $expkeep )
- $bnddel : ResolverBundle( resolved == false )
- $expdel : ExportPackage( this != $expkeep, owner == $bnddel )
- $wcdel : WireCandidate( importPackage == $wckeep.importPackage, exportPackage == $expdel )
-then
- log.debug("Retract unresolved exporter " + $wcdel);
- retract ( $wcdel );
-end
-
-/**************************************************************************************************
-* A rule that sets the provider for a RequiredBundle if there is a match
-*/
-rule "RequiredBundle match on bundle-symbolic-name only"
-salience 100
-when
- $provider : ResolverBundle( )
- $reqbnd : RequiredBundle( symbolicName == $provider.symbolicName, version == null, provider == null )
-then
- log.debug("RequiredBundle match " + $reqbnd + " --> " + $provider);
- modify ( $reqbnd ) { setProvider( $provider ) };
-end
-
-/**************************************************************************************************
-* A rule that sets the provider for a RequiredBundle if there is a match on
-* bundle-symbolic-name and bundle-version
-*/
-rule "RequiredBundle match on bundle-symbolic-name and bundle-version"
-salience 100
-when
- $provider : ResolverBundle( )
- $reqbnd : RequiredBundle( symbolicName == $provider.symbolicName, version != null, provider == null )
- eval( inRange( $reqbnd.getVersion(), $provider.getVersion()))
-then
- log.debug("RequiredBundle match " + $reqbnd + " --> " + $provider);
- modify ( $reqbnd ) { setProvider( $provider ) };
-end
-
-/**************************************************************************************************
-* A rule that applies the WireCandidate if there is only one
-* possible WireCandidate left associated with an ImportPackage.
-* The exporter must be resolved.
-*/
-rule "Wire to resolved exporter"
-salience 50
-when
- $importer : ResolverBundle( resolved == false )
- $import : ImportPackage( owner == $importer, exporter == null )
- $exporter : ResolverBundle( resolved == true )
- $export : ExportPackage( owner == $exporter )
- $wc : WireCandidate( importPackage == $import, exportPackage == $export )
- not( WireCandidate( this != $wc, importPackage == $import ) )
-then
- log.debug("Wire to resolved exporter " + $wc);
- modify ( $import ) { setExporter( $wc.getExportPackage() ) };
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that applies the WireCandidate if there is only one
-* possible WireCandidate left associated with an ImportPackage.
-* The exporter is also the importer.
-*/
-rule "Wire self import"
-salience 50
-when
- $import : ImportPackage( exporter == null )
- $export : ExportPackage( owner == $import.owner )
- $wc : WireCandidate( importPackage == $import, exportPackage == $export )
- not( WireCandidate( this != $wc, importPackage == $import ) )
-then
- log.debug("Wire self import " + $wc);
- modify ( $import ) { setExporter( $wc.getExportPackage() ) };
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that marks the ResolverBundle as resolved on the condition that
-*
-* # There are no ImportPackages
-* # All non-optional RequiredBundles have a provider
-*/
-rule "Resolve required imports"
-salience 20
-when
- $importer : ResolverBundle( state != Bundle.UNINSTALLED, resolved == false )
- not( ImportPackage( owner == $importer ))
- not( RequiredBundle( owner == $importer, optional == false, provider == null ))
-then
- log.debug("Resolved " + $importer);
- modify ( $importer ) { markResolved ( ) };
-end
-
-/**************************************************************************************************
-* A rule that marks the ResolverBundle as resolved on the condition that
-*
-* # All non-optional ImportPackage wire to an exporter
-* # All non-optional RequiredBundles have a provider
-*/
-rule "Resolve optional imports"
-when
- $importer : ResolverBundle( state != Bundle.UNINSTALLED, resolved == false )
- not( ImportPackage( owner == $importer, optional == false, exporter == null ))
- not( RequiredBundle( owner == $importer, optional == false, provider == null ))
-then
- log.debug("Resolved " + $importer);
- modify ( $importer ) { markResolved ( ) };
-end
-
-/**************************************************************************************************
-* A rule that retracts ImportPackage facts for UNINSTALLED bundles
-*/
-rule "Retract uninstalled ImportPackage"
-when
- $importer : ResolverBundle( state == Bundle.UNINSTALLED )
- $import : ImportPackage( owner == $importer )
-then
- log.debug("Uninstall " + $import);
- retract ( $import );
-end
-
-/**************************************************************************************************
-* A rule that retracts ExportPackage facts for UNINSTALLED bundles
-*/
-rule "Retract uninstalled ExportPackage"
-when
- $exporter : ResolverBundle( state == Bundle.UNINSTALLED )
- $export : ExportPackage( owner == $exporter )
-then
- log.debug("Uninstall " + $export);
- retract ( $export );
-end
-
-/**************************************************************************************************
-* A rule that retracts WireCandidate facts for UNINSTALLED ImportPackages
-*/
-rule "Retract uninstalled WireCandidate/ImportPackage"
-when
- $wc : WireCandidate( )
- not ( ImportPackage ( this == $wc.importPackage) )
-then
- log.debug("Uninstall " + $wc);
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that retracts WireCandidate facts for UNINSTALLED ExportPackages
-*/
-rule "Retract uninstalled WireCandidate/ExportPackage"
-when
- $wc : WireCandidate( )
- not ( ExportPackage ( this == $wc.exportPackage) )
-then
- log.debug("Unistall " + $wc);
- retract ( $wc );
-end
-
-/**************************************************************************************************
-* A rule that retracts RequiredBundles facts for UNINSTALLED ResolverBundles
-*/
-rule "Retract uninstalled RequiredBundles"
-when
- $importer : ResolverBundle( state == Bundle.UNINSTALLED )
- $reqbnd : RequiredBundle( owner == $importer )
-then
- log.debug("Uninstall " + $reqbnd);
- retract ( $reqbnd );
-end
-
-/**************************************************************************************************
-* A rule that reports unresolved ImportPackage objects
-*/
-rule "Report unresolved import"
-salience -1000
-when
- $import : ImportPackage( exporter == null, optional == false )
-then
- log.debug("Unresolved " + $import );
-end
-
14 years, 4 months
JBoss-OSGI SVN: r100712 - in projects/jboss-osgi: trunk and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-08 13:15:35 -0500 (Mon, 08 Feb 2010)
New Revision: 100712
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/
projects/jboss-osgi/trunk/reactor/pom.xml
projects/jboss-osgi/trunk/testsuite/example/pom.xml
projects/jboss-osgi/trunk/testsuite/functional/pom.xml
Log:
Update trunk dependencies
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-02-08 18:05:53 UTC (rev 100711)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2010-02-08 18:15:35 UTC (rev 100712)
@@ -55,14 +55,14 @@
<version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
- <version.jboss.osgi.deployment>1.0.1-SNAPSHOT</version.jboss.osgi.deployment>
- <version.jboss.osgi.husky>1.0.3-SNAPSHOT</version.jboss.osgi.husky>
+ <version.jboss.osgi.deployment>1.0.1</version.jboss.osgi.deployment>
+ <version.jboss.osgi.husky>1.0.4-SNAPSHOT</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
- <version.jboss.osgi.jmx>1.0.3-SNAPSHOT</version.jboss.osgi.jmx>
- <version.jboss.osgi.reflect>2.2.0-SNAPSHOT</version.jboss.osgi.reflect>
- <version.jboss.osgi.runtime.deployers>1.0.4-SNAPSHOT</version.jboss.osgi.runtime.deployers>
- <version.jboss.osgi.spi>1.0.4-SNAPSHOT</version.jboss.osgi.spi>
- <version.jboss.osgi.xml.binding>2.0.2.Beta4-SNAPSHOT</version.jboss.osgi.xml.binding>
+ <version.jboss.osgi.jmx>1.0.4-SNAPSHOT</version.jboss.osgi.jmx>
+ <version.jboss.osgi.reflect>2.2.0</version.jboss.osgi.reflect>
+ <version.jboss.osgi.runtime.deployers>1.0.4</version.jboss.osgi.runtime.deployers>
+ <version.jboss.osgi.spi>1.0.5-SNAPSHOT</version.jboss.osgi.spi>
+ <version.jboss.osgi.xml.binding>2.0.2.Beta4</version.jboss.osgi.xml.binding>
<version.jboss.test>1.1.4.GA</version.jboss.test>
<version.ops4j.pax.web>0.7.2</version.ops4j.pax.web>
<version.osgi>4.2.0</version.osgi>
@@ -385,19 +385,6 @@
</executions>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>javacc-maven-plugin</artifactId>
- <version>2.4</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>javacc</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-idea-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
@@ -438,7 +425,7 @@
</property>
<property>
<name>org.jboss.osgi.husky.Invoker</name>
- <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
+ <value>org.jboss.osgi.husky.internal.AbstractInvoker</value>
</property>
<property>
<name>test.archive.directory</name>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2010-02-08 18:05:53 UTC (rev 100711)
+++ projects/jboss-osgi/trunk/pom.xml 2010-02-08 18:15:35 UTC (rev 100712)
@@ -58,11 +58,11 @@
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
<version.jboss.osgi.deployment>1.0.1</version.jboss.osgi.deployment>
- <version.jboss.osgi.framework>1.0.0.Alpha3</version.jboss.osgi.framework>
+ <version.jboss.osgi.framework>1.0.0.Alpha4-SNAPSHOT</version.jboss.osgi.framework>
<version.jboss.osgi.hotdeploy>1.0.4</version.jboss.osgi.hotdeploy>
- <version.jboss.osgi.husky>1.0.3</version.jboss.osgi.husky>
+ <version.jboss.osgi.husky>1.0.4-SNAPSHOT</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
- <version.jboss.osgi.jmx>1.0.3</version.jboss.osgi.jmx>
+ <version.jboss.osgi.jmx>1.0.4-SNAPSHOT</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.2</version.jboss.osgi.jndi>
<version.jboss.osgi.jta>1.0.0</version.jboss.osgi.jta>
<version.jboss.osgi.reflect>2.2.0</version.jboss.osgi.reflect>
@@ -71,7 +71,7 @@
<version.jboss.osgi.runtime.felix>2.0.2</version.jboss.osgi.runtime.felix>
<version.jboss.osgi.runtime.jbossas>1.0.2</version.jboss.osgi.runtime.jbossas>
<version.jboss.osgi.serviceloader>1.0.0</version.jboss.osgi.serviceloader>
- <version.jboss.osgi.spi>1.0.4</version.jboss.osgi.spi>
+ <version.jboss.osgi.spi>1.0.5-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.webapp>0.7.2.SP1</version.jboss.osgi.webapp>
<version.jboss.osgi.webconsole>1.0.2</version.jboss.osgi.webconsole>
<version.jboss.osgi.xml.binding>2.0.2.Beta4</version.jboss.osgi.xml.binding>
@@ -423,7 +423,7 @@
</property>
<property>
<name>org.jboss.osgi.husky.Invoker</name>
- <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
+ <value>org.jboss.osgi.husky.internal.AbstractInvoker</value>
</property>
<property>
<name>test.archive.directory</name>
@@ -471,7 +471,7 @@
</property>
<property>
<name>org.jboss.osgi.husky.Invoker</name>
- <value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
+ <value>org.jboss.osgi.husky.internal.AbstractInvoker</value>
</property>
<property>
<name>org.jboss.osgi.husky.runtime.connector.host</name>
Property changes on: projects/jboss-osgi/trunk/reactor
___________________________________________________________________
Name: svn:externals
+ ../../projects/runtime/framework/trunk framework
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2010-02-08 18:05:53 UTC (rev 100711)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2010-02-08 18:15:35 UTC (rev 100712)
@@ -46,6 +46,7 @@
<!--
Name: framework-jbossmc
Descr: Build the JBossMC Framework
+ -->
<profile>
<id>framework-jbossmc</id>
<activation>
@@ -69,7 +70,6 @@
<module>framework</module>
</modules>
</profile>
- -->
<!--
Name: jbossmc-javadoc
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2010-02-08 18:05:53 UTC (rev 100711)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2010-02-08 18:15:35 UTC (rev 100712)
@@ -15,7 +15,7 @@
Set these VM properties in your IDE debugger
-Dlog4j.output.dir=${workspace_loc:jboss-osgi-testsuite-example/target}
- -Dorg.jboss.osgi.husky.Invoker=org.jboss.osgi.husky.internal.OSGiInvoker
+ -Dorg.jboss.osgi.husky.Invoker=org.jboss.osgi.husky.internal.AbstractInvoker
-Dtest.archive.directory=${workspace_loc:jboss-osgi-testsuite-example/target}/test-libs
-->
Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2010-02-08 18:05:53 UTC (rev 100711)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml 2010-02-08 18:15:35 UTC (rev 100712)
@@ -15,7 +15,7 @@
Set these VM properties in your IDE debugger
-Dlog4j.output.dir=${workspace_loc:jboss-osgi-testsuite-functional/target}
- -Dorg.jboss.osgi.husky.Invoker=org.jboss.osgi.husky.internal.OSGiInvoker
+ -Dorg.jboss.osgi.husky.Invoker=org.jboss.osgi.husky.internal.AbstractInvoker
-Dtest.archive.directory=${workspace_loc:jboss-osgi-testsuite-functional/target}/test-libs
-->
14 years, 4 months
JBoss-OSGI SVN: r100710 - in projects/jboss-osgi/trunk: distribution and 16 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2010-02-08 12:15:46 -0500 (Mon, 08 Feb 2010)
New Revision: 100710
Added:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/JMSException.java
Removed:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/JMSException.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/xml/ws/WebServiceException.java
Modified:
projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-jbossmc.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack01-welcome.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack05-installpath.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack10-packs.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack30-verify.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack35-done.png
projects/jboss-osgi/trunk/distribution/docbook/en/images/runtime-structure.png
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch070-provided-bundles.xml
projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch080-provided-examples.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ChangeLog.html
projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ReleaseNotes.html
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/distribution/pom.xml
projects/jboss-osgi/trunk/pom.xml
projects/jboss-osgi/trunk/reactor/
projects/jboss-osgi/trunk/reactor/pom.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/serviceloader/ServiceLoaderTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/AbstractWebAppTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppExtenderTestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi287/OSGi287TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi287/jbosgi287-bundleC.bnd
Log:
Merge Beta6 changes from QA branch to trunk
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/hudson-matrix-jbossmc.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack01-welcome.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack05-installpath.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack10-packs.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack30-verify.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/izpack35-done.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/images/runtime-structure.png
===================================================================
(Binary files differ)
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch020-getting-started.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -21,7 +21,7 @@
<para>To run the installer execute the following command:</para>
<programlisting>
- java -jar jboss-osgi-installer-1.0.0.Beta5.jar
+ java -jar jboss-osgi-installer-1.0.0.Beta6.jar
</programlisting>
<para>The installer first shows a welcome screen</para>
@@ -130,9 +130,9 @@
$ bin/run.sh
=========================================================================
- JBoss OSGi Bootstrap Environment
+ JBossOSGi Bootstrap Environment
- OSGI_HOME: /home/hudson/jboss-osgi-1.0.0.Beta5/runtime
+ OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0.Beta6/runtime
JAVA: /usr/java/jdk1.6/bin/java
@@ -140,18 +140,21 @@
=========================================================================
-16:20:27,991 INFO JBossOSGi - Framework - 1.0.0.Alpha2
+13:10:35,143 INFO [OSGiBundleManager] JBossOSGi Core Framework - 1.0.0.Alpha3
...
-16:20:29,203 INFO Bundle STARTED: Bundle{system.bundle-0.0.0}
-16:20:29,243 INFO JBossOSGi Runtime booted in 1.241sec
-16:20:29,569 INFO Bundle INSTALLED: Bundle{jboss-osgi-jndi-1.0.2}
-16:20:29,843 INFO Bundle INSTALLED: Bundle{jboss-osgi-common-core-2.2.13.GA}
-16:20:29,866 INFO Bundle INSTALLED: Bundle{jboss-osgi-jmx-1.0.2}
-16:20:30,512 INFO Bundle STARTED: Bundle{jboss-osgi-jndi-1.0.2}
-16:20:30,789 INFO Bundle STARTED: Bundle{jboss-osgi-jmx-1.0.2}
-16:20:30,806 INFO Bundle STARTED: Bundle{jboss-osgi-common-core-2.2.13.GA}
+13:10:36,405 INFO Start DeploymentScanner: [scandir=.../server/default/deploy,interval=2000ms]
+13:10:36,416 INFO Bundle STARTED: Bundle{system.bundle-0.0.0}
+13:10:36,442 INFO JBossOSGi Runtime booted in 1.297sec
+13:10:36,742 INFO Bundle INSTALLED: Bundle{jboss-osgi-jndi-1.0.2}
+13:10:36,967 INFO Bundle INSTALLED: Bundle{jboss-osgi-common-core-2.2.13.GA}
+13:10:36,994 INFO Bundle INSTALLED: Bundle{jboss-osgi-jmx-1.0.3}
+13:10:37,018 INFO Bundle INSTALLED: Bundle{org.apache.felix.eventadmin-1.0.0}
+13:10:37,167 INFO Bundle STARTED: Bundle{jboss-osgi-common-core-2.2.13.GA}
+13:10:37,297 INFO Bundle STARTED: Bundle{jboss-osgi-jmx-1.0.3}
+13:10:37,829 INFO Bundle STARTED: Bundle{jboss-osgi-jndi-1.0.2}
+13:10:38,070 INFO Bundle STARTED: Bundle{org.apache.felix.eventadmin-1.0.0}
...
-<emphasis role="bold">16:20:30,824 INFO JBossOSGi Runtime started in 1.64sec</emphasis>
+<emphasis role="bold">13:10:38,334 INFO JBossOSGi Runtime started in 1.939sec</emphasis>
</programlisting>
</sect1>
@@ -171,6 +174,7 @@
<listitem><emphasis role="bold">JNDITestCase</emphasis> - Bind objects to the Naming Service</listitem>
<listitem><emphasis role="bold">MicrocontainerTestCase</emphasis> - Call a service from an MC bean and vica versa</listitem>
<listitem><emphasis role="bold">SAXParserTestCase</emphasis> - A test that uses a SAX parser to read an XML document</listitem>
+ <listitem><emphasis role="bold">ServiceLoaderTestCase</emphasis> - Autoregister META-INF/services</listitem>
<listitem><emphasis role="bold">SimpleHuskyTestCase</emphasis> - Accesses a service from within the test case</listitem>
<listitem><emphasis role="bold">SimpleTestCase</emphasis> - A simple bundle lifecycle test</listitem>
<listitem><emphasis role="bold">TransactionTestCase</emphasis> - A simple transaction test</listitem>
@@ -266,39 +270,39 @@
$ cp ant.properties.example ant.properties
$ vi ant.properties
-# The JBoss settings
-jboss.server.instance=default
-jboss.bind.address=127.0.0.1
+# Hudson Workspace Root
+# hudson.root=/home/username/workspace/hudson/jboss-osgi
+# Hudson QA Environment
+# hudson.username=username
+
+#hudson.jboss501.zip=file:///home/username/Download/java/jboss/jboss-5.0.1.GA.zip
+#hudson.jboss510.zip=file:///home/username/Download/java/jboss/jboss-5.1.0.GA.zip
+#hudson.jboss600.zip=file:///home/username/Download/java/jboss/jboss-6.0.0.M1.zip
+
# JDK settings
java.home.jdk15=/usr/java/jdk1.5.0_22
java.home.jdk16=/usr/java/jdk1.6.0_17
-# Hudson QA Environment
-hudson.username=chageme
-hudson.password=chageme
-
+# Maven settings
hudson.maven.name=apache-maven-2.2.1
hudson.maven.path=/usr/java/apache-maven-2.2.1
+hudson.maven.profile=$HUDSONDIR/profiles.xml.local.qa
-hudson.root=/home/hudson/workspace/hudson/jboss-osgi
+# The JBoss settings
+jboss.server.instance=default
+jboss.bind.address=127.0.0.1
-hudson.maven.profile=$HUDSONDIR/profiles.xml.local.qa
-
-hudson.host=jbmuc.dyndns.org
+hudson.host=localhost
hudson.admin.port=8250
hudson.http.port=8280
-#hudson.jboss501.zip=file:///home/hudson/Download/java/jboss/jboss-5.0.1.GA.zip
-#hudson.jboss510.zip=file:///home/hudson/download/java/jboss/jboss-5.1.0.GA.zip
-
hudson.mail.recipients=
hudson.mail.admin=yourname(a)yourdomain.com
hudson.smtp.host=localhost
-# Hudson (1.290)
-apache-tomcat=5.5.20
-sun-hudson=2402/128862
+apache-tomcat=5.5.27
+sun-hudson=1.336
</programlisting>
<emphasis role="bold">Run Hudson Setup</emphasis>
@@ -308,7 +312,7 @@
Buildfile: build.xml
init:
- [echo] V1.0.0.Beta5
+ [echo] V1.0.0.Beta6
init-hudson:
[echo]
@@ -336,7 +340,7 @@
Buildfile: build.xml
init:
- [echo] V1.0.0.Beta5
+ [echo] V1.0.0.Beta6
init-hudson:
[echo]
@@ -362,7 +366,7 @@
Buildfile: build.xml
init:
- [echo] V1.0.0.Beta5
+ [echo] V1.0.0.Beta6
init-hudson:
[echo]
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch030-runtime.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -143,7 +143,7 @@
JBossOSGi Bootstrap Environment
- OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0.Beta5/runtime
+ OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0.Beta6/runtime
JAVA: /usr/java/jdk1.6/bin/java
@@ -151,7 +151,7 @@
=========================================================================
-12:10:48,713 INFO JBossOSGi Framework - 1.0.0.Alpha1
+12:10:48,713 INFO JBossOSGi Core Framework - 1.0.0.Alpha3
12:10:49,089 INFO Bundle INSTALLED: Bundle{osgi.cmpn:4.2.0.200908310645}
12:10:49,188 INFO Bundle INSTALLED: Bundle{org.apache.felix.log:1.0.0}
12:10:49,282 INFO Bundle INSTALLED: Bundle{jboss-osgi-common:1.0.2}
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch050-developer-guide.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -23,15 +23,15 @@
</imageobject>
</mediaobject>
- <para>The latest version of the <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs">JBoss OSGi SPI</ulink>.</para>
+ <para>The latest version of the <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs">JBoss OSGi SPI</ulink>.</para>
<itemizedlist>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi</ulink> - Common classes and interfaces.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.capability</ulink> - Capabilities that can be installed in the OSGi framework.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.framework</ulink> - Framework integration and bootstrap.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.management</ulink> - Management view on deployed bundles.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.service</ulink> - A collection of SPI provided services.</listitem>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.util</ulink> - A collection of SPI provided utilities.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi</ulink> - Common classes and interfaces.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.capability</ulink> - Capabilities that can be installed in the OSGi framework.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.framework</ulink> - Framework integration and bootstrap.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.management</ulink> - Management view on deployed bundles.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.service</ulink> - A collection of SPI provided services.</listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.util</ulink> - A collection of SPI provided utilities.</listitem>
</itemizedlist>
<emphasis role="bold">Bootstrapping JBoss OSGi</emphasis>
@@ -69,7 +69,7 @@
<para>The JBoss OSGi SPI comes with a default bootstrap provider:</para>
<itemizedlist>
- <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">PropertiesBootstrapProvider</ulink></listitem>
+ <listitem><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">PropertiesBootstrapProvider</ulink></listitem>
</itemizedlist>
<para>OSGiBootstrapProvider implementations that read their configurtation from some other source are possible, but currently not
@@ -90,7 +90,7 @@
<emphasis role="bold">The ManagedFramework</emphasis>
- <para>The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">
+ <para>The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">
ManagedFramework</ulink> gives you access to the MBean views of the deployed Bundles. It is registerd under the name:</para>
<itemizedlist>
@@ -99,7 +99,7 @@
<emphasis role="bold">The ManagedBundle</emphasis>
- <para>The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">
+ <para>The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">
ManagedBundle</ulink> gives you access to the MBean views of a deployed Bundle. It is registerd under the name:</para>
<itemizedlist>
@@ -109,7 +109,7 @@
<emphasis role="bold">Accessing the Management Objects</emphasis>
<para>If you work with the JBoss OSGi Testsuite you get access to these managed objects through the
- <ulink url="http://junit.sourceforge.net/">JUnit</ulink> support package <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/tes...">org.jboss.osgi.testing</ulink>.
+ <ulink url="http://junit.sourceforge.net/">JUnit</ulink> support package <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/tes...">org.jboss.osgi.testing</ulink>.
</para>
<para>If you install JBoss OSGi in an already existing JBossAS instance you also get access to the Managed Objects through the JBoss provided
@@ -130,7 +130,7 @@
<title>Writing Test Cases</title>
<para>JBoss OSGi comes with <ulink url="http://www.junit.org">JUnit</ulink> test support as part of the SPI provided
- <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/tes...">org.jboss.osgi.testing</ulink>
+ <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/tes...">org.jboss.osgi.testing</ulink>
package. There are two distinct test scenarios that we support:</para>
<itemizedlist>
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch060-husky-testing.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -64,39 +64,39 @@
<para>Here is how it works </para>
<orderedlist>
- <listitem>A <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">Bridge</ulink>
+ <listitem>A <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">Bridge</ulink>
intercepts a test and determines the FQN of the test case and the test method from the call stack. It then delegates the execution to the same
(or another) test in and isolated test environment. An isolated test environment is one that does not have the same class loading space as
the test itself.</listitem>
- <listitem>A Bridge is associated with an <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ <listitem>A Bridge is associated with an <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
Invoker</ulink>. Invokers may be arbitarily complex. Local 'in proccess' invokers are possible just as well as remote invokers. </listitem>
- <listitem>The Invoker sends the <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
- Request</ulink> to a <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ <listitem>The Invoker sends the <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
+ Request</ulink> to a <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
Connector</ulink> in the isolated test environment.</listitem>
- <listitem>A Connector has associated <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ <listitem>A Connector has associated <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
PackageListeners</ulink> that are responsible for processing test cases for their respective test packages.</listitem>
- <listitem>A PackageListeners delegates the Request to a test <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
- Runner</ulink>, typicaly this would be a <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ <listitem>A PackageListeners delegates the Request to a test <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
+ Runner</ulink>, typicaly this would be a <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
JUnitRunner</ulink>.</listitem>
- <listitem>The Runner injects the <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
- Context</ulink> into the test case and returns a <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ <listitem>The Runner injects the <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
+ Context</ulink> into the test case and returns a <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
Response</ulink>, which the Connector returns to the Invoker.</listitem>
- <listitem>The Bridge finally translates potential <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ <listitem>The Bridge finally translates potential <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
Failures</ulink> that may be contained in the Result, to test failures on the client side.</listitem>
</orderedlist>
<para>The JBoss OSGi <emphasis role="bold">jboss-osgi-husky.jar</emphasis> bundle registers the Connectors.
- The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
JMXConnector</ulink> is always registered.
- The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">
+ The <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">
SocketConnector</ulink> is registered when the appropriate configuration options are set. It then registers the
- <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/hus...">HuskyExtender</ulink>,
+ <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/hus...">HuskyExtender</ulink>,
which is a <ulink url="http://www.osgi.org/javadoc/r4v41/org/osgi/framework/BundleListener.html">BundleListener</ulink> that inspects every
incomming bundle for the <emphasis role="bold">Test-Package</emphasis> manifest header. The Extender creates a PackageListener
for every package in the 'Test-Package' manifest header and registers them with the available Connectors.</para>
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch070-provided-bundles.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch070-provided-bundles.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch070-provided-bundles.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -9,7 +9,7 @@
<title>Blueprint Container Service</title>
<para>The JBoss OSGi <emphasis role="bold">jboss-osgi-blueprint.jar</emphasis> bundle provides
- an early access of a Blueprint extender service.</para>
+ together with <emphasis role="bold">org.apache.aries.blueprint.jar</emphasis> access to the Blueprint extender service.</para>
<para>The <ulink url="http://jbossosgi.blogspot.com/2009/04/osgi-blueprint-service-rfc-124.html">Blueprint Container</ulink>
service allows bundles to contain standard blueprint descriptors, which can be used for component wiring
@@ -20,8 +20,8 @@
<emphasis role="bold">Blueprint Reflection</emphasis> packages.</para>
<itemizedlist>
- <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/osgi/service/b...">org.osgi.service.blueprint.container</ulink></emphasis></listitem>
- <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/osgi/service/b...">org.osgi.service.blueprint.reflect</ulink></emphasis></listitem>
+ <listitem><emphasis role="bold"><ulink url="http://www.osgi.org/javadoc/r4v42/org/osgi/service/blueprint/container/pa...">org.osgi.service.blueprint.container</ulink></emphasis></listitem>
+ <listitem><emphasis role="bold"><ulink url="http://www.osgi.org/javadoc/r4v42/org/osgi/service/blueprint/reflect/pack...">org.osgi.service.blueprint.reflect</ulink></emphasis></listitem>
</itemizedlist>
</sect1>
@@ -48,7 +48,7 @@
<para>The service is registered with the Framework under the name</para>
<itemizedlist>
- <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/jax...">org.jboss.osgi.jaxb.JAXBService</ulink></emphasis></listitem>
+ <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/jax...">org.jboss.osgi.jaxb.JAXBService</ulink></emphasis></listitem>
</itemizedlist>
</sect1>
@@ -85,7 +85,7 @@
<itemizedlist>
<listitem><emphasis role="bold"><ulink url="http://java.sun.com/javase/6/docs/api/javax/management/MBeanServer.html">javax.management.MBeanServer</ulink></emphasis></listitem>
- <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.management.ManagedBundleService</ulink></emphasis></listitem>
+ <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.management.ManagedBundleService</ulink></emphasis></listitem>
<!-- https://jira.jboss.org/jira/browse/JBOSGI-125 -->
</itemizedlist>
@@ -153,11 +153,11 @@
<sect1 xml:id="SecBundleMicrocontainer">
<title>Microcontainer Service</title>
- <para>The JBoss OSGi <emphasis role="bold">jboss-osgi-microcontainer.jar</emphasis> bundle provides a service that give access to the <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> Kernel.
- The service is registered with the Framework under the name</para>
+ <para>The JBoss OSGi Microcontainer Service gives access to the <ulink url="http://www.jboss.org/jbossmc">JBoss Microcontainer</ulink> Kernel.
+ The service is registered with the Framework under the name.</para>
<itemizedlist>
- <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/mic...">org.jboss.osgi.microcontainer.MicrocontainerService</ulink></emphasis></listitem>
+ <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">org.jboss.osgi.spi.service.MicrocontainerService</ulink></emphasis></listitem>
</itemizedlist>
<para>Here is an example of how an OSGi component can access an arbitrary MC bean.</para>
@@ -176,6 +176,17 @@
</programlisting>
</sect1>
+ <sect1 xml:id="SecServiceLoader">
+ <title>ServiceLoader Interceptor</title>
+
+ <para>The ServiceLoader, deployed as <emphasis role="bold">jboss-osgi-serviceloader.jar</emphasis> bundle, is a
+ <link linkend="SecLifecycleInterceptors">Lifecycle Interceptor</link> that automatically registers services
+ declared in META-INF/services.</para>
+
+ <para>For more information, please hava a look at <ulink url="http://jbossosgi.blogspot.com/2010/01/suns-serviceloader-and-how-it-relat...">
+ ServiceLoader and how it relates to OSGi</ulink>.</para>
+ </sect1>
+
<sect1 xml:id="SecWebAppExtender">
<title>WebApp Extender</title>
@@ -226,7 +237,7 @@
<para>The service is registered with the Framework under the name</para>
<itemizedlist>
- <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/jbo...">org.jboss.osgi.jbossxb.UnmarshallerService</ulink></emphasis></listitem>
+ <listitem><emphasis role="bold"><ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/jbo...">org.jboss.osgi.jbossxb.UnmarshallerService</ulink></emphasis></listitem>
</itemizedlist>
</sect1>
Modified: projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch080-provided-examples.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch080-provided-examples.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/docbook/en/modules/ch080-provided-examples.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -265,7 +265,7 @@
<note>
<para>Please note that access to the MBeanServer from the test case is part of the
- <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">
+ <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">
OSGiRuntime</ulink> abstraction.</para>
</note>
@@ -311,7 +311,7 @@
<note>
<para>Please note that access to the InitialContext from the test case is part of the
- <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/apidocs/org/jboss/osgi/spi...">
+ <ulink url="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/apidocs/org/jboss/osgi/spi...">
OSGiRuntime</ulink> abstraction.</para>
</note>
@@ -557,6 +557,19 @@
</sect1>
+ <sect1 xml:id="SecServiceLoaderExample">
+ <title>ServiceLoader Example</title>
+
+ <para>The ServiceLoader example uses three bundles - <emphasis role="bold">example-serviceloader-api.jar, example-serviceloader-impl.jar, example-serviceloader-client.jar</emphasis>.
+ The implementation bundle contains a traditional service defined in META-INF/services. This service definition gets picked up by the ServiceLoader Interceptor and
+ is automatically registered with the OSGi Framework.
+ </para>
+
+ <para>For details and more background information, please hava a look at <ulink url="http://jbossosgi.blogspot.com/2010/01/suns-serviceloader-and-how-it-relat...">
+ ServiceLoader and how it relates to OSGi</ulink>.</para>
+
+ </sect1>
+
<sect1 xml:id="SecXMLParserServiceExample">
<title>XML Parser Service</title>
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ChangeLog.html
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ChangeLog.html 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ChangeLog.html 2010-02-08 17:15:46 UTC (rev 100710)
@@ -1,6 +1,49 @@
<html>
<body>
+<h1>JBossOSGi 1.0.0 Beta6</h1>
+<h2>Bug</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-210'>JBOSGI-210</a>] - Bundle installed but not started with hot deploy</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-283'>JBOSGI-283</a>] - WebApp extender not installed by default</li>
+</ul>
+
+<h2>Task</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-263'>JBOSGI-263</a>] - Integrate Aries Blueprint implementation</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-265'>JBOSGI-265</a>] - Update to jboss-osgi-framework-1.0.0.Alpha3</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-281'>JBOSGI-281</a>] - Release JBoss OSGi 1.0.0.Beta6</li>
+</ul>
+
+<h1>JBossOSGi Framework 1.0.0 Alpha3</h1>
+<h2>Bug</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-145'>JBOSGI-145</a>] - JAXB classes are loaded from the system classpath</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-204'>JBOSGI-204</a>] - Failure in Bundle.start() uninstalls the bundle</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-286'>JBOSGI-286</a>] - Investigate classloading of javax.* classes</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-287'>JBOSGI-287</a>] - Optional import loaded from system classloader</li>
+</ul>
+
+<h2>Feature Request</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-269'>JBOSGI-269</a>] - Add initial support for Bundle.update()</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-271'>JBOSGI-271</a>] - Initial support for R3 bundles</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-272'>JBOSGI-272</a>] - Implement bundle header localization</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-273'>JBOSGI-273</a>] - Differenciate R3/R4 bundle validation</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-274'>JBOSGI-274</a>] - Cache bundle header for default locale</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-275'>JBOSGI-275</a>] - Add support for Bundle.update() from original location</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-276'>JBOSGI-276</a>] - Add initial support for native code libraries</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-277'>JBOSGI-277</a>] - Add initial bundle fragment support</li>
+</ul>
+
+<h2>Task</h2>
+<ul>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-264'>JBOSGI-264</a>] - Update to jboss-kernel-2.2.x stable release</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-279'>JBOSGI-279</a>] - Update to jboss-cl-2.2.x stable release</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-284'>JBOSGI-284</a>] - Investigate version numbering scheme</li>
+</ul>
+
+
<h1>JBossOSGi 1.0.0 Beta5</h1>
<h2>Bug</h2>
<ul>
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ReleaseNotes.html
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ReleaseNotes.html 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/etc/ReleaseNotes.html 2010-02-08 17:15:46 UTC (rev 100710)
@@ -1,27 +1,27 @@
<body>
-<h2>Release Notes - JBossOSGi-1.0.0.Beta5</h2>
+<h2>Release Notes - JBossOSGi-1.0.0.Beta6</h2>
-<p>I am happy to announce the release of JBossOSGi-1.0.0.Beta5.</p>
+<p>I am happy to announce the release of JBossOSGi-1.0.0.Beta6.</p>
<p/>
-<p>You can download the binary here: <a href="http://sourceforge.net/projects/jboss/files/JBossOSGi/1.0.0.Beta5/jboss-o...">jboss-osgi-installer-1.0.0.Beta5.jar</a></p>
+<p>You can download the binary here: <a href="http://sourceforge.net/projects/jboss/files/JBossOSGi/1.0.0.Beta6/jboss-o...">jboss-osgi-installer-1.0.0.Beta6.jar</a></p>
<p/>
<p>The release comes with improvements in the following areas</p>
<p/>
<ul>
-<li>Improved JBoss Microcontainer based <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/userguide/html/ChapFramewo...">Framework</a> support.</li>
-<li>Improved Eclipse <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/userguide/html/ChapFramewo...">Equinox Integration</a> support.</li>
-<li>Added Enterprise OSGi <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/userguide/html/ChapProvide...">Transaction</a> support.</li>
-<li>Added Compendium <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/userguide/html/ChapProvide...">Event Admin</a> support.</li>
-<li>Added JBossXB based <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/userguide/html/ChapProvide...">XML Binding</a> support.</li>
-<li>Added <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/userguide/html/ChapDevelop...">Lifecycle Interceptor</a> support.</li>
+<li>Initial support for fragments.</li>
+<li>Initial support for Bundle.update().</li>
+<li>Initial support for native code libraries.</li>
+<li>Support for R3 bundles.</li>
+<li>Support for bundle header localization.</li>
+<li>Improved Blueprint support, using Apache Aries Blueprint.</li>
</ul>
<p/>
-<p>For details please have a look at the latest version of our <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta5/userguide/html/">User Guide</a>.</p>
+<p>For details please have a look at the latest version of our <a href="http://jbmuc.dyndns.org/jboss-osgi-1.0.0.Beta6/userguide/html/">User Guide</a>.</p>
<p/>
<p>Here are the change log details</p>
@@ -29,49 +29,34 @@
<h2>Bug</h2>
<ul>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-129'>JBOSGI-129</a>] - Filter behaviour change in r4v42</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-137'>JBOSGI-137</a>] - Cannot parse Bundle-SymbolicName</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-153'>JBOSGI-153</a>] - Cannot parse Import-Package parameters</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-187'>JBOSGI-187</a>] - Husky SocketInvocation may block forever</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-199'>JBOSGI-199</a>] - Use thread safe collections where information is mutable</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-212'>JBOSGI-212</a>] - Cannot refresh Microcontainer service</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-210'>JBOSGI-210</a>] - Bundle installed but not started with hot deploy</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-283'>JBOSGI-283</a>] - WebApp extender not installed by default</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-145'>JBOSGI-145</a>] - JAXB classes are loaded from the system classpath</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-204'>JBOSGI-204</a>] - Failure in Bundle.start() uninstalls the bundle</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-286'>JBOSGI-286</a>] - Investigate classloading of javax.* classes</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-287'>JBOSGI-287</a>] - Optional import loaded from system classloader</li>
</ul>
-
+
<h2>Feature Request</h2>
<ul>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-125'>JBOSGI-125</a>] - Add ManagedFramework service</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-202'>JBOSGI-202</a>] - Allow override of where the bootstrap file comes from</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-269'>JBOSGI-269</a>] - Add initial support for Bundle.update()</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-271'>JBOSGI-271</a>] - Initial support for R3 bundles</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-272'>JBOSGI-272</a>] - Implement bundle header localization</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-273'>JBOSGI-273</a>] - Differenciate R3/R4 bundle validation</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-274'>JBOSGI-274</a>] - Cache bundle header for default locale</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-275'>JBOSGI-275</a>] - Add support for Bundle.update() from original location</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-276'>JBOSGI-276</a>] - Add initial support for native code libraries</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-277'>JBOSGI-277</a>] - Add initial bundle fragment support</li>
</ul>
-
+
<h2>Task</h2>
<ul>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-157'>JBOSGI-157</a>] - JTA (RFC-98) - Initial Implementation</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-181'>JBOSGI-181</a>] - Add EventAdmin as available service</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-182'>JBOSGI-182</a>] - Release JBoss OSGi 1.0.0.Beta5</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-183'>JBOSGI-183</a>] - Introduce notion of OSGi Interceptors</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-188'>JBOSGI-188</a>] - Separate DeployerService from SPI</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-190'>JBOSGI-190</a>] - Allign getting started guide with latest release</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-200'>JBOSGI-200</a>] - Split getParameter(s) calls into getDirective(s) and getAttribute(s)</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-215'>JBOSGI-215</a>] - Update Blueprint to 1.0.0.Alpha3</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-216'>JBOSGI-216</a>] - Update to Apache Felix-2.0.2</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-217'>JBOSGI-217</a>] - Update to Eclipse Equinox-3.5.1</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-218'>JBOSGI-218</a>] - Update to jboss-osgi-common-1.0.3</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-219'>JBOSGI-219</a>] - Update to jboss-osgi-husky-1.0.2</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-220'>JBOSGI-220</a>] - Update to jboss-osgi-jmx-1.0.2</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-221'>JBOSGI-221</a>] - Update to jboss-osgi-jndi-1.0.2</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-222'>JBOSGI-222</a>] - Update to jboss-osgi-microcontainer-2.0.9</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-223'>JBOSGI-223</a>] - Update to jboss-osgi-spi-1.0.3</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-224'>JBOSGI-224</a>] - Update to jboss-osgi-xml-binding-2.0.2.Beta3</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-225'>JBOSGI-225</a>] - Update to jboss-osgi-apache-xerces-2.9.1.SP3</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-226'>JBOSGI-226</a>] - Update to jboss-osgi-hotdeploy-1.0.3</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-227'>JBOSGI-227</a>] - Update to jboss-osgi-framework-1.0.0.Alpha2</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-228'>JBOSGI-228</a>] - Update to jboss-osgi-jaxb-2.1.10.SP3</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-229'>JBOSGI-229</a>] - Add jboss-osgi-deployment-1.0.0</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-230'>JBOSGI-230</a>] - Add jboss-osgi-jta-1.0.0</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-231'>JBOSGI-231</a>] - Add jboss-osgi-reflect-2.0.2</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-232'>JBOSGI-232</a>] - Add jboss-osgi-webapp-0.7.2</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-233'>JBOSGI-233</a>] - Update to org.apache.felix.configadmin-1.2.4</li>
-<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-234'>JBOSGI-234</a>] - Add org.apache.felix.eventadmin-1.0.0</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-263'>JBOSGI-263</a>] - Integrate Aries Blueprint implementation</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-265'>JBOSGI-265</a>] - Update to jboss-osgi-framework-1.0.0.Alpha3</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-281'>JBOSGI-281</a>] - Release JBoss OSGi 1.0.0.Beta6</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-264'>JBOSGI-264</a>] - Update to jboss-kernel-2.2.x stable release</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-279'>JBOSGI-279</a>] - Update to jboss-cl-2.2.x stable release</li>
+<li>[<a href='https://jira.jboss.org/jira/browse/JBOSGI-284'>JBOSGI-284</a>] - Investigate version numbering scheme</li>
</ul>
<p/>
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -150,6 +150,7 @@
<include name="jboss-osgi-runtime-equinox-sources.jar" />
<include name="jboss-osgi-runtime-felix-sources.jar" />
<include name="jboss-osgi-runtime-jbossas-sources.jar" />
+ <include name="jboss-osgi-serviceloader-sources.jar" />
<include name="jboss-osgi-spi-sources.jar" />
<include name="jboss-osgi-webapp-sources.jar" />
<include name="jboss-osgi-webconsole-sources.jar" />
@@ -246,6 +247,7 @@
<include name="jboss-osgi-jaxb.jar" />
<include name="jboss-osgi-jta.jar" />
<include name="jboss-osgi-reflect.jar" />
+ <include name="jboss-osgi-serviceloader.jar" />
<include name="jboss-osgi-xml-binding.jar" />
<include name="org.apache.aries.blueprint.jar" />
<include name="org.apache.aries.util.jar" />
@@ -385,6 +387,11 @@
<include name="war-deployers-jboss-beans.xml" />
</fileset>
+ <fileset condition="isJBoss601" dir="@{deploy.artifacts.dir}/resources/jbossas/jboss600"
+ targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy" override="true">
+ <include name="jboss-logging.xml" />
+ </fileset>
+
<!-- deployers/osgi.deployer -->
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer" override="true">
<include name="jboss-osgi-deployers.jar" />
@@ -405,6 +412,7 @@
<include name="jboss-osgi-jndi.jar" />
<include name="jboss-osgi-webconsole.jar" />
<include name="jboss-osgi-reflect.jar" />
+ <include name="jboss-osgi-serviceloader.jar" />
<include name="jboss-osgi-xml-binding.jar" />
<include name="org.apache.aries.blueprint.jar" />
<include name="org.apache.aries.util.jar" />
Copied: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600 (from rev 100701, projects/jboss-osgi/branches/1.0.0.Beta6/distribution/installer/src/main/resources/jbossas/jboss600)
Deleted: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml
===================================================================
--- projects/jboss-osgi/branches/1.0.0.Beta6/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml 2010-02-08 14:58:38 UTC (rev 100701)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!-- -->
-<!-- Logging System Configuration -->
-<!-- -->
-<!-- ===================================================================== -->
-
-<logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0">
-
- <!-- ================================= -->
- <!-- Preserve messages in a local file -->
- <!-- ================================= -->
-
- <!-- A time/date based rolling handler -->
-
- <periodic-rotating-file-handler
- file-name="${jboss.server.log.dir}/server.log"
- name="FILE"
- autoflush="true"
- append="false"
- suffix=".yyyy-MM-dd"> <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->
-
- <error-manager>
- <only-once/>
- </error-manager>
-
- <formatter>
- <!-- Uncomment this to get the class name in the log as well as the category
- <pattern-formatter pattern="%d %-5p [%c] %C{1} (%t) %m%n"/>
- -->
- <!-- Uncomment this to log without the class name in the log -->
- <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
- </formatter>
- </periodic-rotating-file-handler>
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <console-handler name="CONSOLE" autoflush="true" target="System.out">
- <error-manager>
- <only-once/>
- </error-manager>
-
- <level name="INFO"/>
-
- <formatter>
- <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %m%n"/>
- </formatter>
- </console-handler>
-
- <!-- =============================================== -->
- <!-- Limit categories -->
- <!-- if enabling "trace" at root logger level, -->
- <!-- use limit category settings to disable trace -->
- <!-- for packages that you don't want to trace -->
- <!-- =============================================== -->
-
- <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
- <logger category="org.jboss.osgi">
- <level name="TRACE"/>
- </logger>
-
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root-logger>
- <!-- Set the root logger priority via a system property, with a default value. -->
- <level name="${jboss.server.log.threshold:INFO}"/>
- <handlers>
- <handler-ref name="CONSOLE"/>
- <handler-ref name="FILE"/>
- </handlers>
- </root-logger>
-
-</logging>
Copied: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml (from rev 100701, projects/jboss-osgi/branches/1.0.0.Beta6/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml)
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml (rev 0)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss600/jboss-logging.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Logging System Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling handler -->
+
+ <periodic-rotating-file-handler
+ file-name="${jboss.server.log.dir}/server.log"
+ name="FILE"
+ autoflush="true"
+ append="false"
+ suffix=".yyyy-MM-dd"> <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->
+
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <formatter>
+ <!-- Uncomment this to get the class name in the log as well as the category
+ <pattern-formatter pattern="%d %-5p [%c] %C{1} (%t) %m%n"/>
+ -->
+ <!-- Uncomment this to log without the class name in the log -->
+ <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
+ </formatter>
+ </periodic-rotating-file-handler>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <console-handler name="CONSOLE" autoflush="true" target="System.out">
+ <error-manager>
+ <only-once/>
+ </error-manager>
+
+ <level name="INFO"/>
+
+ <formatter>
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %m%n"/>
+ </formatter>
+ </console-handler>
+
+ <!-- =============================================== -->
+ <!-- Limit categories -->
+ <!-- if enabling "trace" at root logger level, -->
+ <!-- use limit category settings to disable trace -->
+ <!-- for packages that you don't want to trace -->
+ <!-- =============================================== -->
+
+ <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+ <logger category="org.jboss.osgi">
+ <level name="TRACE"/>
+ </logger>
+
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root-logger>
+ <!-- Set the root logger priority via a system property, with a default value. -->
+ <level name="${jboss.server.log.threshold:INFO}"/>
+ <handlers>
+ <handler-ref name="CONSOLE"/>
+ <handler-ref name="FILE"/>
+ </handlers>
+ </root-logger>
+
+</logging>
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -231,10 +231,6 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
- <artifactId>jboss-osgi-webapp</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-reflect</artifactId>
</dependency>
<dependency>
@@ -246,7 +242,27 @@
<!-- jboss-osgi-reflect: no javadoc -->
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-serviceloader</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-serviceloader</artifactId>
+ <version>${version.jboss.osgi.serviceloader}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-serviceloader</artifactId>
+ <version>${version.jboss.osgi.serviceloader}</version>
+ <classifier>javadoc</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-webapp</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-webapp</artifactId>
<version>${version.jboss.osgi.webapp}</version>
<classifier>sources</classifier>
</dependency>
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/pom.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -54,27 +54,27 @@
<version.izpack>4.3.1</version.izpack>
<version.javax.servlet>2.5</version.javax.servlet>
<version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
- <version.jboss.osgi.blueprint>1.0.0.Beta1-SNAPSHOT</version.jboss.osgi.blueprint>
+ <version.jboss.osgi.blueprint>1.0.0.Beta1</version.jboss.osgi.blueprint>
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
- <version.jboss.osgi.deployment>1.0.1-SNAPSHOT</version.jboss.osgi.deployment>
- <version.jboss.osgi.framework>1.0.0.Alpha4-SNAPSHOT</version.jboss.osgi.framework>
- <version.jboss.osgi.hotdeploy>1.0.4-SNAPSHOT</version.jboss.osgi.hotdeploy>
- <version.jboss.osgi.husky>1.0.3-SNAPSHOT</version.jboss.osgi.husky>
+ <version.jboss.osgi.deployment>1.0.1</version.jboss.osgi.deployment>
+ <version.jboss.osgi.framework>1.0.0.Alpha3</version.jboss.osgi.framework>
+ <version.jboss.osgi.hotdeploy>1.0.4</version.jboss.osgi.hotdeploy>
+ <version.jboss.osgi.husky>1.0.3</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
- <version.jboss.osgi.jmx>1.0.3-SNAPSHOT</version.jboss.osgi.jmx>
+ <version.jboss.osgi.jmx>1.0.3</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.2</version.jboss.osgi.jndi>
<version.jboss.osgi.jta>1.0.0</version.jboss.osgi.jta>
- <version.jboss.osgi.reflect>2.2.0-SNAPSHOT</version.jboss.osgi.reflect>
- <version.jboss.osgi.runtime.deployers>1.0.4-SNAPSHOT</version.jboss.osgi.runtime.deployers>
+ <version.jboss.osgi.reflect>2.2.0</version.jboss.osgi.reflect>
+ <version.jboss.osgi.runtime.deployers>1.0.4</version.jboss.osgi.runtime.deployers>
<version.jboss.osgi.runtime.equinox>3.5.1</version.jboss.osgi.runtime.equinox>
<version.jboss.osgi.runtime.felix>2.0.2</version.jboss.osgi.runtime.felix>
<version.jboss.osgi.runtime.jbossas>1.0.2</version.jboss.osgi.runtime.jbossas>
- <version.jboss.osgi.serviceloader>1.0.0-SNAPSHOT</version.jboss.osgi.serviceloader>
- <version.jboss.osgi.spi>1.0.4-SNAPSHOT</version.jboss.osgi.spi>
- <version.jboss.osgi.webapp>0.7.2.SP1-SNAPSHOT</version.jboss.osgi.webapp>
+ <version.jboss.osgi.serviceloader>1.0.0</version.jboss.osgi.serviceloader>
+ <version.jboss.osgi.spi>1.0.4</version.jboss.osgi.spi>
+ <version.jboss.osgi.webapp>0.7.2.SP1</version.jboss.osgi.webapp>
<version.jboss.osgi.webconsole>1.0.2</version.jboss.osgi.webconsole>
- <version.jboss.osgi.xml.binding>2.0.2.Beta4-SNAPSHOT</version.jboss.osgi.xml.binding>
+ <version.jboss.osgi.xml.binding>2.0.2.Beta4</version.jboss.osgi.xml.binding>
<version.ops4j.pax.web>0.7.2</version.ops4j.pax.web>
<version.osgi>4.2.0</version.osgi>
Property changes on: projects/jboss-osgi/trunk/reactor
___________________________________________________________________
Name: svn:externals
- ../../projects/runtime/framework/trunk framework
Modified: projects/jboss-osgi/trunk/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/pom.xml 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/reactor/pom.xml 2010-02-08 17:15:46 UTC (rev 100710)
@@ -46,7 +46,6 @@
<!--
Name: framework-jbossmc
Descr: Build the JBossMC Framework
- -->
<profile>
<id>framework-jbossmc</id>
<activation>
@@ -70,6 +69,7 @@
<module>framework</module>
</modules>
</profile>
+ -->
<!--
Name: jbossmc-javadoc
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -87,7 +87,7 @@
}
@Test
- public void testBlueprintBundleInstall() throws Exception
+ public void testBlueprintContainerAvailable() throws Exception
{
if (context == null)
BridgeFactory.getBridge().run();
@@ -96,16 +96,7 @@
Bundle bundle = context.getBundle();
assertEquals("example-blueprint", bundle.getSymbolicName());
- }
-
- @Test
- public void testBlueprintContainerAvailable() throws Exception
- {
- if (context == null)
- BridgeFactory.getBridge().run();
- assumeNotNull(context);
-
BlueprintContainer bpContainer = getBlueprintContainer();
assertNotNull("BlueprintContainer available", bpContainer);
}
@@ -145,12 +136,16 @@
private BlueprintContainer getBlueprintContainer() throws Exception
{
// 10sec for processing of STARTING event
- int timeout = 50;
+ int timeout = 10000;
ServiceReference sref = null;
- while (sref == null && 0 < timeout--)
+ while (sref == null && 0 < (timeout -= 200))
{
- sref = context.getServiceReference(BlueprintContainer.class.getName());
+ String filter = "(osgi.blueprint.container.symbolicname=example-blueprint)";
+ ServiceReference[] srefs = context.getServiceReferences(BlueprintContainer.class.getName(), filter);
+ if (srefs != null && srefs.length > 0)
+ sref = srefs[0];
+
Thread.sleep(200);
}
assertNotNull("BlueprintContainer not null", sref);
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/serviceloader/ServiceLoaderTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/serviceloader/ServiceLoaderTestCase.java 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/serviceloader/ServiceLoaderTestCase.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -25,6 +25,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import org.jboss.osgi.serviceloader.ServiceLoaderCapability;
@@ -34,6 +35,7 @@
import org.jboss.osgi.testing.OSGiServiceReference;
import org.jboss.osgi.testing.OSGiTest;
import org.jboss.test.osgi.example.serviceloader.service.AccountService;
+import org.jboss.test.osgi.example.serviceloader.service.internal.AccountServiceImpl;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -77,7 +79,7 @@
try
{
// Install the API bundle
- runtime.installBundle("example-serviceloader-api.jar");
+ OSGiBundle apiBundle = runtime.installBundle("example-serviceloader-api.jar");
// Install/Start the client bundle
OSGiBundle implBundle = runtime.installBundle("example-serviceloader-impl.jar");
@@ -93,6 +95,26 @@
assertBundleState(Bundle.ACTIVE, implBundle.getState());
assertBundleState(Bundle.ACTIVE, clientBundle.getState());
+
+ OSGiBundle apiProvider = clientBundle.loadClass(AccountService.class.getName());
+ assertEquals(apiBundle, apiProvider);
+
+ try
+ {
+ // The client cannot access the implementation class directly
+ clientBundle.loadClass(AccountServiceImpl.class.getName());
+ fail("ClassNotFoundException expected");
+ }
+ catch (ClassNotFoundException ex)
+ {
+ // expected
+ }
+
+ // Stopping the implementation bundle should unregister the service
+ implBundle.stop();
+
+ OSGiServiceReference sref = runtime.getServiceReference(AccountService.class.getName());
+ assertNull("AccountService not available", sref);
}
finally
{
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/AbstractWebAppTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/AbstractWebAppTestCase.java 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/AbstractWebAppTestCase.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -46,11 +46,10 @@
protected String getHttpResponse(String reqPath, int timeout) throws Exception
{
int fraction = 200;
- int steps = Math.max(timeout / fraction, 1);
String line = null;
IOException lastException = null;
- while (line == null && 0 < steps--)
+ while (line == null && 0 < (timeout -= fraction))
{
try
{
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-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/webapp/WebAppExtenderTestCase.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -47,7 +47,7 @@
private static OSGiRuntime runtime;
@BeforeClass
- public static void setUpClass() throws Exception
+ public static void beforeClass() throws Exception
{
OSGiTestHelper osgiTestHelper = new OSGiTestHelper();
@@ -61,7 +61,7 @@
}
@AfterClass
- public static void tearDownClass() throws Exception
+ public static void afterClass() throws Exception
{
runtime.shutdown();
runtime = null;
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms (from rev 100701, projects/jboss-osgi/branches/1.0.0.Beta6/testsuite/functional/src/test/java/javax/jms)
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/JMSException.java
===================================================================
--- projects/jboss-osgi/branches/1.0.0.Beta6/testsuite/functional/src/test/java/javax/jms/JMSException.java 2010-02-08 14:58:38 UTC (rev 100701)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/JMSException.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -1,105 +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 javax.jms;
-
-/**
- * <P>This is the root class of all JMS API exceptions.
- *
- * <P>It provides the following information:
- * <UL>
- * <LI> A provider-specific string describing the error. This string is
- * the standard exception message and is available via the
- * <CODE>getMessage</CODE> method.
- * <LI> A provider-specific string error code
- * <LI> A reference to another exception. Often a JMS API exception will
- * be the result of a lower-level problem. If appropriate, this
- * lower-level exception can be linked to the JMS API exception.
- * </UL>
- **/
-
-public class JMSException extends Exception
-{
- private static final long serialVersionUID = 8951994251593378324L;
-
- /** Vendor-specific error code.
- **/
- private String errorCode;
-
- /** <CODE>Exception</CODE> reference.
- **/
- private Exception linkedException;
-
- /** Constructs a <CODE>JMSException</CODE> with the specified reason and
- * error code.
- *
- * @param reason a description of the exception
- * @param errorCode a string specifying the vendor-specific
- * error code
- **/
- public JMSException(String reason, String errorCode)
- {
- super(reason);
- this.errorCode = errorCode;
- linkedException = null;
- }
-
- /** Constructs a <CODE>JMSException</CODE> with the specified reason and with
- * the error code defaulting to null.
- *
- * @param reason a description of the exception
- **/
- public JMSException(String reason)
- {
- super(reason);
- this.errorCode = null;
- linkedException = null;
- }
-
- /** Gets the vendor-specific error code.
- * @return a string specifying the vendor-specific
- * error code
- **/
- public String getErrorCode()
- {
- return this.errorCode;
- }
-
- /**
- * Gets the exception linked to this one.
- *
- * @return the linked <CODE>Exception</CODE>, null if none
- **/
- public Exception getLinkedException()
- {
- return (linkedException);
- }
-
- /**
- * Adds a linked <CODE>Exception</CODE>.
- *
- * @param ex the linked <CODE>Exception</CODE>
- **/
- public synchronized void setLinkedException(Exception ex)
- {
- linkedException = ex;
- }
-}
Copied: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/JMSException.java (from rev 100701, projects/jboss-osgi/branches/1.0.0.Beta6/testsuite/functional/src/test/java/javax/jms/JMSException.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/JMSException.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/jms/JMSException.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -0,0 +1,105 @@
+/*
+ * 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 javax.jms;
+
+/**
+ * <P>This is the root class of all JMS API exceptions.
+ *
+ * <P>It provides the following information:
+ * <UL>
+ * <LI> A provider-specific string describing the error. This string is
+ * the standard exception message and is available via the
+ * <CODE>getMessage</CODE> method.
+ * <LI> A provider-specific string error code
+ * <LI> A reference to another exception. Often a JMS API exception will
+ * be the result of a lower-level problem. If appropriate, this
+ * lower-level exception can be linked to the JMS API exception.
+ * </UL>
+ **/
+
+public class JMSException extends Exception
+{
+ private static final long serialVersionUID = 8951994251593378324L;
+
+ /** Vendor-specific error code.
+ **/
+ private String errorCode;
+
+ /** <CODE>Exception</CODE> reference.
+ **/
+ private Exception linkedException;
+
+ /** Constructs a <CODE>JMSException</CODE> with the specified reason and
+ * error code.
+ *
+ * @param reason a description of the exception
+ * @param errorCode a string specifying the vendor-specific
+ * error code
+ **/
+ public JMSException(String reason, String errorCode)
+ {
+ super(reason);
+ this.errorCode = errorCode;
+ linkedException = null;
+ }
+
+ /** Constructs a <CODE>JMSException</CODE> with the specified reason and with
+ * the error code defaulting to null.
+ *
+ * @param reason a description of the exception
+ **/
+ public JMSException(String reason)
+ {
+ super(reason);
+ this.errorCode = null;
+ linkedException = null;
+ }
+
+ /** Gets the vendor-specific error code.
+ * @return a string specifying the vendor-specific
+ * error code
+ **/
+ public String getErrorCode()
+ {
+ return this.errorCode;
+ }
+
+ /**
+ * Gets the exception linked to this one.
+ *
+ * @return the linked <CODE>Exception</CODE>, null if none
+ **/
+ public Exception getLinkedException()
+ {
+ return (linkedException);
+ }
+
+ /**
+ * Adds a linked <CODE>Exception</CODE>.
+ *
+ * @param ex the linked <CODE>Exception</CODE>
+ **/
+ public synchronized void setLinkedException(Exception ex)
+ {
+ linkedException = ex;
+ }
+}
Deleted: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/xml/ws/WebServiceException.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/xml/ws/WebServiceException.java 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/javax/xml/ws/WebServiceException.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -1,64 +0,0 @@
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
-package javax.xml.ws;
-
-/** The <code>WebServiceException</code> class is the base
- * exception class for all JAX-WS API runtime exceptions.
- *
- * @since JAX-WS 2.0
-**/
-
-@SuppressWarnings("serial")
-public class WebServiceException extends java.lang.RuntimeException
-{
-
- /** Constructs a new exception with <code>null</code> as its
- * detail message. The cause is not initialized.
- **/
- public WebServiceException()
- {
- super();
- }
-
- /** Constructs a new exception with the specified detail
- * message. The cause is not initialized.
- * @param message The detail message which is later
- * retrieved using the getMessage method
- **/
- public WebServiceException(String message)
- {
- super(message);
- }
-
- /** Constructs a new exception with the specified detail
- * message and cause.
- *
- * @param message The detail message which is later retrieved
- * using the getMessage method
- * @param cause The cause which is saved for the later
- * retrieval throw by the getCause method
- **/
- public WebServiceException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- /** Constructs a new WebServiceException with the specified cause
- * and a detail message of <tt>(cause==null ? null :
- * cause.toString())</tt> (which typically contains the
- * class and detail message of <tt>cause</tt>).
- *
- * @param cause The cause which is saved for the later
- * retrieval throw by the getCause method.
- * (A <tt>null</tt> value is permitted, and
- * indicates that the cause is nonexistent or
- * unknown.)
- **/
- public WebServiceException(Throwable cause)
- {
- super(cause);
- }
-}
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi287/OSGi287TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi287/OSGi287TestCase.java 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi287/OSGi287TestCase.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -112,7 +112,7 @@
{
if ("jbossmc".equals(getFrameworkName()))
{
- System.out.println("FIXME [JBOSGI-287] Optional import loaded from system classloader");
+ System.out.println("FIXME [JBOSGI-151] Cannot resolve circular dependencies");
return;
}
@@ -147,7 +147,7 @@
}
@Test
- public void testServletAPI() throws Exception
+ public void testMessagingAPI() throws Exception
{
OSGiRuntime runtime = getDefaultRuntime();
try
@@ -157,14 +157,14 @@
// Import-Package: javax.xml.ws
OSGiBundle bundleA = runtime.installBundle("jbosgi287-bundleC.jar");
- OSGiBundle exporterA = bundleA.loadClass("javax.xml.ws.WebServiceException");
+ OSGiBundle exporterA = bundleA.loadClass("javax.jms.JMSException");
assertEquals(Bundle.RESOLVED, bundleA.getState());
assertEquals(bundleA, exporterA);
// Try to load a class that is not part of the bundle
try
{
- bundleA.loadClass("javax.xml.ws.WebServiceContext");
+ bundleA.loadClass("javax.jms.MessageProducer");
fail("ClassNotFoundException expected");
}
catch (ClassNotFoundException ex)
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi92/OSGi92TestCase.java 2010-02-08 17:15:46 UTC (rev 100710)
@@ -28,6 +28,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.SAXParserFactory;
+import org.jboss.osgi.spi.capability.CompendiumCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiServiceReference;
@@ -35,7 +36,6 @@
import org.jboss.osgi.testing.OSGiTestHelper;
import org.junit.AfterClass;
import org.junit.BeforeClass;
-import org.junit.Ignore;
import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
@@ -53,9 +53,10 @@
private static OSGiRuntime runtime;
@BeforeClass
- public static void beforeClass() throws BundleException
+ public static void beforeClass() throws Exception
{
runtime = new OSGiTestHelper().getDefaultRuntime();
+ runtime.addCapability(new CompendiumCapability());
}
@AfterClass
@@ -69,7 +70,6 @@
}
@Test
- @Ignore("Fails with apache felix compendium-1.2.0")
public void testDeployParsers() throws Exception
{
OSGiBundle bundleA = runtime.installBundle("jbosgi92-bundleA.jar");
@@ -79,9 +79,9 @@
String filter = "(parser.factoryname=org.jboss.test.osgi.jbosgi92.bundleA.*)";
OSGiServiceReference[] domRefs = runtime.getServiceReferences(DocumentBuilderFactory.class.getName(), filter);
- assertEquals("DocumentBuilderFactory servce available", 1, domRefs.length);
+ assertEquals("DocumentBuilderFactory service available", 1, domRefs.length);
OSGiServiceReference[] saxRefs = runtime.getServiceReferences(SAXParserFactory.class.getName(), filter);
- assertEquals("SAXParserFactory servce available", 1, saxRefs.length);
+ assertEquals("SAXParserFactory service available", 1, saxRefs.length);
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi287/jbosgi287-bundleC.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi287/jbosgi287-bundleC.bnd 2010-02-08 16:54:11 UTC (rev 100709)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/jbosgi287/jbosgi287-bundleC.bnd 2010-02-08 17:15:46 UTC (rev 100710)
@@ -1,6 +1,6 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi287-bundleB.jar src/test/resources/jbosgi287/jbosgi287-bundle.bnd
Bundle-SymbolicName: jbosgi287-bundleC
-Export-Package: javax.xml.ws
-Import-Package: javax.xml.ws
+Export-Package: javax.jms
+Import-Package: javax.jms
14 years, 4 months