aspose file tools*
The moose likes Servlets and the fly likes What are all the Common Servlet Programming practises for Clustered Environment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What are all the Common Servlet Programming practises for Clustered Environment?" Watch "What are all the Common Servlet Programming practises for Clustered Environment?" New topic
Author

What are all the Common Servlet Programming practises for Clustered Environment?

Antany Vasanth
Ranch Hand

Joined: Jan 28, 2009
Posts: 43
Hi All,

I have an requirement of developing the web application using Servlet & JSP for clustered environment.

What are all the common practises to be followed inorder to achieve the above?

Thanks in advance,
Antany
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

There is no need to perform any special coding as such but things that do come in mind

1. Ensure that Singletons replicated across the clusters will not impact your environment

2. If you have classes to be bound to session / application scope ensure that their contents are serializable in case the server wants to port them.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Antany Vasanth
Ranch Hand

Joined: Jan 28, 2009
Posts: 43
Thanks a lot Bala.

Can you please explain me how the singleton gonna affect the clustered environment.

As per my understanding for example If 3 machines participate in clustering then 3 instance of Singleton object will be created. How this gonna affect the environment. Please explain

Thanks,
Antany
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Lets say you wrote a singleton to handle DB connection pooling and your database can handle only 20 connections. With 3 nodes on a cluster and 3 singletons you will effectively be allowing 60 connections to the DB instead of 20. An example that might not be pragmatic (since most app servers will provide this feature) but an example never the less
Antany Vasanth
Ranch Hand

Joined: Jan 28, 2009
Posts: 43
Thanks Bala..

Regards,
Antany
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What are all the Common Servlet Programming practises for Clustered Environment?