1 6 7 package org.jfox.jndi.enc; 8 9 import javax.naming.Context ; 10 11 import org.jfox.ioc.common.AbstractService; 12 import org.jfox.ioc.ext.ActiveComponent; 13 import org.jfox.jndi.InitialContextHelper; 14 15 18 19 public class EnterpriseJNDIService extends AbstractService implements ActiveComponent { 20 private Context initCtx = InitialContextHelper.getInitialContext(); 21 22 public EnterpriseJNDIService() { 23 } 24 25 protected void doStart() throws Exception { 26 initCtx.bind(EnterpriseContextFactory.ENC_JNDI_NAME, new ENCReference()); 28 } 29 30 protected void doStop() throws Exception { 31 initCtx.unbind(EnterpriseContextFactory.ENC_JNDI_NAME); 32 } 33 34 protected void doInit() throws Exception { 35 initCtx = InitialContextHelper.getInitialContext(); 36 } 37 38 protected void doDestroy() throws Exception { 39 initCtx = null; 40 } 41 42 public void run() { 43 } 44 45 public static void main(String [] args) { 46 47 } 48 } 49 | Popular Tags |