FileDocCategorySizeDatePackage
ServiceWeb.javaAPI DocJBoss 4.2.12800Fri Jul 13 20:53:18 BST 2007org.jboss.ejb3.test.clusteredservice

ServiceWeb

public class ServiceWeb extends Object implements javax.xml.rpc.server.ServiceLifecycle
version
$Revision: 60233 $
author
William DeCoste

Fields Summary
ServiceRemote
service
Constructors Summary
public ServiceWeb()

Methods Summary
public voiddestroy()

 
   
private javax.naming.InitialContextgetContext()

 
      Properties p = new Properties(); 
      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); 
      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces"); 
      p.put("jnp.partitionName", "HASingletonPartition"); 
      return new InitialContext(p); 
   
public voidinit(java.lang.Object object)

 
      try
      { 
         service = (ServiceRemote) PortableRemoteObject.narrow( 
               getContext().lookup("ServiceBean/remote"), ServiceRemote.class); 
      } catch (NamingException e)
      { 
         e.printStackTrace(); 
         throw new ServiceException("Could not find Service in JNDI service", e); 
      } 
   
public voidremoteMethod()

 
      System.out.println("ServiceWeb.remoteMethod"); 
      try
      { 
         service.remoteMethod(); 
      } catch (Exception e)
      {
         e.printStackTrace(); 
      }