This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Thanks Carol, that was a very informative link. For the future references of other memebrs I am going to cut and paste the info I was looking for and found on BEA site.
In a cluster of a WLS : Singleton services�A singleton service is active on exactly one server in the cluster at a time and processes requests from multiple clients. A singleton service is generally backed by private, persistent data, which it caches in memory. It may also maintain transient state in memory, which is either regenerated or lost in the event of failure. Upon failure, a singleton service must be restarted on the same server or migrated to a new server.
I think I got the answer. Thanks all who contributed.
there are tonnes of options to implement J2EE singleton( for access shared Data). Can anybody share thier experience on following. 1. Pinned RMI Server (deployed on single server in the cluster) 2. Single instance on Entity Bean 3. Corba Service 4. Static Value in Servlet (container replicate the value if changed)
My preference would be to go with EJB, would like to know if someone has already tried something similar or had any issues with it?
Singleton services applies to "services" provided by the app server while singleton object instances is down to the application level.
A singleton instance is tied to the classloader. When you deploy your application you will have usually, depending on how you have configured the classloaders, one singleton instance per "application and app server"
Singleton services in BEA WLS are services that have only one instance in the cluster. Examples are JMS and JTA systems, and these systems usually have persistent state stored in the file systems or databases.
have you any experience with implementation of singleton service? I tried to make my message-driven-bean as singleton service using weblogic.cluster.singleton.SingletonService interface and weblogic-application.xml file but it doesn't work. MDB is always deployed and active at all nodes of cluster.
Joined: Nov 29, 2007
I have partial solution now:
For proper work of SingletonService, the servers (cluster nodes) must be run using node manager. Then SingletonService as pure java class works - methods activate and deactivate are called as expected.
However it seems, that MDB cannot be a SingletonService.
I have tried implementing singleton servcie in MDB,but dint work as expected..Without MDB , implementation of Singleton service is wokring fine..but wanted to achieve transactionality..
1. Singleton servcie will picked up the message from foriegn jms queue using onMessage().
2. It will send the message to some other service (like proxy service).
3. If some error occurs ,it should rollback the entire transaction as well as put the message to original queue..
4. Rollbacked message will get again picked up by singleton service without loosing sequencing.
In short, Message wont get loss until successful delivery.
Please suggest some few approach to achieve rollback operation...