1 22 package org.jboss.mq.kernel; 23 24 import java.util.Hashtable ; 25 import javax.naming.InitialContext ; 26 import javax.naming.NamingException ; 27 import org.jboss.mq.il.jvm.JVMServerILService; 28 import org.jboss.mq.il.Invoker; 29 30 36 public class JVMIL extends JVMServerILService 37 { 38 protected Hashtable initialContextProperties; 39 40 public void setJmsInvoker(Invoker invoker) 41 { 42 jmsServer = invoker; 43 } 44 45 public void setInitialContextProperties(Hashtable initialContextProperties) 46 { 47 this.initialContextProperties = initialContextProperties; 48 } 49 50 protected InitialContext getInitialContext() throws NamingException 51 { 52 InitialContext ctx = null; 53 if (initialContextProperties != null) 54 { 55 ctx = new InitialContext (initialContextProperties); 56 } 57 else ctx = new InitialContext (); 58 return ctx; 59 } 60 61 public void create() throws Exception 62 { 63 64 } 65 66 public void start() throws Exception 67 { 68 bindJNDIReferences(); 69 } 70 71 public void stop() 72 { 73 try 74 { 75 unbindJNDIReferences(); 76 } 77 catch (NamingException e) 78 { 79 throw new RuntimeException (e); 80 } 81 } 82 83 public void destroy() 84 { 85 } 86 87 } 88 | Popular Tags |