[jboss-cvs] JBossAS SVN: r94269 - projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 2 08:54:45 EDT 2009
Author: jesper.pedersen
Date: 2009-10-02 08:54:45 -0400 (Fri, 02 Oct 2009)
New Revision: 94269
Modified:
projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java
Log:
Make sure that a bootstrap.xml exists
Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java 2009-10-02 12:48:55 UTC (rev 94268)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/KernelImpl.java 2009-10-02 12:54:45 UTC (rev 94269)
@@ -204,45 +204,34 @@
if (configDirectory != null && configDirectory.exists() && configDirectory.isDirectory())
{
File bootstrapXml = new File(configDirectory, "bootstrap.xml");
- org.jboss.jca.fungal.bootstrap.Unmarshaller bootstrapU =
- new org.jboss.jca.fungal.bootstrap.Unmarshaller();
- org.jboss.jca.fungal.bootstrap.Bootstrap bootstrap = bootstrapU.unmarshal(bootstrapXml);
- // Bootstrap urls
- if (bootstrap != null)
+ if (bootstrapXml != null && bootstrapXml.exists())
{
- for (String url : bootstrap.getUrl())
+ org.jboss.jca.fungal.bootstrap.Unmarshaller bootstrapU =
+ new org.jboss.jca.fungal.bootstrap.Unmarshaller();
+ org.jboss.jca.fungal.bootstrap.Bootstrap bootstrap = bootstrapU.unmarshal(bootstrapXml);
+
+ // Bootstrap urls
+ if (bootstrap != null)
{
- try
+ for (String url : bootstrap.getUrl())
{
- URL fullPath = new URL(configDirectory.toURI().toURL().toExternalForm() + url);
-
- if (isDebugEnabled())
- debug("URL=" + fullPath.toString());
-
- mainDeployer.deploy(fullPath, kernelClassLoader);
+ try
+ {
+ URL fullPath = new URL(configDirectory.toURI().toURL().toExternalForm() + url);
+
+ if (isDebugEnabled())
+ debug("URL=" + fullPath.toString());
+
+ mainDeployer.deploy(fullPath, kernelClassLoader);
+ }
+ catch (Throwable deployThrowable)
+ {
+ error(deployThrowable.getMessage(), deployThrowable);
+ }
}
- catch (Throwable deployThrowable)
- {
- error(deployThrowable.getMessage(), deployThrowable);
- }
}
}
-
- // Remote MBeanServer access
- if (kernelConfiguration.isRemoteAccess())
- {
- Map<String, Object> env = new HashMap<String, Object>();
- env.put("jmx.remote.protocol.provider.class.loader", kernelClassLoader);
-
- JMXServiceURL serviceURL = new JMXServiceURL("rmi",
- kernelConfiguration.getBindAddress(),
- kernelConfiguration.getRemotePort());
-
- jmxConnectorServer = JMXConnectorServerFactory.newJMXConnectorServer(serviceURL, env, mbeanServer);
- jmxConnectorServer.start();
- }
-
}
// Deploy all files in deploy/
@@ -263,6 +252,23 @@
}
}
}
+
+ // Remote MBeanServer access
+ if (kernelConfiguration.isRemoteAccess())
+ {
+ Map<String, Object> env = new HashMap<String, Object>();
+ env.put("jmx.remote.protocol.provider.class.loader", kernelClassLoader);
+
+ JMXServiceURL serviceURL = new JMXServiceURL("rmi",
+ kernelConfiguration.getBindAddress(),
+ kernelConfiguration.getRemotePort());
+
+ jmxConnectorServer = JMXConnectorServerFactory.newJMXConnectorServer(serviceURL, env, mbeanServer);
+ jmxConnectorServer.start();
+ }
+
+ // Shutdown thread pool
+ executorService.shutdown();
}
/**
@@ -286,9 +292,6 @@
}
}
- // Shutdown thread pool
- executorService.shutdown();
-
// Shutdown all deployments
List<Deployment> shutdownDeployments = new LinkedList<Deployment>(deployments);
Collections.reverse(shutdownDeployments);
More information about the jboss-cvs-commits
mailing list