User: schaefera
  Date: 01/05/21 22:08:00

  Modified:    src/main/org/jboss/deployment J2eeDeployer.java
  Log:
  Modified the EJB deployment therefore that it can report the deployed
  EJBs for a given application to the Data Collector.
  
  Revision  Changes    Path
  1.26      +20 -21    jboss/src/main/org/jboss/deployment/J2eeDeployer.java
  
  Index: J2eeDeployer.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/deployment/J2eeDeployer.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- J2eeDeployer.java 2001/05/21 19:49:10     1.25
  +++ J2eeDeployer.java 2001/05/22 05:07:59     1.26
  @@ -71,7 +71,7 @@
   *   @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Schulze</a>
   *   @author Toby Allsopp ([EMAIL PROTECTED])
   *   @author [EMAIL PROTECTED]
  -*   @version $Revision: 1.25 $
  +*   @version $Revision: 1.26 $
   */
   public class J2eeDeployer 
   extends ServiceMBeanSupport
  @@ -215,16 +215,14 @@
   
          try
          {
  -               startApplication (d);
  -               log.log ("J2EE application: " + _url + " is deployed.");
           try {
               // Now the application is deployed add it to the server data collector
  -            Application lApplication = convert2Application( _url, d );
  +            Application lApplication = convert2Application( d.getName(), d );
               server.invoke(
                  lCollector,
                  "saveApplication",
                  new Object[] {
  -                  _url,
  +                  d.getName(),
                     lApplication
                  },
                  new String[] {
  @@ -236,6 +234,8 @@
           catch( Exception e ) {
              log.log ("Report of deployment of J2EE application: " + _url + " could 
not be reported.");
           }
  +               startApplication (d);
  +               log.log ("J2EE application: " + _url + " is deployed.");
         } 
         catch (Exception _e)
         {
  @@ -475,7 +475,8 @@
            tmp.toArray( jarUrls );
            // Call the ContainerFactory that is loaded in the JMX server
            server.invoke(jarDeployer, "deploy",
  -            new Object[]{ _d.localUrl.toString(), jarUrls }, new String[]{ 
String.class.getName(), String[].class.getName() } );
  +            new Object[]{ _d.localUrl.toString(), jarUrls, moduleName },
  +            new String[]{ String.class.getName(), String[].class.getName(), 
String.class.getName() } );
   
            // Deploy the web application modules
            it = _d.webModules.iterator ();
  @@ -495,7 +496,6 @@
               // since tomcat changes the context classloader...
               Thread.currentThread().setContextClassLoader (appCl);
            }
  -
         }
         catch (MBeanException _mbe)
         {
  @@ -713,40 +713,39 @@
         String pId,
         Deployment pDeployment
      ) {
  -      Collection lModules = new ArrayList();
  +      // Create Applications
  +      Application lApplication = new Application(
  +         pId,
  +         "DD:FixeLater"
  +      );
         // Go through web applications
         Iterator i = pDeployment.webModules.iterator();
         Collection lItems = new ArrayList();
         while( i.hasNext() ) {
            Deployment.Module lModule = (Deployment.Module) i.next();
            // Add a Web Module
  -         lModules.add(
  +         lApplication.saveModule(
  +            Application.SERVLETS,
               new Module(
                  lModule.webContext,
  -               "DD:FixeLater",
  -               null
  +               "DD:FixeLater"
               )
            );
         }
         // Go through ejb applications
  -      i = pDeployment.webModules.iterator();
  +      i = pDeployment.ejbModules.iterator();
         lItems = new ArrayList();
         while( i.hasNext() ) {
            Deployment.Module lModule = (Deployment.Module) i.next();
            // Add an EJB Module
  -         lModules.add(
  +         lApplication.saveModule(
  +            Application.EJBS,
               new Module(
                  ( (URL) lModule.localUrls.firstElement() ).getFile(),
  -               "DD:FixeLater",
  -               null
  +               "DD:FixeLater"
               )
            );
         }
  -      // Create Applications
  -      return new Application(
  -         pId,
  -         "DD:FixeLater",
  -         lModules
  -      );
  +      return lApplication;
      }
   }
  
  
  

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

Reply via email to