User: cgjung Date: 01/12/05 03:00:27 Modified: jboss.net/src/main/org/jboss/net/jmx/adaptor/server Adaptor.java Log: adopted Jules fixURL hack until the next jdk patch will come out ;-) got AxisService to run again under new mbean state model and latest deployer changes (mbean-ref). Revision Changes Path 1.2 +31 -3 contrib/jboss.net/src/main/org/jboss/net/jmx/adaptor/server/Adaptor.java Index: Adaptor.java =================================================================== RCS file: /cvsroot/jboss/contrib/jboss.net/src/main/org/jboss/net/jmx/adaptor/server/Adaptor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Adaptor.java 2001/10/12 12:17:49 1.1 +++ Adaptor.java 2001/12/05 11:00:27 1.2 @@ -13,11 +13,19 @@ import javax.management.ObjectName; import javax.management.MalformedObjectNameException; +import java.net.URL; +import java.net.MalformedURLException; + /** - * dumb server wrapper + * wrapper around the mbean server that may be exposed as a + * soap-enabled mbean to the outside world. * @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a> * @created October 1, 2001 - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ + * Change notes: + * <ul> + * <li> 5.12.01: CGJ, zip-cache problem "fixed" <li> + * </ul> */ public class Adaptor extends ServiceMBeanSupport implements AdaptorMBean, Constants { @@ -34,12 +42,12 @@ } public void startService() throws Exception { - getServer().invoke(new ObjectName("JBOSS-SYSTEM:service=Axis"),"deploy",new Object[] {getClass().getClassLoader().getResource("META-INF/install-jmx.xml").toString()},new String[] {"java.lang.String"}); + getServer().invoke(new ObjectName("JBOSS-SYSTEM:service=Axis"),"deploy",new Object[] {fixURL(getClass().getClassLoader().getResource("META-INF/install-jmx.xml")).toString()},new String[] {"java.lang.String"}); } public void stopService() { try{ - getServer().invoke(new ObjectName("JBOSS-SYSTEM:service=Axis"),"undeploy",new Object[] {getClass().getClassLoader().getResource("META-INF/install-jmx.xml").toString()},new String[] {"java.lang.String"}); + getServer().invoke(new ObjectName("JBOSS-SYSTEM:service=Axis"),"undeploy",new Object[] {fixURL(getClass().getClassLoader().getResource("META-INF/install-jmx.xml")).toString()},new String[] {"java.lang.String"}); } catch(Exception e) { } } @@ -164,4 +172,24 @@ getServer().removeNotificationListener(objectName, notificationListener); } + // + // Some helper methods + // + + /** work around broken JarURLConnection caching... thx Jules for the hack ;-) */ + private URL fixURL(URL url) throws MalformedURLException + { + String urlString=url.toString(); + //determine the last slash + int index=urlString.lastIndexOf(":")+1; + // no slash, we take the last protocol or drive id + if(index==0) { + // we cannot fix this + return url; + } else { + return new URL(urlString.substring(0,index)+ + "/."+urlString.substring(index)); + } + } + }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development