Skip to main content

Why is fscontext.jar used in Java Web Start?

1 reply [Last post]
garfieldpb
Offline
Joined: 2009-07-19

Dear Tim and Everybody,

There is a question about Java Web Start(JWS below) in GlassFish V2.1.
When reading the GlassFish's source (*) ,I found that C:\glassfish\imq\lib\fscontext.jar
is used in JWS module.As I know,fscontext.jar is used in Message Queue ,
so why this jar file is used in JWS module?
Could you please tell me the function of the fscontext.jar in JWS?

Thanks for your time to read my question and look forward to your reply.

(*) These two places below show how fscontext.jar is used in JWS module.
com.sun.enterprise.appclient.jws.boot.ClassPathManager#locateDownloadedJars()
-----------------------------------------------------------------------------------
Line184
public URL[] locateDownloadedJars() throws
ClassNotFoundException,
URISyntaxException,
NoSuchMethodException,
IllegalAccessException,
InvocationTargetException,
MalformedURLException {

String probeClassNames = System.getProperty("com.sun.aas.jar.probe.class.names",
- snip -
"com.sun.jms.spi.xa.JMSXAConnection," /* imqjmsra */ +
"com.sun.jndi.fscontext.FSContext" /* fscontext */
);

return locateJARs(probeClassNames);
}
Line218
-----------------------------------------------------------------------------------

com.sun.enterprise.appclient.jws.AppclientJWSSupportInfo#preloadAppserverContent()
-----------------------------------------------------------------------------------
- snip -
Line856
AppserverContentOrigin mqlibFilesOrigin = new AppserverContentOrigin(
NamingConventions.APPSERVER_CATEGORY,
NamingConventions.APPSERVER_LIB_FILES);

File mqRoot = new File(installRootDir, "imq");
File mqlibRoot = new File(mqRoot, "lib");

addAppserverStaticContent(mqlibRoot, mqlibFilesOrigin, false /* isMain */, "fscontext.jar");
appserverOrigins.put(NamingConventions.APPSERVER_MQLIB_FILES, mqlibFilesOrigin);
- snip -
-----------------------------------------------------------------------------------

Message was edited by: garfieldpb

Message was edited by: garfieldpb

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tjquinn
Offline
Joined: 2005-03-30

App clients can use JMS messaging, and as you point out fscontext.jar is part of the MessageQueue implementation of JMS. It is not practical for GlassFish to analyze each app client to determine exactly which JARs it does and does not need at runtime. Because of this, the Java Web Start support in GlassFish must be aware of that JAR and make it available to all clients.

We made some progress in shrinking the app client container's footprint in going from GlassFish 2 to GlassFish 3 and we would like to do even better going forward. Also, there are some newer features in Java Web Start we would like to use to optimize downloading even more.

- Tim