Author: ron.sigal(a)jboss.com
Date: 2008-08-01 01:52:52 -0400 (Fri, 01 Aug 2008)
New Revision: 4456
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallLoaderFactory.java
Log:
JBREM-1000: arshallerLoaderHandler gets repositories set and MBeanServer.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallLoaderFactory.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallLoaderFactory.java 2008-08-01
05:52:08 UTC (rev 4455)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallLoaderFactory.java 2008-08-01
05:52:52 UTC (rev 4456)
@@ -23,7 +23,11 @@
package org.jboss.remoting.marshal;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+
+import javax.management.MBeanServer;
+
import org.jboss.logging.Logger;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.transport.Connector;
@@ -43,9 +47,11 @@
* listen on. Will return null if can not create the connector.
*
* @param locator
+ * @param repositories
+ * @param mbeanServer
* @return
*/
- public static Connector createMarshallLoader(InvokerLocator locator)
+ public static Connector createMarshallLoader(InvokerLocator locator, List
repositories, MBeanServer mbeanServer)
{
Connector marshallerConnector = null;
try
@@ -54,8 +60,11 @@
marshallerConnector.setInvokerLocator(locator.getLocatorURI());
marshallerConnector.start();
- MarshallerLoaderHandler loader = new MarshallerLoaderHandler();
+ MarshallerLoaderHandler loader = new MarshallerLoaderHandler(repositories);
marshallerConnector.addInvocationHandler("loader", loader);
+
+ // Set after Connector.addInvocationHandler(), which also sets MBeanServer.
+ loader.setMBeanServer(mbeanServer);
}
catch(Exception e)
{
Show replies by date