2 Replies Latest reply on Aug 20, 2013 1:44 PM by e9d1d7d1-40fd-4cf1-ab1d-0f6907b06f79

    what is a singleton service in weblogic?


      Hi All,


      what is a singleton service and what is the use of it and where in real time scenarios we can use it.



        • 1. Re: what is a singleton service in weblogic?

          A singleton service is any service that, for whatever reason, must have only a single instance running in a cluster. It's very similar to the singleton design pattern in programming, whereby an application can only access one instance of a class for the life of the application, but in this case it is a single instance of the whole application which is available to requests served by WebLogic.


          What this means is that whereas with the majority of services you might deploy to a cluster and load balance between two instances of your web service, you have some constraint which requires that you can't do that.


          A practical example is JMS. Until the 12.1.2 release of WebLogic, a JMS server couldn't be targeted to a cluster, it was pinned to a single managed server.


          As far as using singletons for your own applications, you are free to use them as they suit your business, but do be aware of the effect it will have on high availability. I've gone into this a little more in a recent blog post, which should give you a better idea of the implications:

          Weblogic Service Migration | C2B2 Blog


          Mike Croft

          C2B2 Expert Support

          1 person found this helpful