User: fleury  
  Date: 00/05/31 12:02:58

  Modified:    src/main/org/jboss/ejb Container.java
  Log:
  The Container assumes we have a pool which is not correct for Stateful beans.
  We introduce the "conditional" for now... maybe create a fantom pool if it turns out 
that others touch it.
  
  Revision  Changes    Path
  1.9       +9 -8      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Container.java    2000/05/30 18:32:15     1.8
  +++ Container.java    2000/05/31 19:02:58     1.9
  @@ -62,7 +62,7 @@
    *
    *   @see ContainerFactory
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.8 $
  + *   @version $Revision: 1.9 $
    */
   public abstract class Container
   {
  @@ -212,8 +212,9 @@
                // Setup "java:" namespace
         setupEnvironment();
         
  -             // Initialize pool
  -      instancePool.init();
  +             // Initialize pool 
  +             // MF FIXME: the instancePool does not belong here
  +      if (instancePool != null) instancePool.init();
         
           // Initialize the interceptor by calling the chain
         Interceptor in = interceptor;
  @@ -229,7 +230,7 @@
         throws Exception
      {
                // Start the instance pool
  -      instancePool.start();
  +      if (instancePool != null) instancePool.start();
         
                // Start all interceptors in the chain          
         Interceptor in = interceptor;
  @@ -243,7 +244,7 @@
      public void stop() 
      {
                // Stop the instance pool
  -      instancePool.stop();
  +      if (instancePool != null) instancePool.stop();
         
                // Stop all interceptors in the chain           
         Interceptor in = interceptor;
  @@ -257,7 +258,7 @@
      public void destroy() 
      {
                // Destroy the pool
  -      instancePool.destroy();
  +      if (instancePool != null) instancePool.destroy();
         
                // Destroy all the interceptors in the chain            
         Interceptor in = interceptor;
  @@ -323,8 +324,8 @@
                        // Associate this root with the classloader of the bean
              ((BeanClassLoader)getClassLoader()).setJNDIRoot(root);
                        
  -                     // Since the BCL is already associated with this thread we can 
start using the java: namespace directly
  -           Context ctx = (Context)new InitialContext().lookup("java:/");
  +               // Since the BCL is already associated with this thread we can start 
using the java: namespace directly
  +           Context ctx = (Context) new InitialContext().lookup("java:/");
              ctx.createSubcontext("comp");
              ctx = ctx.createSubcontext("comp/env");
              
  
  
  

Reply via email to