mbeanServer.invoke(connectorName, "setLeasePeriod", new Object[] {new Long(CONNECTION_LEASE_PERIOD)}, new String[] {"long"});
   private void initializeRemoting(MBeanServer mbeanServer) throws Exception   {      //We explicitly associate the datatype "jms" with the java SerializationManager      //This is vital for performance reasons.      SerializationStreamFactory.setManagerClassName(         "jms", "org.jboss.remoting.serialization.impl.jboss.JBossSerializationManager");            JMSWireFormat wf = new JMSWireFormat();            MarshalFactory.addMarshaller("jms", wf, wf);                  String s = (String)mbeanServer.getAttribute(connectorName, "InvokerLocator");            locator = new InvokerLocator(s);            //FIXME Note - There seems to be a bug (feature?) in JBoss Remoting which if you specify      //a socket timeout on the invoker locator URI then it always makes a remote call      //even when in the same JVM      log.debug("LocatorURI: " + getLocatorURI());            // first remove the invocation handler specified in the config      // TODO: Why removing this? Isn't ServerPeer.stopService() supposed to remove it?      //       If it doesn't, fix ServerPeer.stopService(), don't add unnecessary behavior here.      mbeanServer.invoke(connectorName, "removeInvocationHandler",                         new Object[] { REMOTING_JMS_SUBSYSTEM },                         new String[] { "java.lang.String" });      // add the JMS subsystem invocation handler            handler = new JMSServerInvocationHandler();      mbeanServer.invoke(connectorName, "addInvocationHandler",                         new Object[] { REMOTING_JMS_SUBSYSTEM, handler},                         new String[] { "java.lang.String",                                        "org.jboss.remoting.ServerInvocationHandler"});            // install the connection listener that listens for failed connections      //      mbeanServer.invoke(connectorName, "setLeasePeriod",//            new Object[] {new Long(CONNECTION_LEASE_PERIOD)},//            new String[] {"long"});      mbeanServer.invoke(connectorName, "addConnectionListener",            new Object[] {connectionManager},            new String[] {"org.jboss.remoting.ConnectionListener"});           }