Skip to main content

Why is there a 2nd prompt for authentication when running an applet client?

  • February 16, 2013
  • 0 replies
  • 0 views

Problem

  • Product Name: VisiBroker for Java
  • Product Version: 5.2.1
  • Product Component: Applet Client
  • Platform/OS Version: All

During the applet's start-up, it first download all the jar files specified (vbsec.jar, vbjorb.jar, lm.jar, etc.). If authentication is required on the web server, the applet client will encounter its first user prompt. However, later on during the initialization of the ORB/applet, the JVM requests this resource:

com.inprise.vbroker....ORBMsgs.properties

At this time, the JVM goes back to the web server to download this file, even though there is one such file in the local cached jar (vbjorb.jar). This causes the applet to be prompted the 2nd time for authentication. Why doesn't the JVM looks into the local cached jar first for the file before going all the way back to the web server to load this resource file?

Resolution

A research of JVM documentation shows that this is the order of resource loading:

ResourceBundle.getResource("")

follows this order of loading:

- check cached jar for .class
- if no such class available, go back to the downloading host for .class
- if no such class available, go back to the downloading host for .properties

This order can not be altered, as it is the standard behavior of JVM class loader.

Therefore, to obtain this file: com.inprise.vbroker....ORBMsgs.properties, the JVM will need to go back to the web server again.

Old KB# 26383


#applet
#Security
#VisiBroker
#AppServer
#ORBMsgs.properties