Embedded GlassFish 3.1 Can no longer statically retrieve server link

I am working with a new embeddable api in GlassFish 3.1 and have encountered a problem.

Previously, using the old embedded api , I could call a static method to get the current server.

org.glassfish.api.embedded.Server.getServer(serverName) 

With the new embeddable api, there is only a way to get a new server

 GlassFish glassfish = GlassFishRuntime.bootstrap().newGlassFish(glassfishProperties) 

I have a requirement to be able to use CommandRunner to create a file user in an instance of an embedded glass fish that was launched elsewhere.

+4
source share

Source: https://habr.com/ru/post/1346003/


All Articles