Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 978

Summary: Request for non_existent() call on a dead object to not generate an error level log message
Product: JacORB Reporter: Richard G. Hash <richard.hash>
Component: ORBAssignee: Mailinglist to track bugs <jacorb-bugs>
Status: RESOLVED FIXED    
Severity: enhancement CC: jacorb
Priority: P5    
Version: 3.4   
Hardware: All   
OS: All   

Description Richard G. Hash 2014-02-26 17:38:24 UTC
Note: entering this to capture email discussion with Nick.

Currently in 3.4 calling non_existent() on a dead object generates an error level log message with a stack trace. Very old versions of JacORB (e.g. 2.3.1) just silently threw the exception and let the caller deal with it).

This is happening in the orb.Delegate, servant_preinvoke(), which throws a OBJECT_NOT_EXIST, but the outer catch{} block is calling
   logger.error("unexpected exception during servant_preinvoke", e);
before it re-throws the exception.

Basically we think that a OBJ_NOT_EXISTS on a non_existent should just silently return 'false' (without error level logging).

Suggestion from Nick:
########################
So we would have
   public ServantObject servant_preinvoke( org.omg.CORBA.Object self,
               String operation,
               @SuppressWarnings("rawtypes") Class expectedType ) and
/**
  * Only called by servant_preinvoke. Special case method used by non_existent to disable logging for object not exist
  */
private ServantObject servant_preinvoke( org.omg.CORBA.Object self,
                String operation,
                @SuppressWarnings("rawtypes") Class expectedType,
		boolean logObjectNotExist )

The test case could do something similar to org.jacorb.test.util.JDKLoggerTest where it checks the file contents for the log file. And the actual test could reuse orb.NonExistentLocalTest.
Comment 1 Nick Cross 2014-03-21 05:37:09 UTC
Fixed instead by changing the logging level inside preinvoke for simplicity.

SHA f049e37ff187fc908172312e01f48f49b6b67745