Granting Client Access to an ADF Business Components EJB Session Bean

JDeveloper provides default read/write access to any Business Components EJB session bean to users in the group Administrators. You must alter the default orion-application.xml before deployment to grant read/write access to users in other groups, represented throughout this topic as users.

To grant client access to a Business Components EJB session bean:

  1. Package the business components as an EJB session bean. When complete, the project should contain the files ejb-jar.xml and orion-ejb-jar.xml .

  2. In the Business Components project, right-click ejb-jar.xml and choose Edit EJB Module:

    1. On Security Roles, add users.

    2. On Method Permissions, choose the users from Security Roles and the package module name from Methods.

  3. In the Business Components project, right-click orion-ejb-jar.xml, select Propert ies:

    1. On Security Role Mapping, add users .

    2. On Details, add Groups name users (you can leave Value empty).

    3. On Default Method Access, add Groups users.

  4. Choose File | New to open the New Gallery.

  5. In the Categories tree, expand General and select Deployment Descriptors. In the Items list, double-click orion-application.xml.

    If the category or item isn't found, make sure the correct project is selected, and choose All Technologies in the Filter By dropdown list.

    A file will be created and opened for editing.

  6. Change values in the file, as shown in this example:
        <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://xmlns.oracle.com/ias/dtds/orion-application.dtd">
    <orion-application>
    <data-sources path="./data-sources.xml"/>
    <ejb-module remote="false" path="ProjectNameEJB.jar" />
    <namespace-access>
    <read-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="users" />
    </security-role-mapping>
    </namespace-resource>
    </read-access>
    <write-access>
    <namespace-resource root="">
    <security-role-mapping name="<jndi-user-role>">
    <group name="users" />
    </security-role-mapping>
    </namespace-resource>
    </write-access>
    </namespace-access>
    </orion-application>
  7. Deploy.

Related topics
About J2EE Deployment
About J2EE Archive Formats
About Deployment Profiles
About Deployment Descriptors
About ADF Business Components Deployment
Packaging J2EE Applications
Deploying J2EE Applications
Deploying Applications to J2EE Application Servers

 

Copyright © 1997, 2004, Oracle. All rights reserved.