The problem with isCallerInRole()...

the Bean Provider hard codes a role name, but how does he know what roles the App Assembler will use? And what if there’s more than one Bean Provider?

image with no caption
image with no caption
image with no caption

The App Assembler must map between the programmer’s hard-coded (completely fake) role name, and the abstract role she wants to define for this application.

abstract role name: KeyAccounts

bean A role name: VIPCustomer

bean B role name: Enlightened-Customers

Note

three different names for the SAME role!! Annie wants the deployer to map REAL customer groups to “KeyAccounts” and not those other two names, but those names are in code, and she can’t touch the Java source code!

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.