Specifying Dependencies

When writing Java-based services we occasionally require dependencies. That is, our services must start in a certain order. You can specify what services your code is dependent on by overriding the getServiceDependencies method in your service class. For example, to create a service that is dependent on RPC being started, override the method as follows.

     protected Object getServiceDependencies() {     String dependsOn = "RPCSS0000";     return dependsOn ;    } 

Note that the dependencies string is a list of double null terminated strings. So, to create a dependency on two services specify the dependsOnstring as “Service100Service20000”

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: