In this EJB sample two session beans are used to demonstrate various uses of role-based security. Specifically, this sample shows how a certain security role can be assumed when executing code and how to use a security role to grant or block access to the execution of certain methods.
In the example, a RoleCheckerBean EJB, running under the security role engineer, is called by a web service RoleCheckerControlTest.jws, running under the security role manager. A third EJB, InvokedBean, is in turn invoked by the RoleCheckerBean EJB. The RoleCheckerBean EJB has the following methods:
The code of the EJBs is located in the security folder of the EJBs project in the SamplesApp sample application. In the file system the location is:
BEA_HOME\weblogic81\samples\workshop\SamplesApp\EJBs\security
The web service that you run as a client application to test the EJBs and the EJB control that you use to locate and reference the RoleCheckerBean EJB are located in the security folder of the EJBs_ClientApps project in the SamplesApp sample application. In the file system the location is:
BEA_HOME\weblogic81\samples\workshop\SamplesApp\EJBs_ClientApps\security
To Run the Sample
BEA_HOME/weblogic81/samples/workshop/startWebLogic.sh