User: schaefera
Date: 01/06/10 17:40:26
Modified: src/main/org/jboss/util ServiceMBeanSupport.java
Log:
Added a fix when the MBeanServer returns "false" to postRegister() then
the ServiceMBean will call destroy() which needs an instance of Log but
this is not created until init() is called.
Now the postRegister() will check if the Log instance is there and if not
create one.
Revision Changes Path
1.13 +10 -2 jboss/src/main/org/jboss/util/ServiceMBeanSupport.java
Index: ServiceMBeanSupport.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/ServiceMBeanSupport.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ServiceMBeanSupport.java 2001/04/24 23:25:11 1.12
+++ ServiceMBeanSupport.java 2001/06/11 00:40:26 1.13
@@ -30,7 +30,7 @@
@author Rickard �berg ([EMAIL PROTECTED])
@author [EMAIL PROTECTED]
-@version $Revision: 1.12 $
+@version $Revision: 1.13 $
*/
public abstract class ServiceMBeanSupport
extends NotificationBroadcasterSupport
@@ -172,8 +172,16 @@
public void postRegister(java.lang.Boolean registrationDone)
{
- if (!registrationDone.booleanValue())
+ if (!registrationDone.booleanValue()) {
+ if( category == null ) {
+ category = Category.getInstance(getName());
+ }
+ if( log == null ) {
+ log = new LogToCategory(category);
+ }
+ log.log( "Registration is not done -> destroy" );
destroy();
+ }
}
public void preDeregister()
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development