admin@glassfish.java.net

instance config not created in same transaction as server instance?

From: Joe Di Pol <joe.dipol_at_oracle.com>
Date: Thu, 30 Sep 2010 16:17:32 -0700

I'm testing some class-level bean validation on the Server
config bean, but I've run into a problem.

It looks like the config that is created when a server instance
is created (and no cluster or existing config is specified) is
not created in the same transaction as the server instance.
This means that if the class-level bean validation fails on
Server, then the instance creation is rolled back but not the
config creation. This leaves an orphaned config which causes
downstream problems.

This basically means we can't do class-level bean validation
on Server.

Is this something we think should/will be fixed?

If it isn't I can go back to doing method/attribute level
validation which doesn't appear to suffer from this problem,
but in my case it's a bit less elegant.

Thanks,

Joe