1 9 package org.jboss.portal.core.modules; 10 11 import javax.naming.InitialContext ; 12 13 import org.jboss.naming.NonSerializableFactory; 14 import org.jboss.portal.server.util.Service; 15 16 22 public class AbstractModule extends Service 23 { 24 25 protected String JNDIName; 26 27 30 public String getJNDIName() 31 { 32 return JNDIName; 33 } 34 35 38 public void setJNDIName(String JNDIName) 39 { 40 this.JNDIName = JNDIName; 41 } 42 43 protected void startService() throws Exception 44 { 45 NonSerializableFactory.rebind(new InitialContext (), JNDIName, this); 46 } 47 48 public void stopService() throws Exception 49 { 50 NonSerializableFactory.unbind(JNDIName); 51 } 52 } 53 | Popular Tags |