How do I Support Singleton Services in Pramati Server?
The following support is provided for Singleton services in Pramati Server:
Multiple Singleton services can be registered with a cluster.
Service startup or failover is based on a time-based algorithm. That is, the node that comes up first would start all the Singleton services. It is essential to make sure that the cluster node clocks are synchronized properly. Not doing so would end up in synchronization issues, that is, Singleton services would be started in more than one node in a cluster.
All operations that can be done from an Application Component (EJBs, JSPs etc.) are allowed from the Singleton Service that is registered from an application context, except contextual lookup using java:comp/env.
In a standalone server instance, the Singleton services are started by default.
Are There Some Important Tips?
Following are some important tips:
Nodes in the cluster should be started one by one in a serial fashion. Not doing so might result in Singleton services being started on multiple nodes.
Singleton services should not be registered as Application or Server startup hooks.
EJBs are not encouraged to behave as Singleton services.