[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-cvs-commits
Subject: [jboss-cvs] jboss-management/src/main/org/jboss/management/j2ee J2EEApplication.java
From: Scott M Stark <starksm () users ! sourceforge ! net>
Date: 2003-05-31 23:06:10
[Download RAW message or body]
User: starksm
Date: 03/05/31 16:06:10
Modified: src/main/org/jboss/management/j2ee Tag: Branch_3_2
J2EEApplication.java
Log:
Handle that an ear deployed will result in two J2EEApplications due to the fact
that the ear module start notification is not received until after all content
modules have been created. The content modules will have created a place holder
J2EEApplication. This cleans up the "Could not create JSR-77 J2EEApplication..."
debug message.
Revision Changes Path
No revision
No revision
1.10.2.4 +10 -1 jboss-management/src/main/org/jboss/management/j2ee/J2EEApplication.java
Index: J2EEApplication.java
===================================================================
RCS file: /cvsroot/jboss/jboss-management/src/main/org/jboss/management/j2ee/J2EEApplication.java,v
retrieving revision 1.10.2.3
retrieving revision 1.10.2.4
diff -u -r1.10.2.3 -r1.10.2.4
--- J2EEApplication.java 13 Feb 2003 16:25:42 -0000 1.10.2.3
+++ J2EEApplication.java 31 May 2003 23:06:09 -0000 1.10.2.4
@@ -24,7 +24,7 @@
* {@link javax.management.j2ee.J2EEApplication J2EEApplication}.
*
* @author <a href="mailto:andreas@jboss.org">Andreas Schaefer</a>.
- * @version $Revision: 1.10.2.3 $
+ * @version $Revision: 1.10.2.4 $
* @todo When all components of a J2EEApplication is state manageable
* this have to be too !!
@@ -64,6 +64,14 @@
// Now create the J2EEApplication
J2EEApplication j2eeApp = new J2EEApplication(earName, j2eeServerName, lDD);
jsr77Name = j2eeApp.getObjectName();
+ /* Check to see if the ear is already registered. This will occur when
+ an ear is deployed because we do not receive the ear module start
+ notification until its contained modules have started. The content
+ modules will have created a placeholder ear when they could not find
+ an existing J2EEApplication registered.
+ */
+ if( mbeanServer.isRegistered(jsr77Name) == true )
+ mbeanServer.unregisterMBean(jsr77Name);
mbeanServer.registerMBean(j2eeApp, jsr77Name);
log.debug("Created JSR-77 J2EEApplication: " + earName);
}
@@ -83,6 +91,7 @@
try
{
mbeanServer.unregisterMBean(jsr77Name);
+ log.debug("Destroyed JSR-77 J2EEApplication: " + jsr77Name, e);
}
catch (javax.management.InstanceNotFoundException infe)
{
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic