Author: thomas.diesler(a)jboss.com
Date: 2010-01-21 03:58:39 -0500 (Thu, 21 Jan 2010)
New Revision: 99718
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/trunk/distribution/pom.xml
projects/jboss-osgi/trunk/testsuite/example/pom.xml
Log:
Enable blueprint examples in remote runtime
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-01-21
07:10:11 UTC (rev 99717)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2010-01-21
08:58:39 UTC (rev 99718)
@@ -153,7 +153,7 @@
}
public abstract boolean isFragment();
-
+
public Map<X509Certificate, List<X509Certificate>>
getSignerCertificates(int signersType)
{
throw new NotImplementedException();
@@ -268,7 +268,7 @@
// Get the resource bundle URL for the given base and locale
URL entryURL = getLocalizationEntryPath(baseName, locale);
-
+
// If the specified locale entry could not be found fall back to the default locale
entry
if (entryURL == null)
{
@@ -289,7 +289,7 @@
throw new IllegalStateException("Cannot read resouce bundle: " +
entryURL, ex);
}
}
-
+
Dictionary<String, String> locHeaders = new Hashtable<String,
String>();
Enumeration<String> e = rawHeaders.keys();
while (e.hasMoreElements())
@@ -298,7 +298,7 @@
String value = rawHeaders.get(key);
if (value.startsWith("%"))
value = value.substring(1);
-
+
if (resBundle != null)
{
try
@@ -310,7 +310,7 @@
// ignore
}
}
-
+
locHeaders.put(key, value);
}
@@ -324,14 +324,14 @@
// appending the .properties suffix. If a translation is not found, the locale
// must be made more generic by first removing the variant, then the country
// and finally the language until an entry is found that contains a valid
translation.
-
+
String entryPath = baseName + "_" + locale + ".properties";
URL entryURL = getEntryInternal(entryPath);
while (entryURL == null)
{
if (entryPath.equals(baseName + ".properties"))
break;
-
+
int lastIndex = locale.lastIndexOf('_');
if (lastIndex > 0)
{
@@ -342,7 +342,7 @@
{
entryPath = baseName + ".properties";
}
-
+
// The bundle's class loader is not used to search for localization entries.
Only
// the contents of the bundle and its attached fragments are searched.
entryURL = getEntryInternal(entryPath);
@@ -537,7 +537,7 @@
protected void beforeServiceUnregistration(OSGiServiceState service)
{
}
-
+
boolean ungetContext(ControllerContext context)
{
return removeContextInUse(context);
@@ -656,14 +656,7 @@
public Object getSource(String className)
{
// [TODO] some more efficient way than using the class?
- try
- {
- return loadClass(className);
- }
- catch (ClassNotFoundException e)
- {
- return null;
- }
+ return getBundleManager().loadClassFailsafe(this, className);
}
/**
Modified: projects/jboss-osgi/trunk/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/pom.xml 2010-01-21 07:10:11 UTC (rev 99717)
+++ projects/jboss-osgi/trunk/distribution/pom.xml 2010-01-21 08:58:39 UTC (rev 99718)
@@ -328,6 +328,16 @@
</dependency>
<!-- jboss-osgi-runtime-jbossas: no javadoc -->
+ <!-- Aries Dependencies -->
+ <dependency>
+ <groupId>org.apache.aries.blueprint</groupId>
+ <artifactId>org.apache.aries.blueprint</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries</groupId>
+ <artifactId>org.apache.aries.util</artifactId>
+ </dependency>
+
<!-- Equinox Dependencies -->
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2010-01-21 07:10:11 UTC (rev
99717)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2010-01-21 08:58:39 UTC (rev
99718)
@@ -185,7 +185,6 @@
<!-- [JBOSGI-236] XML Binding example fails in JBossAS -->
<exclude>org/jboss/test/osgi/example/xml/jbossxb/**</exclude>
<!-- Functionality not supported in Equinox -->
- <exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
<exclude>org/jboss/test/osgi/example/interceptor/**</exclude>
<exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppNegativeTestCase.class</exclude>
@@ -237,11 +236,10 @@
<excludes>
<exclude>${target.container.excludes}</exclude>
<!--
https://issues.apache.org/jira/browse/FELIX-1804 -->
-
<exclude>org/jboss/test/osgi/example/interceptor/**</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppNegativeTestCase.class</exclude>
<exclude>org/jboss/test/osgi/example/webapp/WebAppInterceptorTestCase.class</exclude>
<!-- Functionality not supported in Felix -->
- <exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
+
<exclude>org/jboss/test/osgi/example/interceptor/**</exclude>
<exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
</excludes>
</configuration>