private void resolveClasses() { // fix for deadlock on JDK 1.5 (MNK-2890, MNK-2914) new Date().toString(); // See LKC-2323 -- A number of Manager methods can be entered from the internals of URLClassLoader (specifically // sun.misc.URLClassPath.getLoader()) and can cause deadlocks. Making sure these methods are invoked once, thus // resolving any class loads, should eliminate the problem. // // NOTE: it is entirely possible more signatures might need to added here final Object o = new Manageable() { @Override public void __tc_managed(final TCObject t) { throw new AssertionError(); } @Override public TCObject __tc_managed() { return null; } @Override public boolean __tc_isManaged() { return false; } }; lookupExistingOrNull(o); // lock(new StringLockID("test"), LockLevel.WRITE); // unlock(new StringLockID("test"), LockLevel.WRITE); logicalInvoke(new FakeManageableObject(), SerializationUtil.CLEAR_SIGNATURE, new Object[] {}); }
private void resolveClasses() { // fix for deadlock on JDK 1.5 (MNK-2890, MNK-2914) new Date().toString(); // See LKC-2323 -- A number of Manager methods can be entered from the internals of URLClassLoader (specifically // sun.misc.URLClassPath.getLoader()) and can cause deadlocks. Making sure these methods are invoked once, thus // resolving any class loads, should eliminate the problem. // // NOTE: it is entirely possible more signatures might need to added here final Object o = new Manageable() { @Override public void __tc_managed(final TCObject t) { throw new AssertionError(); } @Override public TCObject __tc_managed() { return null; } @Override public boolean __tc_isManaged() { return false; } }; lookupExistingOrNull(o); // lock(new StringLockID("test"), LockLevel.WRITE); // unlock(new StringLockID("test"), LockLevel.WRITE); logicalInvoke(new FakeManageableObject(), SerializationUtil.CLEAR_SIGNATURE, new Object[] {}); }