-
1. Re: HornetQ Server Deployment Timing Issue
jbertram May 3, 2016 6:04 PM (in response to jfisherdev)I don't know of any way in Wildfly to set an arbitrary dependency between a non-container-managed-resource (e.g. your MBean) and a POJO bound in JNDI. You might be best served by simply having a wait/retry mechanism on your JNDI lookup.
-
2. Re: HornetQ Server Deployment Timing Issue
jfisherdev May 3, 2016 6:58 PM (in response to jbertram)That may very well be a way to address this; however, having the HornetQ server reliably start and deploy the managed JMS objects before application deployment would be preferable. Looking at this discussion, I wonder if this is a case where resource injection might provide what I am looking for:
-
3. Re: HornetQ Server Deployment Timing Issue
jbertram May 3, 2016 7:54 PM (in response to jfisherdev)Injection does create an implicit dependency, but your MBean would need to be managed by the container somehow so support injection I believe. I certainly could be wrong here, but I don't think you can just inject resources in just any bit of code you want. Notice that the linked forum post was dealing with a "EJB marked as @Singleton @Startup".
-
4. Re: HornetQ Server Deployment Timing Issue
mnovak May 4, 2016 6:58 AM (in response to jfisherdev)Could you try to modify your META-INF/MANIFEST.MF of your deployement and add:
Dependencies: org.hornetq
into this file.
-
5. Re: HornetQ Server Deployment Timing Issue
jfisherdev May 4, 2016 10:55 AM (in response to mnovak)I tried this and it did not work.
If this is to control class loading behavior for the deployment, which is what I understand this manifest attribute to be for, I already have defined this module as a global module, so it would not be necessary [although this may be better for portability].
Does this manifest attribute have some other purpose in this case?
-
6. Re: HornetQ Server Deployment Timing Issue
jfisherdev May 4, 2016 10:58 AM (in response to jfisherdev)At this time, the best solution appears to be to have a wait/retry mechanism on the JNDI lookup as suggested.
I appreciate the prompt responses to my question(s).
-
7. Re: HornetQ Server Deployment Timing Issue
jbertram May 4, 2016 11:06 AM (in response to jfisherdev)It's only for classloading. It won't have any impact on the runtime dependency issue.