dain        2005/03/23 03:23:25

  Modified:    modules/core/src/java/org/openejb/server/ejbd
                        EJBInvocationStream.java EjbDaemon.java
                        EjbRequestHandler.java EjbServer.java
                        EjbServerGBean.java
  Log:

  Extracted a simple ORBRef interface from the CORBABean
  Added ORBRef to EJBRequest so incoming corba objects can be attached to the 
local orb
  The ORBRef object is optional, and if null the stubs are not attached
  
  Revision  Changes    Path
  1.5       +6 -3      
openejb/modules/core/src/java/org/openejb/server/ejbd/EJBInvocationStream.java
  
  Index: EJBInvocationStream.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/server/ejbd/EJBInvocationStream.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EJBInvocationStream.java  27 Feb 2005 00:49:07 -0000      1.4
  +++ EJBInvocationStream.java  23 Mar 2005 08:23:23 -0000      1.5
  @@ -50,13 +50,12 @@
   

   import org.apache.geronimo.core.service.InvocationKey;

   import org.apache.geronimo.transaction.context.TransactionContext;

  -import org.openejb.EJBContainer;

   import org.openejb.EJBInstanceContext;

   import org.openejb.EJBInterfaceType;

   import org.openejb.EJBInvocation;

   import org.openejb.EJBInvocationImpl;

  +import org.openejb.corba.ORBRef;

   import org.openejb.client.EJBRequest;

  -import org.openejb.proxy.EJBProxyFactory;

   

   public class EJBInvocationStream extends EJBRequest implements EJBInvocation 
{

   

  @@ -69,6 +68,10 @@
   

       public EJBInvocationStream() {

           super();

  +    }

  +

  +    public EJBInvocationStream(ORBRef orbRef) {

  +        super(orbRef);

       }

   

       public EJBInvocationStream(int requestMethod) {

  
  
  
  1.5       +5 -4      
openejb/modules/core/src/java/org/openejb/server/ejbd/EjbDaemon.java
  
  Index: EjbDaemon.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/server/ejbd/EjbDaemon.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EjbDaemon.java    12 Apr 2004 08:31:41 -0000      1.4
  +++ EjbDaemon.java    23 Mar 2005 08:23:23 -0000      1.5
  @@ -60,6 +60,7 @@
   import org.apache.commons.logging.LogFactory;
   
   import org.openejb.ContainerIndex;
  +import org.openejb.corba.ORBRef;
   import org.openejb.client.RequestMethods;
   import org.openejb.client.ResponseCodes;
   import org.openejb.proxy.ProxyInfo;
  @@ -85,14 +86,14 @@
       private final AuthRequestHandler authHandler;
   
       private EjbDaemon() throws Exception {
  -        this(ContainerIndex.getInstance());
  +        this(ContainerIndex.getInstance(), null);
       }
   
  -    public EjbDaemon(ContainerIndex containerIndex) throws Exception {
  +    public EjbDaemon(ContainerIndex containerIndex, ORBRef orbRef) throws 
Exception {
           clientObjectFactory = new ClientObjectFactory(containerIndex);
   
           // Request Handlers
  -        ejbHandler = new EjbRequestHandler(containerIndex);
  +        ejbHandler = new EjbRequestHandler(containerIndex, orbRef);
           jndiHandler = new JndiRequestHandler(containerIndex);
           authHandler = new AuthRequestHandler();
       }
  
  
  
  1.18      +6 -3      
openejb/modules/core/src/java/org/openejb/server/ejbd/EjbRequestHandler.java
  
  Index: EjbRequestHandler.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/server/ejbd/EjbRequestHandler.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- EjbRequestHandler.java    21 Feb 2005 08:55:27 -0000      1.17
  +++ EjbRequestHandler.java    23 Mar 2005 08:23:23 -0000      1.18
  @@ -62,6 +62,7 @@
   import org.openejb.ContainerIndex;
   import org.openejb.EJBContainer;
   import org.openejb.InvalidateReferenceException;
  +import org.openejb.corba.ORBRef;
   import org.openejb.client.EJBRequest;
   import org.openejb.client.EJBResponse;
   import org.openejb.client.RequestMethods;
  @@ -74,9 +75,11 @@
   
       private static final Log log = 
LogFactory.getLog(EjbRequestHandler.class);
       private final ContainerIndex containerIndex;
  +    private final ORBRef orbRef;
   
   
  -    EjbRequestHandler(ContainerIndex containerIndex) {
  +    EjbRequestHandler(ContainerIndex containerIndex, ORBRef orbRef) {
  +        this.orbRef = orbRef;
   
           if (containerIndex == null) {
               containerIndex = ContainerIndex.getInstance();
  @@ -89,7 +92,7 @@
   
           EJBObjectInputStream in = (EJBObjectInputStream) input;
   
  -        EJBInvocationStream req = new EJBInvocationStream();
  +        EJBInvocationStream req = new EJBInvocationStream(orbRef);
   
           EJBResponse res = new EJBResponse();
   
  
  
  
  1.5       +4 -3      
openejb/modules/core/src/java/org/openejb/server/ejbd/EjbServer.java
  
  Index: EjbServer.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/server/ejbd/EjbServer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EjbServer.java    22 Dec 2004 05:42:38 -0000      1.4
  +++ EjbServer.java    23 Mar 2005 08:23:24 -0000      1.5
  @@ -54,6 +54,7 @@
   import org.openejb.server.ServerService;
   import org.openejb.ContainerIndex;
   import org.openejb.OpenEJB;
  +import org.openejb.corba.ORBRef;
   
   /**
    * @since 11/25/2001
  @@ -71,8 +72,8 @@
           ejbDaemon = EjbDaemon.getEjbDaemon();
       }
   
  -    public EjbServer(ContainerIndex containerIndex) throws Exception {
  -        ejbDaemon = new EjbDaemon(containerIndex);
  +    public EjbServer(ContainerIndex containerIndex, ORBRef orbRef) throws 
Exception {
  +        ejbDaemon = new EjbDaemon(containerIndex, orbRef);
       }
   
       public void init(Properties props) throws Exception {
  
  
  
  1.3       +4 -2      
openejb/modules/core/src/java/org/openejb/server/ejbd/EjbServerGBean.java
  
  Index: EjbServerGBean.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/server/ejbd/EjbServerGBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EjbServerGBean.java       6 Mar 2005 02:49:39 -0000       1.2
  +++ EjbServerGBean.java       23 Mar 2005 08:23:24 -0000      1.3
  @@ -53,6 +53,7 @@
   import org.apache.geronimo.kernel.GBeanNotFoundException;
   import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
   import org.openejb.ContainerIndex;
  +import org.openejb.corba.ORBRef;
   import org.openejb.server.SocketService;
   
   public class EjbServerGBean {
  @@ -64,8 +65,9 @@
   
           infoFactory.addInterface(SocketService.class);
           infoFactory.addReference("ContainerIndex", ContainerIndex.class, 
NameFactory.GERONIMO_SERVICE);
  +        infoFactory.addReference("ORBRef", ORBRef.class, 
NameFactory.CORBA_SERVICE);
   
  -        infoFactory.setConstructor(new String[]{"ContainerIndex"});
  +        infoFactory.setConstructor(new String[]{"ContainerIndex", "ORBRef"});
   
           GBEAN_INFO = infoFactory.getBeanInfo();
       }
  
  
  

Reply via email to