FileDocCategorySizeDatePackage
ServiceRemoteProxyFactory.javaAPI DocJBoss 4.2.13809Fri Jul 13 20:53:50 BST 2007org.jboss.ejb3.service

ServiceRemoteProxyFactory

public class ServiceRemoteProxyFactory extends BaseServiceProxyFactory implements org.jboss.ejb3.remoting.RemoteProxyFactory
author
Kabir Khan
version
$Revision: 57207 $

Fields Summary
private org.jboss.annotation.ejb.RemoteBinding
binding
private org.jboss.remoting.InvokerLocator
locator
Constructors Summary
Methods Summary
public java.lang.ObjectcreateProxy()

      try
      {
         Object containerId = container.getObjectName().getCanonicalName();
         String stackName = "ServiceClientInterceptors";
         if (binding.interceptorStack() != null && !binding.interceptorStack().equals(""))
         {
            stackName = binding.interceptorStack();
         }
         AdviceStack stack = AspectManager.instance().getAdviceStack(stackName);
         Object[] args = {new ServiceRemoteProxy(containerId, stack.createInterceptors((Advisor) container, null), locator)};
         return proxyConstructor.newInstance(args);
      }
      catch (InstantiationException e)
      {
         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
      }
      catch (IllegalAccessException e)
      {
         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
      }
      catch (IllegalArgumentException e)
      {
         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
      }
      catch (InvocationTargetException e)
      {
         throw new RuntimeException(e.getTargetException());  //To change body of catch statement use Options | File Templates.
      }
   
protected java.lang.Class[]getInterfaces()

      Class[] remoteInterfaces = ProxyFactoryHelper.getRemoteInterfaces(container);
      Class[] interfaces = new Class[remoteInterfaces.length + 1];
      System.arraycopy(remoteInterfaces, 0, interfaces, 0, remoteInterfaces.length);
      interfaces[remoteInterfaces.length] = JBossProxy.class;
      return interfaces;
   
protected voidinitializeJndiName()

      jndiName = ProxyFactoryHelper.getRemoteJndiName(container, binding);
   
public voidsetRemoteBinding(org.jboss.annotation.ejb.RemoteBinding binding)

      this.binding = binding;
   
public voidstart()

      String clientBindUrl = ProxyFactoryHelper.getClientBindUrl(binding);
      locator = new InvokerLocator(clientBindUrl);
      super.start();