dblevins    2004/04/13 23:27:22

  Modified:    modules/core/src/java/org/openejb GenericEJBContainer.java
  Log:

  Setup jndi url handler in container constructor
  Fixed part of our serialization problems.  More to come....
  
  Revision  Changes    Path
  1.9       +17 -2     
openejb/modules/core/src/java/org/openejb/GenericEJBContainer.java
  
  Index: GenericEJBContainer.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/GenericEJBContainer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- GenericEJBContainer.java  13 Apr 2004 20:18:49 -0000      1.8
  +++ GenericEJBContainer.java  14 Apr 2004 03:27:22 -0000      1.9
  @@ -129,8 +129,13 @@
           if (userTransaction != null) {
               userTransaction.setUp(transactionManager, trackedConnectionAssociator);
           }
  +        
  +        // TODO maybe there is a more suitable place to do this.  Maybe not.
  +        
  +        setupJndi();
       }
   
  +    
       public InvocationResult invoke(Invocation invocation) throws Throwable {
           return interceptor.invoke(invocation);
       }
  @@ -241,7 +246,17 @@
           System.arraycopy(names, 0, copy, 0, length);
           return copy;
       }
  -
  +    
  +    private void setupJndi() {
  +        /* Add Geronimo JNDI service ///////////////////// */
  +        String str = System.getProperty(javax.naming.Context.URL_PKG_PREFIXES);
  +        if (str == null)
  +            str = ":org.apache.geronimo.naming";
  +        else
  +            str = str + ":org.apache.geronimo.naming";
  +        System.setProperty(javax.naming.Context.URL_PKG_PREFIXES, str);
  +    }
  +    
       public static final GBeanInfo GBEAN_INFO;
   
       static {
  
  
  

Reply via email to