There is not such feature. The question would be then in what state should your service be and how you want it service to be started?
You can emulate this behaviour by configuring a Barrier and make your service depend on it.
Then you will need to write another service that emits any combination of start/stop notifications where the BarrierController can listen to, start/stop the Barrier and as a result your service.
You EJB could invoke operations on your other service and emit those notifications.
Ah Cool. Thanks Dimitris. Ill explore that option.