If you did, let us know what exactly you didn't understand and we'll try to explain. You might want to check out ShowSomeEffort
Googling doesn't make you a genius. But not Googling makes you dumber.
posted 8 years ago
hi Prabaharan, thanks for the reply. Yes i have tried and in my knowledge i got the follwing answer,
1) In Clustered server environment how we can use Singleton object i got follwoing answer.
a. we can go for table or file system to serialize and deserialize the object(which needs to be singletoned)
where file or table is common to all clusters.
b. we can deploy an ejb in an cluster(which is going to be used by all clusters which needs singleton) and using RMI invocation
we can give single object to all clusters using standard singleton way.
c. we can use distributed memory object caching system.
i have tried JNDI but i got the performance problem. Because the admin servers has to send the JNDI data to all servers
periodically.i mean the load balancer. May be distributed memory object caching system like oracle coherence,jboss infinispan is good,
but i don't know excatly because not yet to tried.
2) In clustered server environment how we can use static variable.
Static variables are obviously scoped to the JVM they're living in. So, in a clustered environment, if you change one, the other JVMs are not going to know about the change.we can not assure static variable created only one copy per JVM. Because Static variables are scoped to the class in which they are defined. So, if a class is loaded by more than one classloader within the same JVM then there will be multiple copies of the static variable within the same JVM. Because
classes are not equal unless they are loaded by the same classloader... i don't know the solutions yet.
My application needs to share a state among many objects, so i store the state in a static variable. Rare case i got problem in clustred env. si i migrating the state to the database... but i don't know the correct solution.
3) In clustered server environment how we can avoid duplicate responses
In my knowledge i don't know the answer..