Class settings starfish v3 classpath

I am developing a j2ee application for Glassfish v3 that will remotely run EJB on the jboss 5 application server. For this to work, my application must have jboss client jars in the class path. I managed to do this by putting the client jar files in my application, but this increases the size by aprox 10mb, so downloading the application becomes a problem.

How can I put these jars in another place so that gf collects them, so I don’t need to keep them in my application?

+5
source share
4 answers

If necessary, you can put them in the server class path. Change to the lib domain directory.

+1

domain.xml Glassfish classpath-suffix java-config, , Glassfish .

+1

jar , - . , , , WAR ( , ).

xxx.properties config domain.xml

 <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="${com.sun.aas.instanceRoot}/MY_VALUE" classpath-suffix="">
      ...
 </java-config>

MY_VALUE :

  • /
  • /xxx.properties

classpath .

- :

String path = System.getProperty("java.class.path");
LOG.info("Classpath is : '" + path + "'.");

, ... ClassLoader.getResourceAsInputStream()

+1

1. GF3, . GF3.

JAR, . JAR . instance-root/lib/applibs. .

, --libraries asadmin.

, , . .

Option 2 . Put them in the Domainname / lib Glassfish directory. It will be automatically downloaded and available for all your applications in the same domain after reboot.

0
source

All Articles