[jboss-cvs] JBossAS SVN: r99146 - in projects/jboss-osgi/projects/runtime/framework/trunk/src: test/java/org/jboss/test/osgi/service and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 8 02:35:08 EST 2010
Author: thomas.diesler at jboss.com
Date: 2010-01-08 02:35:07 -0500 (Fri, 08 Jan 2010)
New Revision: 99146
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml
Removed:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans2/
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.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/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF
Log:
Rollback broken build -r99123:99115
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java 2010-01-08 07:29:22 UTC (rev 99145)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/FilterParserAndMatcher.java 2010-01-08 07:35:07 UTC (rev 99146)
@@ -1,90 +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 java.util.Dictionary;
-import java.util.Set;
-
-import org.jboss.beans.metadata.api.model.QualifierContent;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.kernel.spi.qualifier.QualifierMatcher;
-import org.jboss.kernel.spi.qualifier.QualifierParser;
-import org.jboss.metadata.spi.MetaData;
-import org.jboss.metadata.spi.scope.CommonLevels;
-import org.osgi.framework.Filter;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.InvalidSyntaxException;
-
-/**
- * OSGi filter parsing and matching.
- *
- * @author <a href="ales.justin at jboss.org">Ales Justin</a>
- */
-class FilterParserAndMatcher implements QualifierParser, QualifierMatcher<Filter>
-{
- static final FilterParserAndMatcher INSTANCE = new FilterParserAndMatcher();
-
- private FilterParserAndMatcher()
- {
- }
-
- public Class<Filter> getHandledType()
- {
- return Filter.class;
- }
-
- public QualifierContent getHandledContent()
- {
- return QualifierContent.getContent("filter");
- }
-
- public boolean matches(ControllerContext context, Set<Object> suppliedQualifiers, Filter filter)
- {
- MetaData metaData = context.getScopeInfo().getMetaData();
- if (metaData == null)
- return false;
-
- MetaData instanceMD = metaData.getScopeMetaData(CommonLevels.INSTANCE);
- if (instanceMD == null)
- return false;
-
- Dictionary dictionary = instanceMD.getMetaData(Dictionary.class);
- return dictionary != null && filter.match(dictionary);
- }
-
- public Object parseWanted(ClassLoader cl, Object rawQualifier)
- {
- try
- {
- return FrameworkUtil.createFilter(String.valueOf(rawQualifier));
- }
- catch (InvalidSyntaxException e)
- {
- throw new IllegalArgumentException(e);
- }
- }
-
- public Object parseSupplied(ClassLoader cl, Object rawQualifier)
- {
- return parseWanted(cl, rawQualifier);
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-01-08 07:29:22 UTC (rev 99145)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-01-08 07:35:07 UTC (rev 99146)
@@ -46,8 +46,8 @@
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.jar.Attributes;
-import java.util.jar.Attributes.Name;
import java.util.jar.Manifest;
+import java.util.jar.Attributes.Name;
import org.jboss.dependency.spi.Controller;
import org.jboss.dependency.spi.ControllerContext;
@@ -68,7 +68,6 @@
import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.kernel.spi.qualifier.QualifierMatchers;
import org.jboss.logging.Logger;
import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
import org.jboss.metadata.spi.loader.MutableMetaDataLoader;
@@ -280,15 +279,8 @@
}
}
- // osgi ldap filter parsing and matching
- FilterParserAndMatcher fpm = FilterParserAndMatcher.INSTANCE;
- QualifierMatchers matchers = QualifierMatchers.getInstance();
-
if (register)
{
- matchers.addParser(fpm);
- matchers.addMatcher(fpm);
-
MetaDataRetrievalFactory mdrFactory = factory;
if (mdrFactory == null)
{
@@ -304,9 +296,6 @@
else
{
repository.removeMetaDataRetrievalFactory(CommonLevels.INSTANCE);
-
- matchers.removeParser(fpm.getHandledContent());
- matchers.removeMatcher(fpm.getHandledType());
}
}
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-01-08 07:29:22 UTC (rev 99145)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2010-01-08 07:35:07 UTC (rev 99146)
@@ -460,47 +460,6 @@
}
}
- public void testServiceInjection() throws Throwable
- {
- Bundle bundle = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle2", A.class));
- try
- {
- bundle.start();
- BundleContext bundleContext1 = bundle.getBundleContext();
- assertNotNull(bundleContext1);
-
- Class<?> aClass = bundle.loadClass(A.class.getName());
- Object a = aClass.newInstance();
- Hashtable<String, Object> table = new Hashtable<String, Object>();
- table.put("a", "b");
- ServiceRegistration reg1 = bundleContext1.registerService(A.class.getName(), a, table);
- assertNotNull(reg1);
-
- AssembledDirectory mix = createAssembledDirectory("beans1", "");
- addPath(mix, "/bundles/service/service-beans2", "");
- addPackage(mix, C.class);
- Deployment deployment = assertDeploy(mix);
- try
- {
- checkComplete();
-
- Bundle beans = getBundle(getDeploymentUnit(deployment));
- beans.start();
-
- Object c = getBean("C");
- assertEquals(a, getter(c, "getA", "C"));
- }
- finally
- {
- undeploy(deployment);
- }
- }
- finally
- {
- uninstall(bundle);
- }
- }
-
public void testFiltering() throws Throwable
{
Deployment bean = addBean("beanA", A.class);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF 2010-01-08 07:29:22 UTC (rev 99145)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF 2010-01-08 07:35:07 UTC (rev 99146)
@@ -2,6 +2,6 @@
Implementation-Title: JBoss OSGi tests
Implementation-Version: test
Implementation-Vendor: jboss.org
-Bundle-Name: Beans1
-Bundle-SymbolicName: org.jboss.test.osgi.beans1
+Bundle-Name: Service1
+Bundle-SymbolicName: org.jboss.test.osgi.service1
Export-Package: org.jboss.test.osgi.service.support.a
Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml 2010-01-08 07:29:22 UTC (rev 99145)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml 2010-01-08 07:35:07 UTC (rev 99146)
@@ -1,5 +0,0 @@
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="A" class="org.jboss.test.osgi.service.support.a.A"/>
-
-</deployment>
\ No newline at end of file
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml (from rev 99115, projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml 2010-01-08 07:35:07 UTC (rev 99146)
@@ -0,0 +1,5 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="A" class="org.jboss.test.osgi.service.support.a.A" />
+
+</deployment>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list