It looks like the iiop-listener keeps running even after the server is stopped.
This is NOT reproducible with 'asadmin stop-domain' because the JVM exits soon after the shutdown procedure finishes.
But the issue is reproducible when the GlassFish embedded inside user's application is stopped, in which case the VM does not necessarily exit after stopping the GlassFish.
Steps to reproduce:
0. Unzip latest glassfish.zip and set S1AS_HOME to GlassFish installation directory.
1. Compile the attached Test.java using 'javac -cp $S1AS_HOME/lib/embedded/glassfish-embedded-static-shell.jar Test.java'
2. Set lazy-init="false" in iiop-listener element of $S1AS_HOME/domains/domain1/config/domain.xml (specifically under server-config).
3. Copy the attached remoteejb.jar to /tmp
4. Run the attached Test using : 'java -cp $S1AS_HOME/lib/embedded/glassfish-embedded-static-shell.jar:. Test'
5. Once the test prints "Shutdown procedure finished. Sleeping foreover", check that the port 3700 is still running (netstat -an | grep 3700)