Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop Application profiling


Assembling applications for application profiling

To enable application profiling, configure tasks, create an application profile, and declaratively configure a unit of work on necessary methods.

Application profiling enables multiple access intent policies to be configured on the same entity bean, each specified for a particular unit of work. We can use the one of the default policies or create your own.

To create your own access intent policy, see the topic, Creating a custom access intent policy, in the assembly tool information center.


Procedure

  1. Configure tasks. Declaratively configure tasks as described in the following topics that are located in the assembly tool information center:

    • Configure container-managed tasks for Enterprise Java Beans.

    • Configure container-managed tasks for web components.

    • Configure container-managed tasks for application clients.

    On rare occasions, you might find it necessary to configure tasks programmatically. Application profiling supports this requirement with a simple interface that enables a task name to be set before a unit of work is programmatically initiated. Setting a task name and then initiating a transaction or ActivitySession causes the task to be associated with the new unit of work. This interface cannot be used within EJB that are configured for container-managed transactions or container-managed ActivitySessions because units of work can only be associated with a task at the exact time that the unit of work is initiated. The call to set the task name must therefore be invoked before the unit of work is begun. Units of work cannot be named after they are begun. See the topic, Using the TaskNameManager interface.

    If you select the 5.x Compatibility Mode attribute on the Application Profile Service's console page, then tasks configured on J2EE 1.3 applications are not necessarily associated with units of work and can arbitrarily be applied and overridden. This is not a recommended mode of operation and can lead to unexpected deadlocks during database access. Tasks are not communicated on requests between applications that are running under the Application Profiling 5.x Compatibility Mode and applications that are not running under the compatibility mode.

    For a Version 6.0 client to interact with applications run under the Application Profiling 5.x Compatibility Mode, set the appprofileCompatibility system property to true in the client process. We can do this by specifying the -CCDappprofileCompatibility=true option when invoking the launchClient command.

  2. Create an application profile. See the assembly tool information center to complete this task.
  3. Declaratively configure a unit of work on necessary methods. In step one of this article, you defined a task on a method. The task defined on a method only becomes active when a unit of work is begun on that method's behalf. The method must begin a new unit of work for the configured task to be applied. If the method runs under an imported unit of work, then the configured task on the method is ignored and the task (if any) associated with the imported unit of work is used. If the container begins a new unit of work when the method executes, then it is associated with the configured task name. Therefore, the last step in assembling applications for application profiling is to define a unit of work on any method that has a task name (and eventually an Application Profile) associated with it. A unit of work can either be a transaction or an ActivitySession. See the topic, Defining container transactions for EJB modules, for a description on how to configure a transaction on an EJB module. The topic, Configuring transactional deployment attributes, describes how to define other transaction attributes. The topic, Using the ActivitySession service, describes how to use and create an ActivitySession unit of work. For more information about the relationships between tasks and units of work, see the topic, Tasks and units of work considerations.


What to do next

To complete the following tasks using assembly tools see the assembly tool documentation. The following tasks can be done using assembly tools:


Application profiling
Tasks and units of work considerations
Apply access intent policies to methods
Manage application profiles
Use the TaskNameManager interface
Define container transactions for EJB modules
Configure transactional deployment attributes


Related


//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://publib.boulder.ibm.com/infocenter/radhelp/v7r5mbeta/topic/com.ibm.jee5.doc/topics/cejb3.html

+

Search Tips   |   Advanced Search