Apply access intent policies to methods
Overview
You apply an access intent policy to a method, or set of methods, in an application's entity beans through the assembly tools.Note: Method level access intent is deprecated in v6.
Procedure
- Start the Application Server Toolkit.
- Optional: Open the J2EE perspective to work with J2EE projects. Click Window > Open Perspective > Other > J2EE.
- Optional: Open the Project Explorer view. Click Window > Show View > Project Explorer. Another helpful view is the Navigator view (Window > Show View > Navigator).
- Create a new application EAR file or edit an existing one.
For example, to change attributes of an existing application, use the import wizard to import an EAR file. To start the import wizard:
- Select File > Import > EAR file > Next
- Select the EAR file.
- Create a WAS v6.0 type of Server Runtime. Select New to open the New Server Runtime Wizard and follow the instructions.
- In the Target server field, select WebSphere Application Server v6.0 type of Server Runtime.
- Select Finish
- In the Project Explorer view of the J2EE perspective, right-click the Deployment Descriptor: EJB Module Name under the EJB module for the bean instance, then select Open With > Deployment Descriptor Editor. A property dialog notebook for the EJB project is displayed in the property pane.
- Select the Access tab.
- On the right side of the Access Intent for Entities 2.x (Method Level) panel, select Add. The Add Access Intent panel displays.
- Specify the Name for your new intent policy.
- Select the Access intent name from the drop-down list.
- Enter a Description to help you remember what this policy does.
- Optional: Select Read Ahead Hint. A single access intent read ahead hint might not refer to the same bean type in more than one relationship. For example, if a Department enterprise bean has a relationship employees with the Employee enterprise bean, and also has a relationship manager with the Employee enterprise bean, then a read ahead hint cannot specify both employees and manager.
- Click Next. The next Add Access Intent panel displays, with optional attributes.
- Optional: Decide whether or not to overwrite these optional access intent attributes. Click on those you want to change.
- Click Next. The next Add Access Intent panel, with a list of Enterprise Beans, displays.
- Select one or more Enterprise Beans from the list.
Note: If you selected Read Ahead Hint in an earlier step, one can only select ONE bean at this step.
- Click Next. The next Add Access Intent panel, with a list of methods, displays.
- Select the methods you want to use.
- If you DID NOT select Read Ahead Hint in an earlier step, click Finish. If you DID select the Read Ahead Hint option, one can click Next to specify your Read Ahead Hint for the specified bean. The next Add Access Intent panel, with a list of EJB preload paths, displays.
- Edit the EJB preload path by selecting relationship roles from the Relationship roles: window.
- Click Finish. A new entry is created in the Access Intent for Entities 2.x (Method Level) panel
See Also
Access intent policies
Related Tasks
Using access intent policies
See Also
Access intent -- isolation levels and update locks