User: schaefera
  Date: 01/11/27 16:40:31

  Modified:    src/main/org/jboss/ejb ContainerFactory.java
  Log:
  Fix for a problem with a NPE.
  
  Revision  Changes    Path
  1.101     +15 -6     jboss/src/main/org/jboss/ejb/ContainerFactory.java
  
  Index: ContainerFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- ContainerFactory.java     2001/11/27 06:15:26     1.100
  +++ ContainerFactory.java     2001/11/28 00:40:31     1.101
  @@ -70,7 +70,7 @@
   * @author <a href="mailto:[EMAIL PROTECTED]";>Peter Antman</a>.
   * @author <a href="mailto:[EMAIL PROTECTED]";>Scott Stark</a>
   * @author <a href="mailto:[EMAIL PROTECTED]";>Sacha Labourey</a>
  -* @version $Revision: 1.100 $
  +* @version $Revision: 1.101 $
   */
   public class ContainerFactory
      extends ServiceMBeanSupport
  @@ -391,13 +391,20 @@
         throws NamingException, Exception
      {
         // Create JSR-77 EJB-Module
  -      String lModule = EjbModule.create(
  +      int i = app.getName().lastIndexOf( "/" );
  +      String lName = app.getName().substring(
  +         i >= 0 ? i + 1 : 0
  +      );
  +      ObjectName lModule = EjbModule.create(
            getServer(),
            pParentId,
  -         pAppId,
  +         lName,
  +//         pAppId,
            url
  -      ).toString();
  -      app.setModuleName( lModule );
  +      );
  +      if( lModule != null ) {
  +         app.setModuleName( lModule.toString() );
  +      }
   
         // Create a file loader with which to load the files
         XmlFileLoader efm = new XmlFileLoader(validateDTDs);
  @@ -495,7 +502,9 @@
            // Remove deployment
            deployments.remove( url );
            // Remove JSR-77 Module
  -         EjbModule.destroy( getServer(), app.getModuleName() );
  +         if( app.getModuleName() != null ) {
  +            EjbModule.destroy( getServer(), app.getModuleName() );
  +         }
            // Done
            log.info( "Undeployed application: " + app.getName() );
         }
  
  
  

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

Reply via email to