[jboss-user] [Clustering/JBoss] - Re: Invocation of startSingleton()
_Adam_
do-not-reply at jboss.com
Thu Jan 29 09:20:28 EST 2009
Thanks for quick response.
Well, then I suppose I must have some mistake in my configuration files.
Info:
Version: JBOSS 5.0.0 GA
My singleton class:
public class StartupService2 implements StartupService2MBean {
|
| Logger log = Logger.getLogger(StartupService2.class);
| private boolean isMasterNode;
|
| public String getName() {
| return "com.xitee.cfd.be:service=StartupService";
| }
|
| public boolean isMasterNode() {
| return isMasterNode;
| }
|
| public void startSingleton() {
| isMasterNode = true;
| log.info("starting testing-singleton");
| }
|
| public void stopSingleton() {
| isMasterNode = false;
| log.info("stopping testing-singleton");
| }
| }
My MBean interface:
public interface StartupService2MBean {
|
| public void startSingleton();
|
| public void stopSingleton();
|
| public boolean isMasterNode();
| }
My jboss-service.xml:
<server>
| <mbean code="com.xitee.cfd.be2.StartupService2"
| name="StartupTestingCFD2">
| </mbean>
|
| <mbean code="org.jboss.ha.singleton.HASingletonController"
| name="HASingletonController">
| <depends optional-attribute-name="ClusterPartition"
| proxy-type="attribute">jboss:service=${jboss.partition.name:DefaultPartition}</depends>
|
| <attribute name="TargetName">StartupTestingCFD2</attribute>
| <attribute name="TargetStartMethod">startSingleton</attribute>
| <attribute name="TargetStopMethod">stopSingleton</attribute>
| </mbean>
|
| </server>
After deploying the application (into deploy directory) I would expect "starting testing-singleton" string to appear in the server.log file, however this does not happen.
Could you please give me any startup hint, how to solve this? Do you need some more information from my side?
Adam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205576#4205576
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205576
More information about the jboss-user
mailing list