JDK-6663865 : Clean up jbroker code
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: generic
  • Submitted: 2008-02-15
  • Updated: 2010-12-03
  • Resolved: 2008-06-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u10 b23Fixed 7Fixed
Related Reports
Relates :  
Relates :  
Description
These changes are the less critical parts of CR 6657688 that didn't get put back in time for build 13. It includes at least:
  1) Factoring the conditionally compiled unit test main methods out to separate source
     files.
  2) Updating unit test scripts for (1).
  3) Eliminating default defines of DEBUG. Note that with 6657688 the body of LogFprintf
     was made empty for compiles done during builds, making the code conditionally compiled
     with DEBUG effectively null operations.
For the sake of diagnosing future problems with jbroker related to per-dir and per-file
security checks, it would probably be useful to change the above DEBUG-conditioned code to code keyed off a "verbose" flag that can be enabled with a registry key  (not a command line option, as support staff and/or users cannot ordinarily insinuate the option into jbroker's normal startup during an install. In this case LogFprintf should be changed to send "fatal error" information with standard deployment routine "logit" and each fatal error msg sent to the log should include enough details to determine the specific file/dir/bundle involved with the error. This alternative to either "standard stream output" or an error "message box" is required because the former simply doesn't work for the kind of Windows app jbroker is and the latter violates UI specs with information that end users can't use,

EXCEPT that it would be nice for an RFE to ammend the UI spec to accomodate a special case that is unavoidable and has no real workaround because of Windows OS semantics. This involves the case where a jbroker "secure move" operation is stymied by Windows error 32 (ERROR_SHARING_VIOLATION "The process cannot access the
file because it is being used by another process"). In this case a carefully worded message box could be very useful to inform a user that an install cannot be completed until conflicting use of a (exactly specified) directory or file is completed. In plain words, it means "your computer is trying to both use and install at the same time, or it is running a program running in an install-related folder that prevents installation from completing." The current Java Kernel architecture supports automatic recovery if for this special case a user got the chance to wait for the conflict to go away (e.g. a disk backup operation), or to take action to correct it (e.g. cd back out of "Sun's special transient folders"). Also, this illustrates an issue that extends beyond jbroker (e.g. the online installer .exe file has similar issues with error 32).

Comments
EVALUATION This fix dragged out but that gave the opportunity to notice unintended log operation that caused file creation on every Vista install.
15-04-2008

SUGGESTED FIX Here are changes that cover the first part of the CR description: http://sa.sfbay.sun.com/projects/deployment_data/6u10/6657688.1
15-02-2008

EVALUATION The episode with CR 6661452 (jbroker op prevented by another process' use of a file or directory) makes clear how valuable jbroker diagnostic info can be.
15-02-2008