users@glassfish.java.net

How to create an Embedded GlassFish Server File System?

From: <forums_at_java.net>
Date: Tue, 24 Jan 2012 10:42:57 -0600 (CST)

Hi,

How can I create an Embedded GlassFish Server File System?

I tried:

    BootstrapProperties bootstrapProperties = new BootstrapProperties();
    bootstrapProperties.setInstallRoot("glassfish");
    GlassFishRuntime runtime =
GlassFishRuntime.bootstrap(bootstrapProperties);
    GlassFish glassFish = runtime.newGlassFish();
    glassFish.start();
    System.out.println("Press Enter to stop server");
    // wait for Enter
    new BufferedReader(new InputStreamReader(System.in)).readLine();
    glassFish.dispose();
    runtime.shutdown();
But the directory "glassfish" + contents wasn't created. Only a temporary
filesystem gets created in the tmp directory.

While the documentation of v3.1 is quite scarce:

http://docs.oracle.com/cd/E18930_01/html/821-2424/gkubb.html [1]

There is some more documentation for v3.0.1:

http://docs.oracle.com/cd/E19798-01/821-1754/giiab/index.html [2]

There it says it should get created if it doesn't exist.

But there are 2 issues:

  * v3.1 has a new API
  * I couldn't get it created with the old API either

How can I create a persistent filesystem at a specific location with the new
API?

 

Note: I cross-posted this question here:
http://stackoverflow.com/questions/8989053/how-to-create-an-embedded-glassfish-server-file-system


[1] http://docs.oracle.com/cd/E18930_01/html/821-2424/gkubb.html
[2] http://docs.oracle.com/cd/E19798-01/821-1754/giiab/index.html

--
[Message sent by forum member 'puce']
View Post: http://forums.java.net/node/882970