invokeInstancePreDestroy(instance, true);
}
public void invokeInstancePreDestroy(Object instance, boolean validate)
throws InjectionException {
ComponentInvocation inv = invocationMgr.getCurrentInvocation();
//if ComponentInv is null and validate is true, throw InjectionException;
//if component JndiNameEnvironment is null and validate is true, throw InjectionException;
//if validate is false, the above 2 null conditions are basically ignored,
//except that when fine logging is enabled, fine-log a message.
if( inv != null ) {
JndiNameEnvironment componentEnv = compEnvManager.getJndiNameEnvironment(inv.getComponentId());
if (componentEnv != null) {
invokePreDestroy(instance.getClass(), instance, componentEnv);
} else if (validate || _logger.isLoggable(Level.FINE)) {
String msg1 = localStrings.getLocalString(