Hi all,

Is it possible a MBean depends on ExternalContext ?

I have a MBean which depends on ExternalContext, defined in my jboss-service.xml, as 
shown below :

...
    <!--
     | ExtJNDIManager MBean
    -->
    
        jboss.jndi:service=ExternalContext
    
...

The ExternalContext MBean is setup in /default/deploy/user_service.xml as :

...
    
        external/JNDI
        /conf/extjndi.properties
        javax.naming.directory.InitialDirContext
           
...

The Properties file ( in /default/conf ) is look like this :
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
java.naming.provider.url=file:///usr/local


And the structue of my sar is :
META-INF/
META-INF/MANIFEST.MF
example/
example/jmx/
example/jmx/ExtJNDIManager.class
example/jmx/ExtJNDIManagerMBean.class
META-INF/jboss-service.xml

When I deploy my sar, I got an Incomplete Deployment error :
...
[org.jboss.management.j2ee.factory.ServiceModuleFactory] Create MBean, name:
nusa:service=ExtJNDIManager, SAR Module:
jboss.management.local:J2EEServer=Local,j2eeType=ServiceModule,name=ExtJNDI.
sar 15:33:02,505 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on 
package: ExtJNDI.sar 15:33:02,505 DEBUG [org.jboss.deployment.MainDeployer] Deployed 
package:
file:/C:/Java/Software/jboss-3.2.4RC2/server/default/deploy/ExtJNDI.sar
15:33:02,505 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for:
file:/C:/Java/Software/jboss-3.2.4RC2/server/default/deploy/ExtJNDI.sar -> 
file:/C:/Java/Software/jboss-3.2.4RC2/server/default/deploy/ExtJNDI.sar
15:33:02,505 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner]
Incomplete Deployment listing:
MBeans waiting for other MBeans:
ObjectName: nusa:service=ExtJNDIManager
 state: CONFIGURED
 I Depend On:  jboss.jndi:service=ExternalContext

 Depends On Me: 

MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
ObjectName: jboss.jndi:service=ExternalContext
 state: NOTYETINSTALLED
 I Depend On: 
 Depends On Me:  nusa:service=ExtJNDIManager

The code for ExtJNDIManager is shown below :

public class ExtJNDIManager extends ServiceMBeanSupport implements ExtJNDIManagerMBean 
{
    
   /**
    *
    */
   public ExtJNDIManager() {        
      log.info("=== ExtJNDIManager.Constructor ...");      
   }

   /**
    * 
    */
   public void startService() throws Exception {
      log.info("=== ExtJNDIManager.startService()");
   }
   
   /**
    * 
    */
   public void stopService() throws Exception {
       log.info("=== ExtJNDIManager.stopService()");        
   }   
}


The startService() is never called, only constructor().

What's wrong with my sar ? What am I missing ?
Why startService() never get called ?

Thanks for any help,
nusa

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832010#3832010

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832010


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to