First of all, thanks alot for the prompt replies!

And in response to:

1) Thanks, I'll make sure I do that.

2) The jboss-service.xml is just a stub (empty server tag), as we rely 
exclusively on annotations.  Here are the annotations, though:

@Management(DatabaseManager.class)
  | @Service(objectName = "my.domain:service=DatabaseManager")
  | @RemoteBinding(jndiBinding = DatabaseManager.JNDI_NAME)
  | @Depends("jboss.ha:service=HASingletonDeployer,type=Barrier")
  | 

The create method, for now, just logs that it is being called.

The start method finds the MainDeployer (MBeanServerLocator.locateJBoss, 
MBeanServerInvocationHandler.newProxyInstance, 
objectName="jboss.system:service=MainDeployer", etc), and calls deploy on it, 
passing the directory's url (file:/..../server/default/deploy-db/).

The stop method is the same as start, except, of course, it calls undeploy.

3) Changing the dependency works.  Everything seems to come up without 
incident.  Given your comment in 2) about it being odd that it worked 
differently, I presume that even if I go the barrier-controller route, it'd be 
wise to keep this dependency, yes?

I'd like to go with the barrier-controller as it gives me more precise control 
over the timing of the replication management tasks relative to shutting down 
or starting up the db services.

4) It definitely does not call create until the subsequent switch-over.  Here's 
the stack trace at the point at which my create method is called:

