[Clustering/JBoss] - Re: HASingletonDeployer ERROR upon secondary server startup
by jaikiran
Brian,
I was able to reproduce this with a simple SLSB:
import javax.ejb.Stateless;
|
| import org.jboss.ejb3.annotation.Depends;
|
| @Stateless
| @Depends("jboss.ha:service=HASingletonDeployer,type=Barrier")
| public class CalculatorBean implements CalculatorRemote, CalculatorLocal
Deploys fine on node1. When node1 is started and node2 is brought up with this deployment, it fails with (cryptic MC dependency error):
DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "jboss.j2ee:jar=jboss-ejb3-tutorial-stateless.jar,name=CalculatorBean,service=EJB3" is missing the following dependencies:
| Dependency "<UNKNOWN jboss.j2ee:jar=jboss-ejb3-tutorial-stateless.jar,name=CalculatorBean,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'jboss.ha:service=HASingletonDeployer,type=Barrier' **")
| Deployment "jboss.j2ee:jar=jboss-ejb3-tutorial-stateless.jar,name=CalculatorBean,service=EJB3_endpoint" is missing the following dependencies:
| Dependency "jboss.j2ee:jar=jboss-ejb3-tutorial-stateless.jar,name=CalculatorBean,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
|
| DEPLOYMENTS IN ERROR:
| Deployment "<UNKNOWN jboss.j2ee:jar=jboss-ejb3-tutorial-stateless.jar,name=CalculatorBean,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.ha:service=HASingletonDeployer,type=Barrier' **
|
The real issue is that a @Depends add a depedency on a MC bean with state = INSTALLED/STARTED (don't exactly remember which of these 2).
However, looking at the JMX console, i can see that the
jboss.ha:service=HASingletonDeployer,type=Barrier
on Node1 is in STARTED state whereas on Node2 its in CREATED state. I don't know much of this type=Barrier MBean, but probably that's expected? This effectively results in MC dependency resolution error.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240851#4240851
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240851
14 years, 10 months
[Clustering/JBoss] - Re: HASingletonDeployer ERROR upon secondary server startup
by bstansberry@jboss.com
I tried deploying a simple pojo with a dependency on the barrier:
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <bean name="Test"
| class="java.lang.Object">
|
| <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
|
| </bean>
|
| </deployment>
That gave me the result I expected on the 2nd node
anonymous wrote :
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "Test" is missing the following dependencies:
| Dependency "jboss.ha:service=HASingletonDeployer,type=Barrier" (should be in state "Start", but is actually in state "Create")
|
| DEPLOYMENTS IN ERROR:
| Deployment "jboss.ha:service=HASingletonDeployer,type=Barrier" is in error due to the following reason(s): Create
|
Using the barrier is going to result in log complaints about unresolved dependencies, until whatever trips the barrier occurs, e.g. the 2nd node becomes master. Getting rid of the log complaint would be nice, but I don't expect it to happen soon.
Your message is different, perhaps because of @Depends inside an EJB.
If you shut down the first node and the 2nd becomes master, does the EJB deploy properly?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240849#4240849
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240849
14 years, 10 months
[EJB 3.0] - Re: circular references
by jaikiran
anonymous wrote : to do what at class level? to @IgnoreDependency ?
|
Yes, i meant you can't have an @IgnoreDependency at class level.
anonymous wrote : i thought, that
|
| * @EJB on class level just declares a dependency and the application server puts the corresponding ejb into the local jndi context, while
| * @EJB on field level injects an instance of the corresponding ejb into the field
That's correct.
[ Some internal details - A @EJB adds an internal MC dependency on the bean which is being added to the ENC of another bean or being injected in another bean]
Wouldn't this work:
| ...
| public class StatlessTwoBean implements StatlessTwo
| {
| ...
| @EJB(beanName = "StatlessOne") // lookup "always"
| @IgnoreDependency
| private StatlessOne statlessOne;
anonymous wrote : ps:
| its complicated for me to explain all these things in english.
| so i hope you will forgive me if i confuse you O: )
No problem with the language :)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240843#4240843
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240843
14 years, 10 months