users@glassfish.java.net

Clustering a stateless Java EE application with Glassfish on Amazon AWS

From: Theodor Richard <theodor.richard_at_googlemail.com>
Date: Tue, 1 Nov 2011 10:58:18 +0100

Dear Glassfish Community,

I recently posted this question on Stackoverflow:
http://stackoverflow.com/questions/7629694/clustering-a-stateless-java-ee-application-with-glassfish-on-amazon-aws,
but I couldn't get any clear answers. Therefore, I'm reposting it here:

What's the best way to deploy a stateless Java EE 6 application in a
distributed environment in order to achieve high availability and
scalability? My application is stateless. Therefore, I don't need to
replicate any session state (HTTP session, EJB stateful beans, etc.)

Specifically, I'd like to know the following:

   - Do I need the clustering capabilities of Glassfish 3.1 (given that I
   don't need to replicate session state)?
   - I'm heavily using JMS Queues and Message Driven Beans. How do I setup
   JMS to make it work in a clustered environment?
   - I'm also using the EJB timer service. How does that work in a
   clustered environment? Is there anything I need to do besides using a
   shared DB for storing timers (and not the embedded Derby DB)?

I plan to use Amazon AWS (RDS with multi AZ deployment, elastic load
balancing, EC2).