I am working with the new embeddable api in GlassFish 3.1 and have come across a problem.
Previously using the old embedded api I could call a static method to get a currently running server.
org.glassfish.api.embedded.Server.getServer(serverName)
With the new embeddable api there is only a method to get a new server
GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties)
I have a requirement to be able to use the CommandRunner to create a file user in an instance of embedded glassfish that has been started elsewhere.