[jboss-cvs] JBossAS SVN: r94464 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk: scripts and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 7 10:51:44 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-07 10:51:44 -0400 (Wed, 07 Oct 2009)
New Revision: 94464
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml
projects/jboss-osgi/projects/runtime/microcontainer/trunk/scripts/assembly-all.xml
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java
Log:
[JBOSGI-161] Cannot use commons-logging
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml 2009-10-07 14:51:13 UTC (rev 94463)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/pom.xml 2009-10-07 14:51:44 UTC (rev 94464)
@@ -110,6 +110,10 @@
<groupId>org.jboss</groupId>
<artifactId>jboss-mdr</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/scripts/assembly-all.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/scripts/assembly-all.xml 2009-10-07 14:51:13 UTC (rev 94463)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/scripts/assembly-all.xml 2009-10-07 14:51:44 UTC (rev 94464)
@@ -39,7 +39,6 @@
<include>*:jboss-reflect:jar</include>
<include>*:jboss-vfs:jar</include>
<include>*:jbossxb:jar</include>
- <include>*:log4j:jar</include>
<include>*:org.osgi.core:jar</include>
<include>*:org.osgi.compendium:jar</include>
</includes>
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-10-07 14:51:13 UTC (rev 94463)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-10-07 14:51:44 UTC (rev 94464)
@@ -489,7 +489,14 @@
}
catch (Exception e)
{
- throw new BundleException("Error installing bundle from location=" + root, e);
+ Throwable cause = e;
+ if (e instanceof DeploymentException)
+ {
+ cause = e.getCause();
+ if (cause instanceof BundleException)
+ throw (BundleException)cause;
+ }
+ throw new BundleException("Error installing bundle from location=" + root, cause);
}
}
@@ -829,10 +836,11 @@
}
catch (DeploymentException e)
{
- Throwable t = e.getCause();
- if (t instanceof BundleException)
- throw (BundleException)t;
- throw new BundleException("Error starting " + bundleState, e);
+ Throwable cause = e.getCause();
+ if (cause instanceof BundleException)
+ throw (BundleException)cause;
+
+ throw new BundleException("Error starting " + bundleState, cause);
}
}
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-10-07 14:51:13 UTC (rev 94463)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-10-07 14:51:44 UTC (rev 94464)
@@ -350,9 +350,12 @@
Class<?> otherSource = (Class<?>)other.getSource(className);
if (otherSource == null)
- throw new IllegalStateException("Cannot load '" + className + "' from: " + other);
+ {
+ log.debug("Cannot load '" + className + "' from: " + other);
+ return false;
+ }
- boolean equals = otherSource.equals(source);
+ boolean equals = source.equals(otherSource);
if (equals == false)
{
ClassLoader otherLoader = otherSource.getClassLoader();
Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java 2009-10-07 14:51:13 UTC (rev 94463)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java 2009-10-07 14:51:44 UTC (rev 94464)
@@ -148,9 +148,12 @@
{
try
{
- installKernelBean(BEAN_MBEAN_SERVER, server);
- StandardMBean mbean = new StandardMBean(mbeanImpl, MicrocontainerServiceMBean.class);
- server.registerMBean(mbean, MBEAN_MICROCONTAINER_SERVICE);
+ if (server != null)
+ {
+ installKernelBean(BEAN_MBEAN_SERVER, server);
+ StandardMBean mbean = new StandardMBean(mbeanImpl, MicrocontainerServiceMBean.class);
+ server.registerMBean(mbean, MBEAN_MICROCONTAINER_SERVICE);
+ }
}
catch (Exception ex)
{
@@ -162,7 +165,7 @@
{
try
{
- if (server.isRegistered(MBEAN_MICROCONTAINER_SERVICE))
+ if (server != null && server.isRegistered(MBEAN_MICROCONTAINER_SERVICE))
server.unregisterMBean(MBEAN_MICROCONTAINER_SERVICE);
}
catch (Exception ex)
More information about the jboss-cvs-commits
mailing list