This content has been marked as final.
Show 3 replies
-
1. Re: MBean depends on a stateless EJB
j-n00b Jan 21, 2009 10:41 AM (in response to franbekh)Hello,
I am not confident with the JBoss classes, so I tried a similar example with standard MBeans. Using the @Depends annotation, it did not work. So I used the standard jboss-service.xml with the following content:<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="ae.Master" name="ae:service=Master"> <depends> jboss.j2ee:jar=CalculationEJB.jar,name=AdditionBean,service=EJB3 </depends> </mbean> </server>
That way, my MBean waited for the EJB to be deployed. Please note: This notation works for JBoss 5.0.0 GA, maybe you have to adapt it a little.
Hope that helped a little...
cheers,
Andre -
2. Re: MBean depends on a stateless EJB
franbekh Jan 30, 2009 5:41 AM (in response to franbekh)Hello,
thanks for the quick answer. Unfortunately it does not work either. I tried all these possibilities....
Bernd -
3. Re: MBean depends on a stateless EJB
kyle.bober Mar 12, 2009 10:30 AM (in response to franbekh)I am running into the same issuw as yourself. Were you able to figrue out a solution to this.
I too have a MBean that has a dependency on an Stateless EJB3 bean.
Snippet of the MBean@Service @Management(IChartServiceJMX.class) public class ChartServiceJMX implements IChartServiceJMX { /** * Logger for this class */ private static final Logger LOGGER = Logger.getLogger(ChartServiceJMX.class); private ChartAdminService theChartAdminService; @Depends("jboss.j2ee:jndiName=ChartAdminServiceEJB,service=EJB3") public void setChartAdminService(ChartAdminService aChartAdminService) { this.theChartAdminService = aChartAdminService; }
Snippet of the EJB3 Bean@Stateless(mappedName="ChartAdminServiceEJB") @WebService(name="chartAdminService", serviceName="chartAdminService") @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) @TransactionManagement(TransactionManagementType.CONTAINER) public class ChartAdminService extends BaseService implements IChartAdminService
I receive the following when I attempt to deploy the EAR file that contains the EJB jar which contains the MBean and Stateless EJB3 Bean.
Thanks,
Kyle