Thread "AsynchKeyChangeHandler Thread"@4,007 in group "jboss" status: RUNNING
  | create():49, my.domain.databasemanager.DatabaseManagerMBean
  | invoke0():-1, sun.reflect.NativeMethodAccessorImpl
  | invoke():39, sun.reflect.NativeMethodAccessorImpl
  | invoke():25, sun.reflect.DelegatingMethodAccessorImpl
  | invoke():585, java.lang.reflect.Method
  | invokeNext():109, org.jboss.aop.joinpoint.MethodInvocation
  | invoke():54, org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor
  | invokeNext():98, org.jboss.aop.joinpoint.MethodInvocation
  | invoke():47, org.jboss.ejb3.AllowedOperationsInterceptor
  | invokeNext():98, org.jboss.aop.joinpoint.MethodInvocation
  | invokeInOurTx():79, org.jboss.aspects.tx.TxPolicy
  | invoke():192, org.jboss.aspects.tx.TxInterceptor$Required
  | invokeNext():98, org.jboss.aop.joinpoint.MethodInvocation
  | invoke():76, org.jboss.aspects.tx.TxPropagationInterceptor
  | invokeNext():98, org.jboss.aop.joinpoint.MethodInvocation
  | invoke():78, org.jboss.aspects.security.AuthenticationInterceptor
  | invokeNext():98, org.jboss.aop.joinpoint.MethodInvocation
  | invoke():47, org.jboss.ejb3.ENCPropagationInterceptor
  | invokeNext():98, org.jboss.aop.joinpoint.MethodInvocation
  | invoke():106, org.jboss.ejb3.asynchronous.AsynchronousInterceptor
  | invokeNext():98, org.jboss.aop.joinpoint.MethodInvocation
  | localInvoke():181, org.jboss.ejb3.service.ServiceContainer
  | localInvoke():142, org.jboss.ejb3.service.ServiceContainer
  | invoke():168, org.jboss.ejb3.service.ServiceMBeanDelegate
  | invoke():164, org.jboss.mx.server.RawDynamicInvoker
  | invoke():659, org.jboss.mx.server.MBeanServerImpl
  | invoke():995, org.jboss.system.ServiceController$ServiceProxy
  | create():-1, $Proxy0
  | create():330, org.jboss.system.ServiceController
  | invoke0():-1, sun.reflect.NativeMethodAccessorImpl
  | invoke():39, sun.reflect.NativeMethodAccessorImpl
  | invoke():25, sun.reflect.DelegatingMethodAccessorImpl
  | invoke():585, java.lang.reflect.Method
  | invoke():155, org.jboss.mx.interceptor.ReflectedDispatcher
  | dispatch():94, org.jboss.mx.server.Invocation
  | invoke():86, org.jboss.mx.server.Invocation
  | invoke():264, org.jboss.mx.server.AbstractMBeanInvoker
  | invoke():659, org.jboss.mx.server.MBeanServerImpl
  | invoke():210, org.jboss.mx.util.MBeanProxyExt
  | create():-1, $Proxy128
  | installMBean():109, org.jboss.ejb3.JmxKernelAbstraction
  | registerManagementInterface():352, org.jboss.ejb3.service.ServiceContainer
  | start():92, org.jboss.ejb3.service.ServiceContainer
  | invoke0():-1, sun.reflect.NativeMethodAccessorImpl
  | invoke():39, sun.reflect.NativeMethodAccessorImpl
  | invoke():25, sun.reflect.DelegatingMethodAccessorImpl
  | invoke():585, java.lang.reflect.Method
  | startService():99, org.jboss.ejb3.ServiceDelegateWrapper
  | jbossInternalStart():289, org.jboss.system.ServiceMBeanSupport
  | jbossInternalLifecycle():245, org.jboss.system.ServiceMBeanSupport
  | invoke():-1, sun.reflect.GeneratedMethodAccessor2
  | invoke():25, sun.reflect.DelegatingMethodAccessorImpl
  | invoke():585, java.lang.reflect.Method
  | invoke():155, org.jboss.mx.interceptor.ReflectedDispatcher
  | dispatch():94, org.jboss.mx.server.Invocation
  | invoke():86, org.jboss.mx.server.Invocation
  | invoke():264, org.jboss.mx.server.AbstractMBeanInvoker
  | invoke():659, org.jboss.mx.server.MBeanServerImpl
  | invoke():978, org.jboss.system.ServiceController$ServiceProxy
  | start():-1, $Proxy0
  | start():417, org.jboss.system.ServiceController
  | start():435, org.jboss.system.ServiceController
  | invoke():-1, sun.reflect.GeneratedMethodAccessor9
  | invoke():25, sun.reflect.DelegatingMethodAccessorImpl
  | invoke():585, java.lang.reflect.Method
  | invoke():155, org.jboss.mx.interceptor.ReflectedDispatcher
  | dispatch():94, org.jboss.mx.server.Invocation
  | invoke():86, org.jboss.mx.server.Invocation
  | invoke():264, org.jboss.mx.server.AbstractMBeanInvoker
  | invoke():659, org.jboss.mx.server.MBeanServerImpl
  | start():194, org.jboss.system.ServiceMBeanSupport
  | startBarrier():334, org.jboss.system.BarrierController
  | handleNotification2():313, org.jboss.system.BarrierController
  | handleNotification():403, org.jboss.system.ListenerServiceMBeanSupport
  | invoke():-1, sun.reflect.GeneratedMethodAccessor3
  | invoke():25, sun.reflect.DelegatingMethodAccessorImpl
  | invoke():585, java.lang.reflect.Method
  | invoke():153, org.jboss.mx.notification.NotificationListenerProxy
  | handleNotification():-1, $Proxy101
  | handleNotification():127, 
org.jboss.mx.util.JBossNotificationBroadcasterSupport
  | sendNotification():110, 
org.jboss.mx.util.JBossNotificationBroadcasterSupport
  | sendNotificationToLocalListeners():354, 
org.jboss.ha.jmx.HAServiceMBeanSupport
  | sendLocalNotification():213, org.jboss.ha.singleton.HASingletonSupport
  | makeThisNodeMaster():200, org.jboss.ha.singleton.HASingletonSupport
  | partitionTopologyChanged():133, org.jboss.ha.singleton.HASingletonSupport
  | replicantsChanged():243, org.jboss.ha.jmx.HAServiceMBeanSupport$1
  | notifyKeyListeners():844, 
org.jboss.ha.framework.server.DistributedReplicantManagerImpl
  | processEvent():386, 
org.jboss.ha.framework.server.DistributedReplicantManagerImpl
  | run():107, org.jboss.ha.framework.server.AsynchEventHandler
  | run():595, java.lang.Thread
  | 

Getting the create method called at system startup would be nice so I don't 
have to create yet another MBean just to know that the system started up.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985460
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to