MessageDrivenContext

image with no caption

Note

get caller principal() and is callerRole() give you security info about the client. But you don’t HAVE a client.

It’s simple. Message-driven beans don’t have clients. That means they don’t have a client VIEW, so there’s no home interface.

And since there’s no client, there’s no client security information.

So, you can’t call the two methods for getting the home (since you HAVE no home), or the two methods for getting info about the caller’s security.

image with no caption

Get Head First EJB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.