Bug Description: The com/sun/jndi/cosnaming/CNCtx class now uses a class called OrbReuseTracker to try to manage ORB destruction (I believe this is to try to address an Object leak issue).
This uses a reference counting strategy to detect when an Orb can be destroyed.
An OrbReuseTracker instance is only created if the ORB is created within CNCtx, not if one is passed to it.
However, that ORB can validly "escape" from the CNCtx object and be used by code above, such that the CNCtx goes out of scope, is collected and finalized, causing the OrbReuseTracker to destroy the ORB, even though the ORB is in use elsewhere.
A testcase has been uploaded to ftp://sunsolve.sun.com/cores as ibm-20070201.zip.
To reproduce the issue:
1. Extract the files.
2. Run javaidl.bat
3. The test hangs after a GC cycle and does not complete.
The test completes. Run the same test on 5.0 to see the expected behaviour.