[jboss-user] [EJB 3.0] - how to inject dependency on an mbean

ajay662 do-not-reply at jboss.com
Fri Jan 26 11:59:52 EST 2007


I have an mbean deployed in a ejb2.1 jar file. Here is the deployment descriptor.
<mbean code="myapp.status.ClusterStatus" 
  | 	name="myapp:service=ClusterStatus">
  | </mbean>

I am writing a ejb3 MDB which depends on above mbean. How do I inject dependency on the mbean.

I have tried following inside MDB, but it does not work
@Resource (mappedName="myapp:service=ClusterStatus")
  | ClusterStatus clusterStatus;

I get the error
javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: myapp:service=ClusterStatus not bound]

What is the correct way to inject dependency on an MBean?


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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006907



More information about the jboss-user mailing list