Property changes on: deployment ___________________________________________________________________ Added: svn:ignore + target Property changes on: cluster ___________________________________________________________________ Added: svn:ignore + target Property changes on: cluster/ssh ___________________________________________________________________ Added: svn:ignore + target Property changes on: transaction ___________________________________________________________________ Added: svn:ignore + target Index: admin/monitor/src/main/java/org/glassfish/admin/monitor/MonitoringBootstrap.java =================================================================== --- admin/monitor/src/main/java/org/glassfish/admin/monitor/MonitoringBootstrap.java (revision 41513) +++ admin/monitor/src/main/java/org/glassfish/admin/monitor/MonitoringBootstrap.java (working copy) @@ -38,11 +38,6 @@ * holder. */ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - package org.glassfish.admin.monitor; import java.beans.PropertyChangeEvent; @@ -52,7 +47,6 @@ import java.util.logging.Logger; import org.glassfish.api.admin.ServerEnvironment; -import org.glassfish.internal.api.ClassLoaderHierarchy; import org.glassfish.external.probe.provider.StatsProviderInfo; import org.jvnet.hk2.component.*; import org.glassfish.external.probe.provider.StatsProviderManager; @@ -124,8 +118,6 @@ @Inject Events events; @Inject - ClassLoaderHierarchy classloader; - @Inject ServerEnvironment serverEnv; @Inject(optional=true) @@ -182,23 +174,6 @@ verifyModule(m); } } - - //system applications - File root = new File(System.getProperty(SystemPropertyConstants.INSTALL_ROOT_PROPERTY)); - File applicationsDir = new File(root, "lib" + File.separator +"install" + File.separator + "applications"); - connectorClassLoader = classloader.getConnectorClassLoader(null); // Make more generic? - String[] appChild = null; - if (applicationsDir != null) { - appChild = applicationsDir.list(); - if (appChild != null) { - for (String a : appChild) { - File childDir = new File(applicationsDir, a); - if (childDir.isDirectory()) { - verifyApp(a, childDir); - } - } - } - } } public void preDestroy() { @@ -318,7 +293,7 @@ } return; } - if (mf != null) { + if (mf != null && connectorClassLoader != null) { processManifest(mf, connectorClassLoader); } } @@ -460,6 +435,11 @@ logger.fine("ModuleClassLoader = " + mcl); logger.fine("XML File path = " + file.getAbsolutePath()); } + if (null == mcl) { + logger.log(Level.WARNING, "mcl is null - will not processProbeProviderXML for "+file.getAbsolutePath(), + new NullPointerException()); + return; + } processProbeProviderXML(mcl, file.getAbsolutePath(), false); } @@ -660,6 +640,25 @@ return true; } + public void configureConnectors(ClassLoader cl) { + //system applications + File root = new File(System.getProperty(SystemPropertyConstants.INSTALL_ROOT_PROPERTY)); + File applicationsDir = new File(root, "lib" + File.separator +"install" + File.separator + "applications"); + connectorClassLoader = cl; + String[] appChild = null; + if (applicationsDir != null) { + appChild = applicationsDir.list(); + if (appChild != null) { + for (String a : appChild) { + File childDir = new File(applicationsDir, a); + if (childDir.isDirectory()) { + verifyApp(a, childDir); + } + } + } + } + } + private class ProcessProbes implements ProbeProviderEventListener { public void probeProviderAdded(String moduleProviderName, String moduleName, String probeProviderName, String invokerId, Class providerClazz, T provider) { Property changes on: ejb ___________________________________________________________________ Modified: svn:ignore - *.iml ejb.iml ejb.iml + *.iml ejb.iml ejb.iml target Property changes on: security ___________________________________________________________________ Modified: svn:ignore - securitymodule.iml securitymodule.iml + securitymodule.iml securitymodule.iml target Property changes on: connectors ___________________________________________________________________ Modified: svn:ignore - connectors.iml connectors.iml + connectors.iml connectors.iml target Index: connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorClassLoaderServiceImpl.java =================================================================== --- connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorClassLoaderServiceImpl.java (revision 41513) +++ connectors/connectors-internal-api/src/main/java/com/sun/appserv/connectors/internal/api/ConnectorClassLoaderServiceImpl.java (working copy) @@ -50,6 +50,7 @@ import java.util.logging.Level; import com.sun.logging.LogDomains; +import org.glassfish.admin.monitor.MonitoringBootstrap; /** * We support two policies: @@ -77,6 +78,9 @@ @Inject Habitat habitat; + @Inject + private MonitoringBootstrap monitoringBootstrap; + private Logger logger = LogDomains.getLogger(ConnectorClassLoaderServiceImpl.class, LogDomains.RSR_LOGGER); @@ -101,6 +105,8 @@ for(DelegatingClassLoader.ClassFinder cf : appsSpecificCCLUtil.getSystemRARClassLoaders()){ globalConnectorCL.addDelegate(cf); } + if (null != globalConnectorCL && null != monitoringBootstrap) + monitoringBootstrap.configureConnectors(globalConnectorCL); } } } Index: connectors/connectors-internal-api/pom.xml =================================================================== --- connectors/connectors-internal-api/pom.xml (revision 41513) +++ connectors/connectors-internal-api/pom.xml (working copy) @@ -103,6 +103,12 @@ dol ${project.parent.version} + + org.glassfish.admin + monitoring-core + 3.1-SNAPSHOT + hk2-jar +