9.17.1 Setting method
This section describes how to set up an interceptor. If you want to use the interceptor on Cosminexus, specify the default interceptor as an EJB-JAR property.
- Organization of this subsection
(1) Attribute file to be edited
EJB-JAR attribute file
(2) Acquiring the attribute file to be edited and setting the attributes
-
Acquiring the attribute file
You execute the following command to acquire the EJB-JAR property file:
- Execution format
cjgetappprop [server-name] [-nameserver provider-URL] -name J2EE-application-name -type ejb -resname display-name-of-EJB-JAR -c path-of-the-hitachi-EJB-JAR-property-file
- Example of execution
cjgetappprop MyServer -name adder -type ejb -resname adder -c C:\home\adder_ejb.xml
-
Setting the attributes
You execute the following command to apply the values of the EJB-JAR property file:
- Execution format
cjsetappprop [server-name] [-nameserver provider-URL] -name J2EE-application-name -type ejb -resname display-name-of-EJB-JAR -c path-of-the-hitachi-EJB-JAR-property-file
- Example of execution
cjsetappprop MyServer -name adder -type ejb -resname adder -c C:\home\adder_ejb.xml
- Note:
-
You can acquire the EJB-JAR property file included in a running application, but you cannot apply the defined and related information of the EJB-JAR property file.
(3) Attribute settings to be edited
The following table describes the settings (<interceptor-binding>) for the default interceptor:
Items |
Mandatory |
Corresponding tags |
---|---|---|
Explanation |
O |
<description> |
EJB name of the default interceptor (specify wildcard) |
Y |
<ejb-name> |
Class name of the interceptor class |
O |
<interceptor-class> |
Setting an execution order of interceptors (Class name of the interceptor class) |
O |
<interceptor-order>-<interceptor-class> |
Setting a call inhibit of the default interceptor |
O |
<exclude-default-interceptors> |
Setting a call inhibit of the class level interceptor |
O |
<exclude-class-interceptors> |
Business method name of EJB |
O |
<named-method>-<method-name> |
Method parameters |
O |
<named-method>-<method-params>-<method-param> |
For details on the property settings, see 3.3.1 Specifications of the HITACHI EJB-JAR Property file in the uCosminexus Application Server Application and Resource Definition Reference Guide.
For the method to set interceptors and notes on interceptors, see 2.15 Using interceptors in the uCosminexus Application Server EJB Container Functionality Guide.