WLS10.3.1 - User principal not propagated properly to an EJB.

(Doc ID 1267040.1)

Last updated on MAY 24, 2017

Applies to:

Oracle Weblogic Server - Version: 10.3.1 and later   [Release: and later ]
Information in this document applies to any platform.


The credential used to call an EJB changes when the bean constructor is called due to JMX lookup in the constructor. Subsequent calls to the bean work without issue.

This occurred under the following scenario:
A web service method makes several calls to a stateless session bean within a single request. The WS makes the call  with the credential 'name1'.

In the EJB constructor, an MBeanServerConnection object is created with the following code:
JMXConnector jmxConnector = JMXConnectorFactory.connect(jmxServiceURL, jmxConnectorProperties);
mbeanServerConnection = jmxConnector.getMBeanServerConnection();

The MBeanServerConnection object is used in the methods to check users, etc.

The credential that is passed to the JMXConnectorFactory is user 'weblogic'. (internal default name)

Since the webservice makes multiple calls to the EJB, additional calls to the EJB use the wrong name (weblogic), rather than the principal that was originally intended to be used (name1).




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