User: starksm 
  Date: 01/09/08 21:39:31

  Modified:    src/main/org/jboss/deployment Tag: Branch_2_4
                        J2eeDeployer.java
  Added:       src/main/org/jboss/deployment Tag: Branch_2_4
                        DeploymentNotification.java
  Log:
  Add deploy and undeploy jmx event notifications. The event type is
  org.jboss.deployment.DeploymentNotification
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.31.2.2  +19 -5     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.31.2.1
  retrieving revision 1.31.2.2
  diff -u -r1.31.2.1 -r1.31.2.2
  --- J2eeDeployer.java 2001/08/03 20:36:27     1.31.2.1
  +++ J2eeDeployer.java 2001/09/09 04:39:31     1.31.2.2
  @@ -68,11 +68,11 @@
   *   @author <a href="mailto:[EMAIL PROTECTED]";>Daniel Schulze</a>
   *   @author Toby Allsopp ([EMAIL PROTECTED])
   *   @author [EMAIL PROTECTED]
  -*   @version $Revision: 1.31.2.1 $
  +*   @version $Revision: 1.31.2.2 $
   */
   public class J2eeDeployer 
  -extends ServiceMBeanSupport
  -implements J2eeDeployerMBean
  +   extends ServiceMBeanSupport
  +   implements J2eeDeployerMBean
   {
      // Constants -----------------------------------------------------
      public File DEPLOYMENT_DIR = null;//"/home/deployment"; // default? MUST BE 
ABSOLUTE PATH!!!
  @@ -458,16 +458,24 @@
         // save the application classloader for later
         ClassLoader appCl = Thread.currentThread().getContextClassLoader();
   
  +      DeploymentNotification evt = new DeploymentNotification( this, 
nextSequenceNumber(),
  +         _d, DeploymentNotification.PREDEPLOY );
  +      sendNotification(evt);
  +
          // <comment author="cgjung">module deployment factored out for subclass
         // access </comment>
         // redirect all modules to the responsible deployers
         startModules(_d,appCl,oldCl);     
  +      evt = new DeploymentNotification( this, nextSequenceNumber(),
  +         _d, DeploymentNotification.POSTDEPLOY );
  +      sendNotification(evt);
      }
  -   
  +
      /** factored out method to start individual modules and reinstall
       *  context classloader afterwards
       */
  -   protected void startModules(Deployment _d, ClassLoader appCl, ClassLoader oldCl) 
throws J2eeDeploymentException {
  +   protected void startModules(Deployment _d, ClassLoader appCl, ClassLoader oldCl) 
throws J2eeDeploymentException
  +   {
          Deployment.Module m = null;
          String moduleName = null;
          String message;
  @@ -543,6 +551,9 @@
         // save the old classloader, tomcat replaces my classloader somehow?!
         ClassLoader oldCl = Thread.currentThread().getContextClassLoader ();
         StringBuffer error = new StringBuffer ();
  +      DeploymentNotification evt = new DeploymentNotification( this, 
nextSequenceNumber(),
  +         _d, DeploymentNotification.PREUNDEPLOY );
  +      sendNotification(evt);
   
         // stop the web modules
         if( warDeployer != null )
  @@ -569,6 +580,9 @@
   
         // restore the classloader
         Thread.currentThread().setContextClassLoader (oldCl);
  +      evt = new DeploymentNotification( this, nextSequenceNumber(),
  +         _d, DeploymentNotification.POSTUNDEPLOY );
  +      sendNotification(evt);
      }
   
      private void stopModule( ObjectName container, String moduleName, String 
moduleUrl, StringBuffer error )
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +118 -0    
jboss/src/main/org/jboss/deployment/Attic/DeploymentNotification.java
  
  
  
  

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

Reply via email to