[jboss-cvs] JBossAS SVN: r64586 - branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 14 16:19:32 EDT 2007


Author: bdecoste
Date: 2007-08-14 16:19:32 -0400 (Tue, 14 Aug 2007)
New Revision: 64586

Modified:
   branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java
Log:
[EJBTHREE-1019] StatefulLocalProxyFactory is Externalizable - no more NonSerialableFactory

Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java	2007-08-14 20:19:01 UTC (rev 64585)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/stateless/BaseStatelessProxyFactory.java	2007-08-14 20:19:32 UTC (rev 64586)
@@ -49,16 +49,7 @@
 public abstract class BaseStatelessProxyFactory extends org.jboss.ejb3.session.BaseSessionProxyFactory implements ProxyFactory
 {
    private static final Logger log = Logger.getLogger(BaseStatelessProxyFactory.class);
-
-//   protected Class proxyClass;
-//   protected Constructor proxyConstructor;
-   protected Context proxyFactoryContext;
-   protected String jndiName;
    
-   private javassist.util.proxy.ProxyFactory proxyFactory;
-   private Class proxyClass;
-   private Constructor proxyConstructor;
-   
    /**
     * Adapt the JDK to cglib.
     * 
@@ -172,7 +163,7 @@
       Class[] interfaces = getInterfaces();
       
       /* plain jdk */
-      Class proxyClass = java.lang.reflect.Proxy.getProxyClass(container.getBeanClass().getClassLoader(), interfaces);
+      Class proxyClass = java.lang.reflect.Proxy.getProxyClass(getContainer().getBeanClass().getClassLoader(), interfaces);
       final Class[] constructorParams =
               {InvocationHandler.class};
       proxyConstructor = proxyClass.getConstructor(constructorParams);
@@ -227,31 +218,22 @@
 
    public void stop() throws Exception
    {
-      Util.unbind(container.getInitialContext(), jndiName);
+      Util.unbind(getContainer().getInitialContext(), jndiName);
    }
 
-   protected abstract Class[] getInterfaces();
-
    protected abstract void initializeJndiName();
 
    protected void bindProxy(Object proxy) throws NamingException
    {
       try
       {
-         log.debug("Binding proxy for " + container.getEjbName() + " in JNDI at " + jndiName);
-         Util.rebind(container.getInitialContext(), jndiName, proxy);
+         log.debug("Binding proxy for " + getContainer().getEjbName() + " in JNDI at " + jndiName);
+         Util.rebind(getContainer().getInitialContext(), jndiName, proxy);
       } catch (NamingException e)
       {
-         NamingException namingException = new NamingException("Could not bind stateless proxy with ejb name " + container.getEjbName() + " into JNDI under jndiName: " + container.getInitialContext().getNameInNamespace() + "/" + jndiName);
+         NamingException namingException = new NamingException("Could not bind stateless proxy with ejb name " + getContainer().getEjbName() + " into JNDI under jndiName: " + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName);
          namingException.setRootCause(e);
          throw namingException;
       }
    }
-   
-   public void setContainer(Container container)
-   {
-      this.container = container;
-      this.advisor = (Advisor) container;
-   }
-
 }




More information about the jboss-cvs-commits mailing list