[jboss-cvs] JBossAS SVN: r95825 - in projects/jboss-osgi: projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/junit and 19 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 30 09:18:51 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-30 09:18:51 -0400 (Fri, 30 Oct 2009)
New Revision: 95825
Added:
projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/RuntimeContext.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Attachments.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkException.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/AttachmentSupport.java
Removed:
projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/ProvideContext.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/FrameworkException.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Attachments.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/AttachmentSupport.java
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/Runner.java
projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/junit/JUnitRunner.java
projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java
projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/MultipleMethodsTestCase.java
projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/StaticContextTestCase.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/container/container-basic.bnd
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/InvocationContext.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/InvocationContextImpl.java
projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/util/DeploymentUnitAttachments.java
projects/jboss-osgi/trunk/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.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/jta/TransactionTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleHuskyTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd
Log:
Provide Attachments as part of the SPI
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/Runner.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/Runner.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/Runner.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -26,7 +26,7 @@
import org.jboss.osgi.husky.Context;
import org.jboss.osgi.husky.Response;
import org.jboss.osgi.husky.runtime.junit.JUnitRunner;
-import org.jboss.osgi.testing.ProvideContext;
+import org.jboss.osgi.testing.RuntimeContext;
/**
* An abstraction of a test runner that executes the given
@@ -45,7 +45,7 @@
*
* <ol>
* <li>Instanciate the test case</li>
- * <li>Inject the context in the field marked by {@link ProvideContext}</li>
+ * <li>Inject the context in the field marked by {@link RuntimeContext}</li>
* <li>Run the individual test methods</li>
* <li>Collect the test results and wrap them in the {@link Response}</li>
* </ol>
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/junit/JUnitRunner.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/junit/JUnitRunner.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/runtime/junit/JUnitRunner.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -31,7 +31,7 @@
import org.jboss.osgi.husky.Context;
import org.jboss.osgi.husky.Response;
import org.jboss.osgi.husky.runtime.Runner;
-import org.jboss.osgi.testing.ProvideContext;
+import org.jboss.osgi.testing.RuntimeContext;
import org.junit.runner.Result;
import org.junit.runner.notification.RunListener;
import org.junit.runner.notification.RunNotifier;
@@ -108,7 +108,7 @@
{
for (Field field : testClass.getDeclaredFields())
{
- ProvideContext anProvide = field.getAnnotation(ProvideContext.class);
+ RuntimeContext anProvide = field.getAnnotation(RuntimeContext.class);
if (anProvide != null)
{
if ((field.getModifiers() & Modifier.STATIC) != 0 || target != null)
@@ -117,7 +117,7 @@
}
for (Method method : testClass.getDeclaredMethods())
{
- ProvideContext anProvide = method.getAnnotation(ProvideContext.class);
+ RuntimeContext anProvide = method.getAnnotation(RuntimeContext.class);
if (anProvide != null)
{
if ((method.getModifiers() & Modifier.STATIC) != 0 || target != null)
Deleted: projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/ProvideContext.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/ProvideContext.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/ProvideContext.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.testing;
-
-// $Id$
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.jboss.osgi.husky.Context;
-import org.jboss.osgi.husky.runtime.Runner;
-
-/**
- * An annotation that instructs the {@link Runner} to inject
- * the {@link Context} into the marked field or method on the
- * test case instance prior to the execution of any test method.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 16-May-2009
- */
- at Retention(RetentionPolicy.RUNTIME)
- at Target({ElementType.METHOD, ElementType.FIELD})
-public @interface ProvideContext
-{
-
-}
Copied: projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/RuntimeContext.java (from rev 95824, projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/ProvideContext.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/RuntimeContext.java (rev 0)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/testing/RuntimeContext.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.testing;
+
+// $Id$
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.jboss.osgi.husky.Context;
+import org.jboss.osgi.husky.runtime.Runner;
+
+/**
+ * An annotation that instructs the {@link Runner} to inject
+ * the {@link Context} into the marked field or method on the
+ * test case instance prior to the execution of any test method.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 16-May-2009
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+ at Target({ElementType.METHOD, ElementType.FIELD})
+public @interface RuntimeContext
+{
+
+}
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/ContextTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -31,7 +31,7 @@
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.osgi.testing.ProvideContext;
+import org.jboss.osgi.testing.RuntimeContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -47,7 +47,7 @@
*/
public class ContextTestCase
{
- @ProvideContext
+ @RuntimeContext
public BundleContext context;
private OSGiRuntime runtime;
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/MultipleMethodsTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/MultipleMethodsTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/MultipleMethodsTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -31,7 +31,7 @@
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.osgi.testing.ProvideContext;
+import org.jboss.osgi.testing.RuntimeContext;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -46,7 +46,7 @@
*/
public class MultipleMethodsTestCase
{
- @ProvideContext
+ @RuntimeContext
public static BundleContext context;
private static OSGiRuntime runtime;
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/StaticContextTestCase.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/StaticContextTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/testsuite/src/test/java/org/jboss/test/osgi/husky/context/StaticContextTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -31,7 +31,7 @@
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
-import org.jboss.osgi.testing.ProvideContext;
+import org.jboss.osgi.testing.RuntimeContext;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -47,7 +47,7 @@
*/
public class StaticContextTestCase
{
- @ProvideContext
+ @RuntimeContext
public static BundleContext context;
private static OSGiRuntime runtime;
Copied: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Attachments.java (from rev 95820, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Attachments.java)
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Attachments.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/Attachments.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -0,0 +1,160 @@
+/*
+ * 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.spi;
+
+// $Id$
+
+import java.util.Collection;
+
+/**
+ * An interface for general Attachments
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public interface Attachments
+{
+ /** Get attachment keys */
+ Collection<Key> getAttachmentKeys();
+
+ /** Add arbitrary attachment */
+ <T> T addAttachment(Class<T> clazz, T value);
+
+ /** Add arbitrary attachment with name */
+ <T> T addAttachment(String name, T value, Class<T> clazz);
+
+ /** Add arbitrary attachment with name */
+ Object addAttachment(String name, Object value);
+
+ /** Get an arbitrary attachment */
+ <T> T getAttachment(Class<T> clazz);
+
+ /** Get an arbitrary attachment */
+ <T> T getAttachment(String name, Class<T> clazz);
+
+ /** Get an arbitrary attachment */
+ Object getAttachment(String name);
+
+ /** Remove arbitrary attachments */
+ <T> T removeAttachment(Class<T> clazz);
+
+ /** Remove arbitrary attachments */
+ <T> T removeAttachment(Class<T> clazz, String name);
+
+ /** Remove arbitrary attachments */
+ Object removeAttachment(String name);
+
+ /**
+ * A key for attachements
+ */
+ public static class Key
+ {
+ private Class<?> clazz;
+ private String name;
+
+ /**
+ * Construct the key with optional class and name
+ */
+ public Key(String name, Class<?> clazz)
+ {
+ this.clazz = clazz;
+ this.name = name;
+ }
+
+ public static Key valueOf(String key)
+ {
+ int index = key.indexOf(",");
+ if (key.startsWith("[") && key.endsWith("]") && index > 0)
+ {
+ Class<?> classPart = null;
+ String className = key.substring(1, index);
+ String namePart = key.substring(index + 1, key.length() - 1);
+ if (className.length() > 0 && !className.equals("null"))
+ {
+ try
+ {
+ classPart = Class.forName(className);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new IllegalArgumentException("Cannot find class '" + className + "' in: " + key);
+ }
+ }
+ return new Key(namePart, classPart);
+ }
+ return null;
+ }
+
+ /**
+ * Get the class part for this key
+ *
+ * @return maybe null
+ */
+ public Class<?> getClassPart()
+ {
+ return clazz;
+ }
+
+ /**
+ * Get the name part for this key
+ *
+ * @return maybe null
+ */
+ public String getNamePart()
+ {
+ return name;
+ }
+
+ /**
+ * Two keys are equal if their {@link #toString()} is equal
+ */
+ public boolean equals(Object obj)
+ {
+ if (!(obj instanceof Key))
+ return false;
+ if (obj == this)
+ return true;
+ return obj.toString().equals(toString());
+ }
+
+ /**
+ * Two keys have the same hashCode if their {@link #toString()} is equal
+ */
+ public int hashCode()
+ {
+ return toString().hashCode();
+ }
+
+ /**
+ * Returns the String repesentation of this Key.
+ * <p/>
+ *
+ * <pre>
+ * "[" + clazz + "," + name + "]"
+ * </pre>
+ */
+ public String toString()
+ {
+ return "[" + clazz + "," + name + "]";
+ }
+ }
+}
\ No newline at end of file
Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/FrameworkException.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/FrameworkException.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/FrameworkException.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -1,49 +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.spi;
-
-// $Id$
-
-/**
- * An OSGi Framework Exception that should be thrown on unrecoverable errors.
- *
- * @author thomas.diesler at jboss.com
- * @since 18-Jan-2009
- */
- at SuppressWarnings("serial")
-public class FrameworkException extends RuntimeException
-{
- public FrameworkException(String message)
- {
- super(message);
- }
-
- public FrameworkException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public FrameworkException(Throwable cause)
- {
- super(cause);
- }
-}
Copied: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkException.java (from rev 95735, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/FrameworkException.java)
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkException.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkException.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -0,0 +1,49 @@
+/*
+ * 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.spi.framework;
+
+// $Id$
+
+/**
+ * An OSGi Framework Exception that should be thrown on unrecoverable errors.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 18-Jan-2009
+ */
+ at SuppressWarnings("serial")
+public class FrameworkException extends RuntimeException
+{
+ public FrameworkException(String message)
+ {
+ super(message);
+ }
+
+ public FrameworkException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public FrameworkException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/FrameworkIntegrationBean.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -29,7 +29,6 @@
import java.util.List;
import java.util.Map;
-import org.jboss.osgi.spi.FrameworkException;
import org.jboss.osgi.spi.util.ExportedPackageHelper;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -37,7 +37,6 @@
import java.util.Properties;
import java.util.Set;
-import org.jboss.osgi.spi.FrameworkException;
import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.osgi.spi.internal.StringPropertyReplacer;
import org.jboss.osgi.spi.util.ExportedPackageHelper;
Copied: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/AttachmentSupport.java (from rev 95820, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/AttachmentSupport.java)
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/AttachmentSupport.java (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/AttachmentSupport.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -0,0 +1,113 @@
+/*
+ * 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.spi.util;
+
+// $Id$
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.osgi.spi.Attachments;
+
+/**
+ * Basic attachment support.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public abstract class AttachmentSupport implements Attachments
+{
+ private Map<Key, Object> attachments = new HashMap<Key, Object>();
+
+ /** Construct with no attachments */
+ public AttachmentSupport()
+ {
+ }
+
+ /** Construct with given attachments */
+ public AttachmentSupport(AttachmentSupport att)
+ {
+ attachments = att.attachments;
+ }
+
+ public Collection<Key> getAttachmentKeys()
+ {
+ return attachments.keySet();
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T getAttachment(Class<T> clazz)
+ {
+ return (T)attachments.get(new Key(null, clazz));
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T getAttachment(String name, Class<T> clazz)
+ {
+ return (T)attachments.get(new Key(name, clazz));
+ }
+
+ public Object getAttachment(String name)
+ {
+ return attachments.get(new Key(name, null));
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T addAttachment(Class<T> clazz, T obj)
+ {
+ return (T)attachments.put(new Key(null, clazz), obj);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T addAttachment(String name, T obj, Class<T> clazz)
+ {
+ return (T)attachments.put(new Key(name, clazz), obj);
+ }
+
+ public Object addAttachment(String name, Object obj)
+ {
+ return attachments.put(new Key(name, null), obj);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T removeAttachment(Class<T> clazz)
+ {
+ return (T)attachments.remove(new Key(null, clazz));
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T removeAttachment(Class<T> clazz, String name)
+ {
+ return (T)attachments.remove(new Key(name, clazz));
+ }
+
+ public Object removeAttachment(String name)
+ {
+ return attachments.remove(new Key(name, null));
+ }
+
+ public String toString()
+ {
+ return attachments.toString();
+ }
+}
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/java/org/jboss/test/osgi/blueprint/container/BlueprintContainerTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -36,14 +36,14 @@
import javax.management.MBeanServer;
import org.jboss.osgi.blueprint.BlueprintCapability;
-import org.jboss.osgi.husky.Bridge;
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.annotation.ProvideContext;
import org.jboss.osgi.jmx.JMXCapability;
+import org.jboss.osgi.testing.Bridge;
+import org.jboss.osgi.testing.BridgeFactory;
+import org.jboss.osgi.testing.HuskyCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.RuntimeContext;
import org.jboss.test.osgi.blueprint.container.bundle.BeanA;
import org.jboss.test.osgi.blueprint.container.bundle.BeanB;
import org.jboss.test.osgi.blueprint.container.bundle.ServiceA;
@@ -68,7 +68,7 @@
*/
public class BlueprintContainerTestCase
{
- @ProvideContext
+ @RuntimeContext
public static BundleContext context;
private static OSGiRuntime runtime;
Modified: projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/container/container-basic.bnd
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/container/container-basic.bnd 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/blueprint/testsuite/src/test/resources/container/container-basic.bnd 2009-10-30 13:18:51 UTC (rev 95825)
@@ -9,8 +9,6 @@
Import-Package: \
javax.management, \
org.jboss.osgi.blueprint, \
- org.jboss.osgi.husky, \
- org.jboss.osgi.husky.annotation, \
org.jboss.osgi.jmx, \
org.jboss.osgi.spi.capability, \
org.jboss.osgi.testing, \
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Attachments.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Attachments.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Attachments.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -1,160 +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.deployment.deployer;
-
-// $Id$
-
-import java.util.Collection;
-
-/**
- * An interface for general Attachments
- *
- * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007
- */
-public interface Attachments
-{
- /** Get attachment keys */
- Collection<Key> getAttachmentKeys();
-
- /** Add arbitrary attachment */
- <T> T addAttachment(Class<T> clazz, T value);
-
- /** Add arbitrary attachment with name */
- <T> T addAttachment(String name, T value, Class<T> clazz);
-
- /** Add arbitrary attachment with name */
- Object addAttachment(String name, Object value);
-
- /** Get an arbitrary attachment */
- <T> T getAttachment(Class<T> clazz);
-
- /** Get an arbitrary attachment */
- <T> T getAttachment(String name, Class<T> clazz);
-
- /** Get an arbitrary attachment */
- Object getAttachment(String name);
-
- /** Remove arbitrary attachments */
- <T> T removeAttachment(Class<T> clazz);
-
- /** Remove arbitrary attachments */
- <T> T removeAttachment(Class<T> clazz, String name);
-
- /** Remove arbitrary attachments */
- Object removeAttachment(String name);
-
- /**
- * A key for attachements
- */
- public static class Key
- {
- private Class<?> clazz;
- private String name;
-
- /**
- * Construct the key with optional class and name
- */
- public Key(String name, Class<?> clazz)
- {
- this.clazz = clazz;
- this.name = name;
- }
-
- public static Key valueOf(String key)
- {
- int index = key.indexOf(",");
- if (key.startsWith("[") && key.endsWith("]") && index > 0)
- {
- Class<?> classPart = null;
- String className = key.substring(1, index);
- String namePart = key.substring(index + 1, key.length() - 1);
- if (className.length() > 0 && !className.equals("null"))
- {
- try
- {
- classPart = Class.forName(className);
- }
- catch (ClassNotFoundException ex)
- {
- throw new IllegalArgumentException("Cannot find class '" + className + "' in: " + key);
- }
- }
- return new Key(namePart, classPart);
- }
- return null;
- }
-
- /**
- * Get the class part for this key
- *
- * @return maybe null
- */
- public Class<?> getClassPart()
- {
- return clazz;
- }
-
- /**
- * Get the name part for this key
- *
- * @return maybe null
- */
- public String getNamePart()
- {
- return name;
- }
-
- /**
- * Two keys are equal if their {@link #toString()} is equal
- */
- public boolean equals(Object obj)
- {
- if (!(obj instanceof Key))
- return false;
- if (obj == this)
- return true;
- return obj.toString().equals(toString());
- }
-
- /**
- * Two keys have the same hashCode if their {@link #toString()} is equal
- */
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- /**
- * Returns the String repesentation of this Key.
- * <p/>
- *
- * <pre>
- * "[" + clazz + "," + name + "]"
- * </pre>
- */
- public String toString()
- {
- return "[" + clazz + "," + name + "]";
- }
- }
-}
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -23,6 +23,7 @@
import java.net.URL;
+import org.jboss.osgi.spi.Attachments;
import org.jboss.virtual.VirtualFile;
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/InvocationContext.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/InvocationContext.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/InvocationContext.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.osgi.deployment.deployer.Attachments;
+import org.jboss.osgi.spi.Attachments;
import org.jboss.virtual.VirtualFile;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/AttachmentSupport.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/AttachmentSupport.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/AttachmentSupport.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -1,113 +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.deployment.internal;
-
-// $Id$
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.osgi.deployment.deployer.Attachments;
-
-/**
- * Basic attachment support.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007
- */
-public abstract class AttachmentSupport implements Attachments
-{
- private Map<Key, Object> attachments = new HashMap<Key, Object>();
-
- /** Construct with no attachments */
- public AttachmentSupport()
- {
- }
-
- /** Construct with given attachments */
- public AttachmentSupport(AttachmentSupport att)
- {
- attachments = att.attachments;
- }
-
- public Collection<Key> getAttachmentKeys()
- {
- return attachments.keySet();
- }
-
- @SuppressWarnings("unchecked")
- public <T> T getAttachment(Class<T> clazz)
- {
- return (T)attachments.get(new Key(null, clazz));
- }
-
- @SuppressWarnings("unchecked")
- public <T> T getAttachment(String name, Class<T> clazz)
- {
- return (T)attachments.get(new Key(name, clazz));
- }
-
- public Object getAttachment(String name)
- {
- return attachments.get(new Key(name, null));
- }
-
- @SuppressWarnings("unchecked")
- public <T> T addAttachment(Class<T> clazz, T obj)
- {
- return (T)attachments.put(new Key(null, clazz), obj);
- }
-
- @SuppressWarnings("unchecked")
- public <T> T addAttachment(String name, T obj, Class<T> clazz)
- {
- return (T)attachments.put(new Key(name, clazz), obj);
- }
-
- public Object addAttachment(String name, Object obj)
- {
- return attachments.put(new Key(name, null), obj);
- }
-
- @SuppressWarnings("unchecked")
- public <T> T removeAttachment(Class<T> clazz)
- {
- return (T)attachments.remove(new Key(null, clazz));
- }
-
- @SuppressWarnings("unchecked")
- public <T> T removeAttachment(Class<T> clazz, String name)
- {
- return (T)attachments.remove(new Key(name, clazz));
- }
-
- public Object removeAttachment(String name)
- {
- return attachments.remove(new Key(name, null));
- }
-
- public String toString()
- {
- return attachments.toString();
- }
-}
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -26,6 +26,7 @@
import java.net.URL;
import org.jboss.osgi.deployment.deployer.Deployment;
+import org.jboss.osgi.spi.util.AttachmentSupport;
import org.jboss.osgi.spi.util.BundleInfo;
import org.jboss.virtual.VirtualFile;
Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/InvocationContextImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/InvocationContextImpl.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/InvocationContextImpl.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -25,8 +25,8 @@
import java.util.Collection;
-import org.jboss.osgi.deployment.deployer.Attachments;
import org.jboss.osgi.deployment.interceptor.InvocationContext;
+import org.jboss.osgi.spi.Attachments;
import org.jboss.virtual.VirtualFile;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
Modified: projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/util/DeploymentUnitAttachments.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/util/DeploymentUnitAttachments.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/framework/src/main/java/org/jboss/osgi/framework/util/DeploymentUnitAttachments.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -28,7 +28,7 @@
import java.util.Set;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.deployment.deployer.Attachments;
+import org.jboss.osgi.spi.Attachments;
/**
* An implementation of {@link Attachments} that delegates to a
Modified: projects/jboss-osgi/trunk/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-30 13:18:51 UTC (rev 95825)
@@ -18,12 +18,13 @@
<entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
<entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
<entry><key>org.osgi.framework.system.packages.extra</key><value>
+
org.jboss.logging;version=2.0,
+
+ org.jboss.osgi.spi;version=1.0,
org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.logging;version=1.0,
org.jboss.osgi.spi.management;version=1.0,
org.jboss.osgi.spi.service;version=1.0,
- org.jboss.osgi.testing;version=1.0,
org.jboss.osgi.spi.util;version=1.0,
org.osgi.framework,
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 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -30,13 +30,13 @@
import javax.management.MBeanServer;
import org.jboss.osgi.blueprint.BlueprintCapability;
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.annotation.ProvideContext;
import org.jboss.osgi.jmx.JMXCapability;
+import org.jboss.osgi.testing.BridgeFactory;
+import org.jboss.osgi.testing.HuskyCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.RuntimeContext;
import org.jboss.test.osgi.example.blueprint.bundle.BeanA;
import org.jboss.test.osgi.example.blueprint.bundle.ServiceA;
import org.jboss.test.osgi.example.blueprint.bundle.ServiceB;
@@ -56,7 +56,7 @@
*/
public class BlueprintTestCase
{
- @ProvideContext
+ @RuntimeContext
public static BundleContext context;
private static OSGiRuntime runtime;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/jta/TransactionTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -25,8 +25,8 @@
import static org.junit.Assert.*;
-import org.jboss.osgi.husky.HuskyCapability;
import org.jboss.osgi.jta.TransactionCapability;
+import org.jboss.osgi.testing.HuskyCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleHuskyTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleHuskyTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/simple/SimpleHuskyTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -27,12 +27,12 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assume.assumeNotNull;
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.annotation.ProvideContext;
+import org.jboss.osgi.testing.BridgeFactory;
+import org.jboss.osgi.testing.HuskyCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.RuntimeContext;
import org.jboss.test.osgi.example.simple.bundle.SimpleService;
import org.junit.After;
import org.junit.Before;
@@ -51,7 +51,7 @@
*/
public class SimpleHuskyTestCase
{
- @ProvideContext
+ @RuntimeContext
public BundleContext context;
private OSGiRuntime runtime;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/jaxb/JAXBTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -34,14 +34,14 @@
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.annotation.ProvideContext;
import org.jboss.osgi.jaxb.JAXBCapability;
import org.jboss.osgi.jaxb.JAXBService;
+import org.jboss.osgi.testing.BridgeFactory;
+import org.jboss.osgi.testing.HuskyCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.RuntimeContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -56,7 +56,7 @@
*/
public class JAXBTestCase
{
- @ProvideContext
+ @RuntimeContext
public static BundleContext context;
private static OSGiRuntime runtime;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/DOMParserTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -33,12 +33,12 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.annotation.ProvideContext;
+import org.jboss.osgi.testing.BridgeFactory;
+import org.jboss.osgi.testing.HuskyCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.RuntimeContext;
import org.jboss.osgi.xml.XMLParserCapability;
import org.junit.After;
import org.junit.Before;
@@ -60,7 +60,7 @@
*/
public class DOMParserTestCase
{
- @ProvideContext
+ @RuntimeContext
public static BundleContext context;
private static OSGiRuntime runtime;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/xml/parser/SAXParserTestCase.java 2009-10-30 13:18:51 UTC (rev 95825)
@@ -32,12 +32,12 @@
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.jboss.osgi.husky.BridgeFactory;
-import org.jboss.osgi.husky.HuskyCapability;
-import org.jboss.osgi.husky.annotation.ProvideContext;
+import org.jboss.osgi.testing.BridgeFactory;
+import org.jboss.osgi.testing.HuskyCapability;
import org.jboss.osgi.testing.OSGiBundle;
import org.jboss.osgi.testing.OSGiRuntime;
import org.jboss.osgi.testing.OSGiTestHelper;
+import org.jboss.osgi.testing.RuntimeContext;
import org.jboss.osgi.xml.XMLParserCapability;
import org.junit.After;
import org.junit.Before;
@@ -58,7 +58,7 @@
*/
public class SAXParserTestCase
{
- @ProvideContext
+ @RuntimeContext
public static BundleContext context;
private static OSGiRuntime runtime;
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/blueprint/example-blueprint.bnd 2009-10-30 13:18:51 UTC (rev 95825)
@@ -7,8 +7,6 @@
Import-Package: \
javax.management, \
org.jboss.osgi.blueprint, \
- org.jboss.osgi.husky, \
- org.jboss.osgi.husky.annotation, \
org.jboss.osgi.jmx, \
org.jboss.osgi.spi.capability, \
org.jboss.osgi.testing, \
Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd 2009-10-30 13:05:42 UTC (rev 95824)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/xml/jaxb/example-xml-jaxb.bnd 2009-10-30 13:18:51 UTC (rev 95825)
@@ -6,8 +6,7 @@
Export-Package: org.jboss.test.osgi.example.xml.jaxb
Import-Package: com.sun.xml.bind.v2, javax.xml.bind*, javax.xml.datatype, javax.xml.namespace, \
- org.jboss.osgi.husky*, org.jboss.osgi.jaxb, org.jboss.osgi.spi*, org.jboss.osgi.testing, \
- org.junit, org.osgi.framework
+ org.jboss.osgi.jaxb, org.jboss.osgi.spi*, org.jboss.osgi.testing, org.junit, org.osgi.framework
Include-Resource: booking.xml, booking.xsd
More information about the jboss-cvs-commits
mailing list