Skip to main content

Using embedded GlassFish APIs, how do I get the installation directory?

1 reply [Last post]
ljnelson
Offline
Joined: 2003-08-04

BootstrapProperties.getInstallRoot() returns null. I'm attempting to use
embedded GlassFish, not an existing GlassFish, and I'm trying to get a
handle to the directory in which it installs itself.

If I specify the install root in the BootstrapProperties, then it appears
that the embedded GlassFish APIs look to that (empty) directory as though
it contained a preconfigured GlassFish installation. That's not what I
want.

Instead, I want the directory that embedded GlassFish installs itself into.

It appears (correctly and rationally) to be a temp directory by default.
I'm not sure what portion of embedded GlassFish is responsible for
deciding where to locate itself, or whether I can influence that in any way.

Thanks,
Laird

--
http://about.me/lairdnelson

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ljnelson
Offline
Joined: 2003-08-04

On Tue, Aug 14, 2012 at 1:36 PM, Laird Nelson wrote:

> BootstrapProperties.getInstallRoot() returns null. I'm attempting to use
> embedded GlassFish, not an existing GlassFish, and I'm trying to get a
> handle to the directory in which it installs itself.

I see that the proper way to do this is to specify the
glassfish.embedded.tmpdir System property, as documented in the first
message in this forum posting: http://www.java.net/node/699975?force=209

Best,
Laird

--
http://about.me/lairdnelson