FileDocCategorySizeDatePackage
Client.javaAPI DocJBoss 4.2.12542Fri Jul 13 20:55:10 BST 2007org.jboss.tutorial.ejb21_client_adaptors.client

Client

public class Client extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidaccessDeploymentDescriptorHomes()

      InitialContext jndiContext = new InitialContext();
      Session1RemoteHome home = (Session1RemoteHome)jndiContext.lookup("DeploymentDescriptorSession1/home");
      Session1Remote session1 = home.create();
      String initValue1 = session1.getInitValue();
      System.out.println("DeploymentDescriptor Session1 init value is " + initValue1);
      
      String initValue2 = session1.getLocalSession2InitValue();
      System.out.println("DeploymentDescriptor Session2 init value is " + initValue2);
   
public static voidaccessHomes()

      InitialContext jndiContext = new InitialContext();
      Session1RemoteHome home = (Session1RemoteHome)jndiContext.lookup("Session1/home");
      Session1Remote session1 = home.create();
      String initValue1 = session1.getInitValue();
      System.out.println("Session1 init value is " + initValue1);
      
      String initValue2 = session1.getLocalSession2InitValue();
      System.out.println("Session2 init value is " + initValue2);
   
public static voidmain(java.lang.String[] args)

      accessHomes();
      
      accessDeploymentDescriptorHomes();