Create a custom access intent policy

 

Overview

Define a custom access intent policy which can be configured for 2.x entity beans.

 

Procedure

  1. Start the Application Server Toolkit.

  2. Optional: Open the J2EE perspective to work with J2EE projects. Click Window > Open Perspective > Other > J2EE.

  3. Optional: Open the Project Explorer view. Click Window > Show View > Project Explorer. Another helpful view is the Navigator view (Window > Show View > Navigator).

  4. 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:

    1. Select File > Import > EAR file > Next

    2. Select the EAR file.

    3. Create a WAS v6 type of Server Runtime. Select New to open the New Server Runtime Wizard and follow the instructions.

    4. In the Target server field, select WebSphere Application Server V6.0 type of Server Runtime.

    5. Select Finish

  5. 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.

  6. In the property pane, select the Extended Access tab.

  7. Beneath the Defined Access Intent Policies panel, select Add.

  8. Specify a unique name by which the policy is referenced when applied to entity beans.

  9. Optional: Specify a description of the policy.

  10. Specify an access type.

  11. Specify the collection scope.

    Transaction

    This is the default. Collections of entities cannot be used beyond the scope of the transaction in which the collection is created.

    ActivitySession

    Collections of entities cannot be used beyond the scope of the ActivitySession in which the collection is created. The collection can be used in a new transaction if that transaction is nested under the original ActivitySession, although you might need to reload the object by querying the underlying data store.

  12. Specify the collection increment. Specify a valid integer to define the chunks that populate a remote collection. This value only applies to remote collections and is ignored by local collections. The default value for access types that result in U locks is 1. Otherwise, the default is 25.

  13. Specify the resource manager prefetch increment. Specify a valid integer to set as the fetch size on the JDBC statement when executing queries for a bean type. The default value is 0.

 

What to do next

Applying access intent policies to entity beans.


 

Related Information


Access intent assembly settings
Access intent policies
Access intent service