Tested with glassfish-v3-prelude-b28a-10_10_2008.zip

Summary:
1. verified issue 6442 in full war and shared war.
--see remaining error, "error in class reloading, using NOPLoggerRepository".??
--see the book created in previous deployment is shown in next deployment.??

2. verified issue 6459 in full war, but not for shared war.
Update 6459 for remaining error, e.g.
I can't create a book due to new error,
java.lang.IllegalStateException: BeanFactory not initialized or already closed

3. When testing, full war, shared war, then full war,
see memory error in issue 6508
Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps;
nested exception is org.codehaus.groovy.runtime.InvokerInvocationException:
java.lang.OutOfMemoryError: PermGen space

4. Re-tested issue 6506 with different jvm options
4.1 baseline with gc.log
--% asadmin create-jvm-options  '-Xloggc\:/space/test1/logs/gc.log'
--reproduce the memory error.
--observed [GC 70277K->69146K(208504K), 0.0072266 secs]

4.2 UseParalleGC
--asadmin create-jvm-options  '-XX\:+UseParallelGC'
--reproduce the memory error with less exception.
--observed [GC 194999K->72959K(228352K), 0.1045579 secs]

4.3. MaxPermSize=256m
--asadmin create-jvm-options  '-XX\:MaxPermSize=256m'
--did not see memory error.
--[GC 160080K->92798K(222008K), 0.0654079 secs]

Test 1 with steps:
1.1  In full war (created by "grails war").
% cd /home/sherrys/public_html/tests/web/v3/scripting/b28/full
% asadmin deploy BookLibrary-0.1.war
  -- create book 1, OK
  ( click link of "BookController", then link of "New Book", ......,
    click link of "Book List" to see created book.)
% asadmin undeploy BookLibrary-0.1
   -- not exception as before from the server.log
   -- verified the fix for https://glassfish.dev.java.net/issues/show_bug.cgi?id=6442
   --Any idea about
    log4j:ERROR LogMananger.repositorySelector was null likely due to error
        in class reloading, using NOPLoggerRepository.
% asadmin deploy BookLibrary-0.1.war
   -- create book 2, OK.
   -- Why I still view book 1.
   -- verified the fix for https://glassfish.dev.java.net/issues/show_bug.cgi?id=6459
% asadmin undeploy BookLibrary-0.1

1.2  Test shared war (created by "grails shared-war").
% cd ../shared
% unzip grails.zip ~/.
% asadmin deploy --libraries ~/grails/lib/glassfish-grails.jar BookLibrary-0.1.war
  -- create book 3, OK
  -- did not see book 1 and book 2 now.
% asadmin undeploy BookLibrary-0.1
% asadmin deploy --libraries ~/grails/lib/glassfish-grails.jar BookLibrary-0.1.war
  -- can't create book 4,
  -- see browser error when http://win60.sfbay.sun.com:8080/BookLibrary-0.1/
  java.lang.IllegalStateException: BeanFactory not initialized or already closed
  - call 'refresh' before accessing beans via the ApplicationContext
   Can't verify the fix for https://glassfish.dev.java.net/issues/show_bug.cgi?id=6459
% asadmin undeploy BookLibrary-0.1

1.3. Back to full war
% cd ../full
% asadmin deploy BookLibrary-0.1.war
see memoy error, and deployment is hanging.
filed https://glassfish.dev.java.net/issues/show_bug.cgi?id=6506

Test 2:
Repeat above tests with different jvm option:
% asadmin create-jvm-options  '-Xloggc\:/space/test1/logs/gc.log'
% grep gc.log domain.xml
        <jvm-options>-Xloggc:/space/test1/logs/gc.log</jvm-options>
%
2.1 Baseline
% more gc.log.2.1
0.534: [GC 2042K->408K(3520K), 0.0113938 secs]
.....
1561.330: [Full GC 69146K->69144K(208504K), 1.7330947 secs]
1563.065: [GC 70277K->69146K(208504K), 0.0072266 secs]
--see memory error in deployment at step 1.3.
--deployment is hanging.
--access app and see 503 error
--I need to kill the process.

2.2 UseParalleGC
% asadmin create-jvm-options  '-XX\:+UseParallelGC'
% grep UseParallelGC domain.xml
        <jvm-options>-XX:+UseParallelGC</jvm-options>
% more gc.log.2.2
0.702: [GC 3072K->457K(7680K), 0.0064529 secs]
.....
379.449: [Full GC 76713K->63095K(227136K), 1.8880780 secs]
402.498: [GC 194999K->72959K(228352K), 0.1045579 secs]
.....
705.501: [GC 61528K->61340K(498560K), 0.0100813 secs]
705.511: [Full GC 61340K->61308K(498560K), 1.5215641 secs]
%              
--see memory error in the deployment at Step 1.3, but less error than 2.1.
--the deployment completed.
--access app and see 503 error
% asadmin stop-domain  -- not working, need to kill the process.

2.3 MaxPermSize=256m
% asadmin create-jvm-options  '-XX\:MaxPermSize=256m'
% grep MaxPermSize domain.xml
        <jvm-options>-XX:MaxPermSize=256m</jvm-options>
%
test1@win60% more gc.log.2.3
0.513: [GC 2044K->405K(3520K), 0.0110637 secs]
.....
652.702: [GC 160080K->92798K(222008K), 0.0654079 secs]
657.837: [Full GC 139449K->83554K(222008K), 2.5987700 secs]
720.448: [Full GC 127526K->85172K(222008K), 2.1354228 secs]
782.599: [Full GC 86992K->85175K(222008K), 2.1019729 secs]
844.708: [Full GC 85473K->85175K(222008K), 2.0977100 secs]
--not see memory error in the deployment at Step 1.3
--access app to create book 5, OK
--also see the book 1 and book2 in previous deployment. ???


server.log in 2.2, memory error, but less exception.
[#|2008-10-13T15:05:49.991-0700|SEVERE|glassfish|javax.enterprise.system.container.web|_ThreadID=15;_ThreadName=Thread-3;|WebModule[/BookLibrary-0.1]PWC1275: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
java.lang.OutOfMemoryError: PermGen space
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:971)
        at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1434)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:971)
        at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1434)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
        at java.lang.Class.getDeclaredMethods(Class.java:1763)
        at org.codehaus.groovy.reflection.CachedClass$1.run(CachedClass.java:174)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:171)
        at groovy.lang.MetaClassImpl.addInterfaceMethods(MetaClassImpl.java:290)
        at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:212)
        at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2478)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:185)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:145)
        at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:27)
        at groovy.lang.ExpandoMetaClassCreationHandle.enable(ExpandoMetaClassCreationHandle.java:116)
        at groovy.lang.ExpandoMetaClass.enableGlobally(ExpandoMetaClass.java:337)
        at org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:50)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4623)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5323)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:456)
|#]

[#|2008-10-13T15:05:49.996-0700|SEVERE|glassfish|org.apache.catalina.core.StandardContext|_ThreadID=15;_ThreadName=Thread-3;|PWC1306: Startup of context /BookLibrary-0.1 failed due to previous errors|#]