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

ajay662 do-not-reply at jboss.com
Fri Jan 26 12:55:43 EST 2007


Ok. I found the answer in ejb3 trailblazer. The trail on JMX Service Objects talk about how to annotate a service that depends on other services using @Depends tag. I guess the same holds true for EJBs as well, i.e. if an EJB depends on a service, use @Depends tag.  I used following to make it work in my case:


  | ClusterStatusMBean clusterStatusMbean = null;
  | 
  | @Depends ("myapp:service=ClusterStatus")
  | public void setClusterStatusMbean (ClusterStatusMBean mbean) {
  |       this.clusterStatusMbean = mbean;
  | }

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

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



More information about the jboss-user mailing list