Example of mbean that depends on tomcat barrier in JBoss EAP 5?

Solution Unverified - Updated -

Issue

I have two projects:

  • EJBProject, which has a stateless ejb - MyEjb with LocalBinding = "myejb/local".
  • ServiceProject, which has MyService. MyService's start method looks up MyEjb with its local binding.

If the mbean declaration for MyService in ServiceProject's jboss-service.xml has:

1) no "<depends>" on MyEjb, then the exception: "myejb/local not bound" comes up. In the log, it looks like the mbean is started before the ejb is bound to the global jndi name. After the server starts up, I can see the ejb associated with the jndi name,

2) "<depends>jboss.j2ee:jar=myejbproject.jar,service=EJB3</depends>", then the dependency error "** NOT FOUND ** jboss.j2ee:jar=myejbproject.jar,service=EJB3" comes up.

3) "<depends>jboss.j2ee:jar=myejbproject.jar,name=MyEjb,service=EJB3</depends>", then "org.jboss.ejb3.common.registrar.spi.NotBoundException: Object is bound at key jboss.j2ee:jar=myejbproject.jar,name=MyEjb,service=EJB3, but is not fully installed, instead of state: ControllerState@18faa02{Start}".

I made sure that the deployment order in deployers.xml is EJBProject followed by ServiceProject and it does deploy this way. I have searched extensively over the internet and in tutorials but can't seem to go anywhere.

If it matters, the EJBProject has a bunch of MDB's, which depend on a Barrier and the barrier deployment has the error - Deployment "<UNKNOWN jboss.j2ee:jar=myejbproject.jar,name=MyCMDB,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss:name=MyBarrier,type=Barrier' **

When having <depends>jboss.j2ee:jar=myejbproject.jar,name=MyEjb,service=EJB3</depends> , it looks like the service can get a handle to the ejb proxy. The error comes up when calling a method on this proxy.

Som EJBUtility.getBean("myejb/local") returns a non-null object, but accessing any method on that object throws the NotBoundException.

I looked at the java code for "org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.lookup" (which throws the exception). There is a flag called checkInstalled, which remains false. I am not sure what exactly "installed" means and how to install this Ejb.

The barrier depends on serverpeer (<depends>jboss.messaging:service=ServerPeer</depends>), which doesn’t seem to start. The error messages say:
-     Dependency "jboss.messaging:service=ServerPeer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.messaging:service=ServerPeer' **")
-     Deployment "jboss.messaging:service=ServerPeer" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.messaging:service=ServerPeer' **

Thank you,
Brian

Environment

  • JBoss Enterprise Application Platform (EAP) 5.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content