User: fleury  
  Date: 00/05/23 23:53:52

  Modified:    src/main/org/jboss/ejb ContainerFactory.java Container.java
  Log:
  Comments and a factorization, not much really
  much ado about nothing
  
  Revision  Changes    Path
  1.5       +5 -1      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ContainerFactory.java     2000/05/23 05:35:24     1.4
  +++ ContainerFactory.java     2000/05/24 06:53:52     1.5
  @@ -59,7 +59,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.4 $
  + *   @version $Revision: 1.5 $
    */
   public class ContainerFactory
      implements ContainerFactoryMBean, MBeanRegistration
  @@ -153,6 +153,8 @@
                     con.addInterceptor(new StatelessSessionInstanceInterceptor());
                     con.addInterceptor(new SecurityInterceptor());
                     
  +                  con.addInterceptor(con.createContainerInterceptor());
  +                  
                     con.setClassLoader(new BeanClassLoader(cl));
                     con.setMetaData(bean);
                     
  @@ -191,6 +193,8 @@
                     con.addInterceptor(new EntityInstanceInterceptor());
                     con.addInterceptor(new SecurityInterceptor());
                     con.addInterceptor(new EntitySynchronizationInterceptor());
  +                 
  +                  con.addInterceptor(con.createContainerInterceptor());
                     
                     ContainerConfiguration conf = 
jar.getContainerConfigurations().getContainerConfiguration(bean.getConfigurationName());
                     
  
  
  
  1.6       +34 -2     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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Container.java    2000/05/19 07:11:48     1.5
  +++ Container.java    2000/05/24 06:53:52     1.6
  @@ -47,7 +47,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.5 $
  + *   @version $Revision: 1.6 $
    */
   public abstract class Container
   {
  @@ -144,6 +144,16 @@
      public TransactionManager getTransactionManager() { return transactionManager; }
      public void setTransactionManager(TransactionManager tm) { transactionManager = 
tm; }
      
  +   /*
  +   * init()
  +   *
  +   * The ContainerFactory calls this method.  The ContainerFactory has set all the 
  +   * plugins and interceptors that this bean requires and now proceeds to initialize
  +   * the chain.  The method looks for the standard classes in the URL, sets up
  +   * the naming environment of the bean.
  +   *
  +   */
  +   
      public void init()
         throws Exception
      {
  @@ -159,8 +169,11 @@
         instancePool.init();
         
         containerInvoker.init();
  +      
  +      // MF why addInterceptor here and not ContainerFactory? due to the protected?
  +      // dude this is hard, no comments, no hints, please throw the dog a bone man!
         
  -      addInterceptor(createContainerInterceptor());
  +      //addInterceptor(createContainerInterceptor());
         Interceptor in = interceptor;
         while (in != null)
         {
  @@ -280,9 +293,28 @@
         throws Exception;
         
      // Protected -----------------------------------------------------
  +   
  +   // MF WHY: why the protected here, it gives a rather strange structure to the 
init
      protected abstract Interceptor createContainerInterceptor();
      
      // Private -------------------------------------------------------
  +   
  +   /*
  +   * setupEnvironment
  +   *
  +   * This method sets up the naming environment of the bean.
  +   * it sets the root it creates for the naming in the "BeanClassLoader"
  +   * that loader shares the root for all instances of the bean and 
  +   * is part of the "static" metaData of the bean.
  +   * We create the java: namespace with properties, EJB-References, and 
  +   * DataSource ressources.
  +   *
  +   */
  +   
  +   // MF WHY: part of the issue is that some meta data information is 
  +   // kept in many classes. There 2 repositories of metaData in this case.
  +   // One is the BeanClassLoader the other the "bean" in Container.
  +   
      private void setupEnvironment()
         throws DeploymentException
      {
  
  
  

Reply via email to