User: fleury  
  Date: 00/06/01 16:23:26

  Modified:    src/main/org/jboss/ejb Container.java ContainerFactory.java
                        EntityContainer.java
  Log:
  simpler ContainerFactory by moving the Invoker, all teh methods in the Invoker map 
entity and session case so that there is no need to extend it and we can work from the 
basic type
  
  Revision  Changes    Path
  1.11      +7 -1      jboss/src/main/org/jboss/ejb/Container.java
  
  Index: Container.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/Container.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Container.java    2000/06/01 20:46:58     1.10
  +++ Container.java    2000/06/01 23:23:26     1.11
  @@ -63,7 +63,7 @@
    *   @see ContainerFactory
    *   @author Rickard �berg ([EMAIL PROTECTED])
    *    @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  - *   @version $Revision: 1.10 $
  + *   @version $Revision: 1.11 $
    */
   public abstract class Container
   {
  @@ -161,6 +161,12 @@
      public InstancePool getInstancePool() 
        { 
                return instancePool; 
  +     }
  +     
  +     
  +     public ContainerInvoker getContainerInvoker() 
  +     { 
  +             return containerInvoker; 
        }
        
      public void addInterceptor(Interceptor in) 
  
  
  
  1.15      +16 -3     jboss/src/main/org/jboss/ejb/ContainerFactory.java
  
  Index: ContainerFactory.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ContainerFactory.java     2000/06/01 21:02:12     1.14
  +++ ContainerFactory.java     2000/06/01 23:23:26     1.15
  @@ -59,7 +59,7 @@
   *   @see Container
   *   @author Rickard �berg ([EMAIL PROTECTED])
   *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.14 $
  +*   @version $Revision: 1.15 $
   */
   public class ContainerFactory
   implements ContainerFactoryMBean, MBeanRegistration
  @@ -234,7 +234,7 @@
                                        {
                                                boolean implemented = false;
                                                
  -                                             if (!implemented) throw new 
Error("Stateful Container not implemented yet");
  +                                             //if (!implemented) throw new 
Error("Stateful Container not implemented yet");
                                                
                                                // Create container
                                                con = new StatefulSessionContainer();
  @@ -366,7 +366,14 @@
                        for (int i = 0; i < containers.size(); i++)
                        {
                                Container con = (Container)containers.get(i);
  -                             if (con instanceof EntityContainer)
  +                             System.out.println("Binding container 
"+con.getMetaData().getJndiName());
  +                             if (!(con instanceof StatefulSessionContainer))
  +                             rebind(ctx, con.getMetaData().getJndiName(), 
con.getContainerInvoker().getEJBHome());
  +                                     
  +                             // Done
  +                             log.log("Bound "+con.getMetaData().getEjbName() + " to 
" + con.getMetaData().getJndiName());
  +                             
  +                             /*if (con instanceof EntityContainer)
                                {
                                        rebind(ctx, con.getMetaData().getJndiName(), 
((EntityContainer)con).getContainerInvoker().getEJBHome());
                                        
  @@ -378,7 +385,13 @@
                                        
                                        // Done
                                        log.log("Bound 
"+con.getMetaData().getEjbName() + " to " + con.getMetaData().getJndiName());
  +                             } else if (con instanceof StatefulSessionContainer) 
  +                         {
  +                                 rebind(ctx, con.getMetaData().getJndiName(), 
((StatefulSessionContainer) con).getContainerInvoker().getEJBHome());
  +                         log.log("Bound "+con.getMetaData().getEjbName() + " to " + 
con.getMetaData().getJndiName());
                                }
  +                             */
  +                             
                        }
                        
                        // Add to webserver so client can access classes through 
dynamic class downloading
  
  
  
  1.7       +2 -6      jboss/src/main/org/jboss/ejb/EntityContainer.java
  
  Index: EntityContainer.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/EntityContainer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EntityContainer.java      2000/06/01 20:58:40     1.6
  +++ EntityContainer.java      2000/06/01 23:23:26     1.7
  @@ -32,7 +32,8 @@
    *   @see Container
    *   @see EntityEnterpriseContext
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.6 $
  + *   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  + *   @version $Revision: 1.7 $
    */
   public class EntityContainer
      extends Container
  @@ -63,11 +64,6 @@
         ci.setContainer(this);
      }
   
  -   public ContainerInvoker getContainerInvoker() 
  -   { 
  -     return containerInvoker; 
  -   }
  -     
      public void setInstanceCache(InstanceCache ic)
      { 
         if (ic == null)
  
  
  

Reply via email to