aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes getCallerPrincipal throws IllegalStateException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "getCallerPrincipal throws IllegalStateException" Watch "getCallerPrincipal throws IllegalStateException" New topic
Author

getCallerPrincipal throws IllegalStateException

Grand Puba
Greenhorn

Joined: Oct 28, 2004
Posts: 11
When a Stateless SessionBean's ejbCreate calls getCallerPrincipal() on the SessionContext, how will the container react? Will it return *null* (the API says this method will never return *null* ) or will it throw a system exception? And if so, which one? I should expect IllegalStateException?

Thanx,

Puba


"You don't need eyes to see, you need vision" -- Faithless
Sandesh Tathare
Ranch Hand

Joined: Jun 22, 2003
Posts: 82
Puba,

When a Stateless SessionBean's ejbCreate calls getCallerPrincipal() on the SessionContext, it will throw java.lang.IllegalStateException.


Regards,<br />Sandesh<br />(SCJCP, SCWCD, SCBCD - 99%, OCP-1)<br /> <br />Either find a way or create one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getCallerPrincipal throws IllegalStateException