HA-Singleton problem
ronsen Jun 3, 2011 5:54 AMHi all,
I tried to set up a HA-Singletonw ith the here described concept: http://docs.jboss.org/jbosscache/2.2.1.GA/pojo/userguide_en/html/ch05s06s03.html in JBoss AS 6.
Whenever I try to deploy the bean through the farm service, I get the following error:
DEPLOYMENTS IN ERROR:
Deployment "SBHASingletonController" is in error due to the following reason(s): java.lang.RuntimeException: unable to determine member type for annotation: org.jboss.aop.microcontainer.aspects.jmx
JMX.value
Deployment "StarterBean" is in error due to the following reason(s): java.lang.RuntimeException: unable to determine member type for annotation: org.jboss.aop.microcontainer.aspects.jmx.JMX.value
My jboss-beans.xml:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- This bean is an example of a clustered singleton -->
<bean name="StarterBean" class="failover.StarterBean">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(...)</annotation>
</bean>
<bean name="SBHASingletonController" class="org.jboss.ha.singleton.HASingletonController">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(...)</annotation>
<property name="HAPartition"><inject bean="HAPartition"/></property>
<property name="target"><inject bean="StarterBean"/></property>
<property name="targetStartMethod">startSingleton</property>
<property name="targetStopMethod">stopSingleton</property>
</bean>
</deployment>
My Singleton:
@Singleton
@Clustered
//@Startup
// @Stateless
// @Singleton
@CacheConfig(name="sfsb/dist")
public class StarterBean implements Starter {
// @EJB(lookup="FailoverBean/remote")
// private Failover b;
private Failover b;
private InitialContext ctx;
private boolean isMasterNode = false;
public StarterBean() throws NamingException {
// count();
ctx = new InitialContext();
b = (Failover) ctx.lookup("FailoverBean/remote");
System.out.println("TEST");
System.out.println("STARTERBEAN: " + b);
}
public boolean isMasterNode() {
return isMasterNode;
}
public void startSingleton() {
isMasterNode = true;
count();
}
public void stopSingleton() {
isMasterNode = false;
}
public void count() {
b.printCount(5000);
}
}