1 22 package org.jboss.mq.il.rmi; 23 24 import java.util.Properties ; 25 26 import org.jboss.mq.il.ServerIL; 27 import org.jboss.mq.il.ServerILFactory; 28 29 37 public class RMIServerILService extends org.jboss.mq.il.ServerILJMXService implements RMIServerILServiceMBean 38 { 39 RMIServerIL serverIL; 40 41 46 public String getName() 47 { 48 return "JBossMQ-JVMServerIL"; 49 } 50 51 58 public ServerIL getServerIL() 59 { 60 return serverIL; 61 } 62 63 70 public java.util.Properties getClientConnectionProperties() 71 { 72 Properties rc = super.getClientConnectionProperties(); 73 rc.setProperty(ServerILFactory.CLIENT_IL_SERVICE_KEY, "org.jboss.mq.il.rmi.RMIClientILService"); 74 return rc; 75 } 76 77 82 public void startService() throws Exception 83 { 84 super.startService(); 85 serverIL = new RMIServerIL(getJMSServer()); 86 bindJNDIReferences(); 87 88 } 89 90 93 public void stopService() throws Exception 94 { 95 try 96 { 97 unbindJNDIReferences(); 98 } 99 catch (Exception e) 100 { 101 e.printStackTrace(); 102 } 103 super.stopService(); 104 serverIL = null; 105 } 106 } 107 | Popular Tags |