To make this work w/o ugly hacks you simply need double configuration. Where in one of them you actually have a mock mod_cluster supply.
Otherwise this is pretty much hackish to achieve, as you still heavily depend on deployment order. e.g. jbossweb is deployed first, at that time mod_cluster is not present in any state, hence optional dependency is satisfied and afterwards never re-invoked. But if the order was different you would wire up that optional dependency. To make this "work" you would have to hack around the cleanup code in order not to leave something hanging at the end and get incomplete deployment error. With some mock object you always have proper order, where in the mock case all you do is tag some bean as mod_cluster supplier. We have an optional inject, but this is/should mostly be used when you know you have a phase split - trying to optionally inject something from deployers/ into deploy/ beans. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262288#4262288 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262288 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user