FileDocCategorySizeDatePackage
BaseSessionProxyFactory.javaAPI DocJBoss 4.2.13847Fri Jul 13 20:53:48 BST 2007org.jboss.ejb3.session

BaseSessionProxyFactory

public abstract class BaseSessionProxyFactory extends Object implements org.jboss.ejb3.ProxyFactory
Comment
author
William DeCoste
version
$Revision: 61670 $

Fields Summary
private static final Logger
log
protected org.jboss.ejb3.Container
container
protected org.jboss.aop.Advisor
advisor
Constructors Summary
Methods Summary
public java.lang.ObjectcreateHomeProxy()

  
     
   
      throw new RuntimeException("NYI");
   
protected javax.ejb.EJBMetaDatagetEjbMetaData()

      Class remote = null;
      Class home = null;
      Class pkClass = Object.class;
      HomeHandleImpl homeHandle = null;
      
      EJBContainer ejbContainer = (EJBContainer)container;
      
      Remote remoteAnnotation = (Remote)ejbContainer.resolveAnnotation(Remote.class);
      if (remoteAnnotation != null)
         remote = remoteAnnotation.value()[0];
      RemoteHome homeAnnotation = (RemoteHome)ejbContainer.resolveAnnotation(RemoteHome.class);
      if (homeAnnotation != null)
         home = homeAnnotation.value();
      RemoteBinding remoteBindingAnnotation = (RemoteBinding)ejbContainer.resolveAnnotation(RemoteBinding.class);
      if (remoteBindingAnnotation != null)
         homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding());
      
      EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);
      
      return metadata;
   
protected abstract javax.ejb.HandlegetHandle()

protected javax.ejb.HomeHandlegetHomeHandle()

      EJBContainer ejbContainer = (EJBContainer)container;
      
      HomeHandleImpl homeHandle = null;
      
      RemoteBinding remoteBindingAnnotation = (RemoteBinding)ejbContainer.resolveAnnotation(RemoteBinding.class);
      if (remoteBindingAnnotation != null)
         homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(container));
      
      return homeHandle;
   
public voidsetContainer(org.jboss.ejb3.Container container)

      this.container = container;
      this.advisor = (Advisor) container;
   
protected voidsetEjb21Objects(BaseSessionRemoteProxy proxy)

      proxy.setHandle(getHandle());
      proxy.setHomeHandle(getHomeHandle());
      proxy.setEjbMetaData(getEjbMetaData());