User: schaefera
Date: 01/09/11 19:10:23
Modified:src/main/org/jboss/system URLClassLoader.java
URLClassLoaderMBean.java
Log:
Adjusted files because of the repackaging of the JMX Connector
and Adaptors.
Also the connector and adaptor service files (*.jsr) are separated into
3 different files because it is neccessary to allow the administrator
to select which one to use (security, performance etc.). Now the admin
can add or remove the service files as the need arise.
Revision ChangesPath
1.3 +40 -2 jboss/src/main/org/jboss/system/URLClassLoader.java
Index: URLClassLoader.java
===
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/system/URLClassLoader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- URLClassLoader.java 2001/09/08 00:53:57 1.2
+++ URLClassLoader.java 2001/09/12 02:10:23 1.3
@@ -29,7 +29,7 @@
*resources and classes.
*
* @author Marc Fleury
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*
* 20010830 marc fleury:
*
@@ -42,12 +42,50 @@
{
/** One URL per classLoader in our case */
private URL url = null;
-
/** An SCL can also be loading on behalf of an MBean */
private ObjectName mbean = null;
/** All SCL are just in orbit around a basic ServiceLibraries */
private static ServiceLibraries libraries;
+
+ /**
+ * One url per SCL
+ *
+ * @param String application
+ * @param ClassLoader parent
+ */
+ public URLClassLoader( String pUrl )
+ {
+ super( new URL[] {} );
+ try {
+ URL lUrl = new URL( pUrl );
+ addURL( lUrl );
+ this.url = lUrl;
+ }
+ catch( Exception e ) {
+ System.out.println("[GPA] WARNING: URL "+url+" is not valid");
+ }
+
+ try {
+
+ url.openStream();
+
+
+ if (libraries == null) libraries =
ServiceLibraries.getLibraries();
+
+/*
+ //Reload the library if necessary
+ if (reload)
+ libraries.removeClassLoader(this) ;
+*/
+
+ // A URL enabled SCL must register itself with the libraries
to be queried
+ libraries.addClassLoader(this);
+ }
+ catch(Exception e) {
+ System.out.println("[GPA] WARNING: URL "+url+" could not be
opened");
+ }
+ }
/**
* One url per SCL
1.3 +5 -1 jboss/src/main/org/jboss/system/URLClassLoaderMBean.java
Index: URLClassLoaderMBean.java
===
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/system/URLClassLoaderMBean.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- URLClassLoaderMBean.java 2001/09/08 00:53:57 1.2
+++ URLClassLoaderMBean.java 2001/09/12 02:10:23 1.3
@@ -6,13 +6,17 @@
*/
package org.jboss.system;
+import java.net.URL;
+
/**
* The management interface for the {@link URLClassLoader} mbean.
*
* @author Marc Fleury
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public interface URLClassLoaderMBean
{
+ public URL getURL();
// Empty, just a trick for the MBean base man jmx is dumb sometimes
}
+
___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development