Question

Is there an option/parameter to deploy an application client with java-web-start enabled with the asadmin command? I work with GlassFish 3.1.1.

I have a jar-file which works well, when I deploy it in the webgui

Type: "Application Client"
Java-Web-Start [x]

I look for something like this:

asadmin deploy --type application --property java-web-start-enabled=true /path/to/jar/file/myApp.jar
Was it helpful?

Solution

An "Application Client" deployed in the glassfish can only started by java-web-start, when the jar-file is signed. So when I deploy it with the "glassfish web administration console", the jar-file is signed and everything works as expected. When I deploy it throught a script (for example jenkins), the web start parameter doesn't work and the files aren't signed. The result: java web start doesn't work.

Solution: I sign the jar file with a maven plugin. For that, I first had to import the Glassfish certificate into the keystore

keytool -importkeystore -srckeystore "../../glassfish/domains/domain1/config/keystore.jks"  

The pom-file with the "maven-jarsigner-plugin" plugin looks like:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jarsigner-plugin</artifactId>
    <version>1.2</version>
    <configuration>
      <alias>s1as</alias>
      <storepass>changeit</storepass>
      <keypass>changeit</keypass>
    </configuration>
    <executions>
      <execution>
        <id>sign</id>
        <goals>
          <goal>sign</goal>
        </goals>
      </execution>
      <execution>
        <id>verify</id>
        <goals>
          <goal>verify</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

Now I can deploy the application with a asadmin deployment script, and java-web-start is enabled!

OTHER TIPS

The command that you have written is very close to the command that you want... see http://download.oracle.com/docs/cd/E18930_01/html/821-2433/deploy-1.html#scrolltoc.

The lead engineer on the application client/Java Web Start support features of GlassFish has written a number of blog entries about the feature: http://blogs.oracle.com/quinn/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top