users@glassfish.java.net

Re: Glassfish application protection

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Wed, 9 Jun 2010 01:35:52 +0200

2010/6/9 Witold Szczerba <pljosh.mail_at_gmail.com>:
> As far as I know - it is not desirable to have more than one
> independent application deployed in one instance/domain in Glassfish
> (and any other JEE server). The lowest level problem is that all those
> applications would share a single virtual machine instance. If one
> application goes crazy and, for example, make the JVM run out of
> memory - all other applications will die as well. Once any application
> call System.exit(0) - all the others are gone. Once any application do
> something stupid like bytecode manipulation of some server specific
> class - all the other applications are in troubles.
> You could try to fight this using maybe Java Security, but... well.
> That would be much better to put separate applications on separate
> instances.
>

Just to make things clear - the solution (in case of Glassfish v2
series) would be to create separate domains:
asadmin create-domain ....
for each application (or group of applications).