users@glassfish.java.net

clustering

From: Glenn Holmer <gholmer_at_weycogroup.com>
Date: Tue, 12 Feb 2013 09:11:31 -0600

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?

-- 
Glenn Holmer
Weyco Group, Inc.
phone: 414-908-1809
fax: 414-908-1601