1 22 package org.jboss.tutorial.ejb21_client_adaptors.bean; 23 24 import javax.naming.*; 25 26 import org.jboss.ejb3.Container; 27 import org.jboss.logging.Logger; 28 29 33 public class DeploymentDescriptorSession1Bean 34 { 35 private static final Logger log = Logger.getLogger(DeploymentDescriptorSession1Bean.class); 36 37 private String initValue = null; 38 39 public String getInitValue() 40 { 41 return initValue; 42 } 43 44 public String getLocalSession2InitValue() throws Exception 45 { 46 InitialContext jndiContext = new InitialContext(); 47 Session2LocalHome home = (Session2LocalHome)jndiContext.lookup(Container.ENC_CTX_NAME + "/env/session2"); 48 Session2Local session2 = home.create("initialized"); 49 return session2.getInitValue(); 50 } 51 52 public void ejbCreate() 53 { 54 initValue = "initialized"; 55 } 56 57 } 58 | Popular Tags |