User: patriot1burke
  Date: 01/09/26 20:16:55

  Modified:    src/main/org/jboss/ejb/plugins/jrmp/server
                        JRMPContainerInvoker.java
  Log:
  Modified to make this class more extendable.
  
  Revision  Changes    Path
  1.44      +31 -14    
jboss/src/main/org/jboss/ejb/plugins/jrmp/server/JRMPContainerInvoker.java
  
  Index: JRMPContainerInvoker.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/server/JRMPContainerInvoker.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- JRMPContainerInvoker.java 2001/09/11 18:35:01     1.43
  +++ JRMPContainerInvoker.java 2001/09/27 03:16:55     1.44
  @@ -63,7 +63,7 @@
    *  @author <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>
    *  @author <a href="mailto:[EMAIL PROTECTED]";>Ole Husgaard</a>
    *  @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
  - *  @version $Revision: 1.43 $
  + *  @version $Revision: 1.44 $
    */
   public class JRMPContainerInvoker
   extends RemoteServer
  @@ -246,8 +246,7 @@
         try
         {
            // Export CI
  -         UnicastRemoteObject.exportObject(this, rmiPort,
  -         clientSocketFactory, serverSocketFactory);
  +         exportCI();
            GenericProxy.addLocal(container.getBeanMetaData().getJndiName(), this);
            
            InitialContext context = new InitialContext();
  @@ -285,9 +284,10 @@
            InitialContext ctx = new InitialContext();
            ctx.unbind(container.getBeanMetaData().getJndiName());
            ctx.unbind("invokers/"+container.getBeanMetaData().getJndiName());
  -         
  -         UnicastRemoteObject.unexportObject(this, true);
  -      } catch (Exception e)
  +
  +         unexportCI();
  +      } 
  +      catch (Exception e)
         {
            // ignore.
         }
  @@ -487,14 +487,7 @@
         else
            jdk122 = true;
         
  -      // Create delegate depending on JDK version
  -      if (jdk122)
  -      {
  -         ciDelegate = new 
org.jboss.ejb.plugins.jrmp12.server.JRMPContainerInvoker(this);
  -      } else
  -      {
  -         ciDelegate = new 
org.jboss.ejb.plugins.jrmp13.server.JRMPContainerInvoker(this);
  -      }
  +      createCIDelegate();
         
         try
         {
  @@ -554,6 +547,30 @@
      // Package protected ---------------------------------------------
      
      // Protected -----------------------------------------------------
  +
  +   protected void exportCI() throws Exception
  +   {
  +      UnicastRemoteObject.exportObject(this, rmiPort,
  +                                       clientSocketFactory, serverSocketFactory);
  +   }
  +
  +   protected void unexportCI() throws Exception
  +   {
  +      UnicastRemoteObject.unexportObject(this, true);
  +   }
  +
  +   protected void createCIDelegate() throws DeploymentException
  +   {
  +      // Create delegate depending on JDK version
  +      if (jdk122)
  +      {
  +         ciDelegate = new 
org.jboss.ejb.plugins.jrmp12.server.JRMPContainerInvoker(this);
  +      } else
  +      {
  +         ciDelegate = new 
org.jboss.ejb.plugins.jrmp13.server.JRMPContainerInvoker(this);
  +      }
  +   }
  +
      protected void rebind(Context ctx, String name, Object val)
      throws NamingException
      {
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to