users@glassfish.java.net

Re: clustering

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Tue, 12 Feb 2013 08:49:27 -0800

I can answer the 1st question. The EJB spec requires automatic
non-persistent timers to fire on all instances in a cluster.

-marina

On 2/12/13 7:11 AM, Glenn Holmer wrote:
> We're trying to get clustering working, with load balancing provided
> by Apache mod_jk. I have the DAS one one machine, and two instances on
> two other separate machines. Our Postgres database is on the same
> machine as the DAS.
>
> These are the things we're currently having trouble with; can anybody
> help?
>
> 1) EJB timers work (non-persistent), but they fire on each instance.
> Can we get them to fire only once at a time?
>
> 2) When I deploy, sometimes the app works, but more often than not, I
> get a lot of these two errors:
>
> Exception occurred in getSession
> java.io.StreamCorruptedException: unexpected end of block data
>
> java.lang.ClassCastException: cannot assign instance of
> java.lang.String to field
> java.util.Collections$SynchronizedCollection.c of type
> java.util.Collection in instance of
> java.util.Collections$SynchronizedList
>
> and only part of the page renders. In both cases, the trace shows only
> packages like java.io, sun.reflect, org.glassfish, &c. (i.e. none of
> our packages are listed).
>
> I tried changing the AJP port on one of the instances so that the two
> are different, but it didn't help. That shouldn't really matter if the
> two instances are on separate machines anyway, right?
>