Embedded GlassFish 3.1 No longer able to statically get server reference

237 Views Asked by At

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.

0

There are 0 best solutions below