The ADFContext memory leak warning message during EJB call

(Doc ID 2134323.1)

Last updated on OCTOBER 11, 2017

Applies to:

Oracle JDeveloper - Version and later
Information in this document applies to any platform.


There is a standard RMI client to call EJB deployed on Weblogic Server  The source code is outlined as below.

try {
  ctx = new InitialContext(jndiProps);
  appModuleService =  ctx.lookup("AppModuleServiceBean#demo.model.common.serviceinterface.AppModuleService");
  appModuleService.getClass().getMethod(methodName, paramTypes).invoke(appModuleService, paramArray);
} catch (Exception e) {

The following warning message always be seen with each EJB method invocation.

<Apr 27, 2016 9:17:01 AM UTC> <Warning> <oracle.adf.share.ADFContext> <BEA-000000> <Automatically initializing a DefaultContext for getCurrent.
Caller should ensure that a DefaultContext is proper for this use.
Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
This message may be avoided by performing initADFContext before using getCurrent().
For more information please enable logging for oracle.adf.share.ADFContext at FINEST level.>
<Apr 27, 2016 9:17:01 AM UTC> <Error> <oracle.adf.share.ADFContext> <BEA-000000> <ADF detected an ADFContext leak.
Please see the documentation for more information about handling ADFContext leaks.
For more information about the leaking ADFContext please enable logging for oracle.adf.share.ADFContext at FINEST level.

Is it true that the EJB calls could cause memory leaks?  


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms