"java.lang.IllegalStateException" thrown when invoking getCallerPrincipal or isCallerInRole methods in message-driven beans
 Technote (troubleshooting)
 
Problem(Abstract)
Invoking the getCallerPrincipal and isCallerInRole methods is not allowed within message-drive bean methods. This is documented in Section 15.5.1 of the Enterprise JavaBeans™ (EJB™) 2.0 specification.
 
Cause
Message-driven beans are a new technology function introduced in the EJB 2.0 specification. A message-driven bean is a stateless component that is invoked by the EJB container as a result of the arrival of a Java™ Message Service (JMS) message. Invoking the getCallerPrincipal and isCallerInRole methods is not allowed in the message-driven bean methods because the EJB container does not have a client security context. The Container will throw the java.lang.IllegalStateException if either of these methods are invoked.
 
Resolving the problem
Remove getCallerPrincipal and isCallerInRole method calls from the message-driven bean.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java Message Service (JMS)
Operating system(s): Windows
Software version: 5.0.2.4
Software edition:
Reference #: 1162652
IBM Group: Software Group
Modified date: Mar 8, 2004