Ejb-handler Handler
It is responsible for persisting the object via a stateless session bean. The following attributes are supported:
Attribute
|
Usage
|
---|---|
jndi |
JNDI path to EJB Home interface |
if |
EL expression that must be evaluated to true prior to handler action |
unless |
EL expression that must be evaluated to false prior to handler action |
Inside the handler, you should specify the suitable insert-method, delete-method and update-method tags. There is a mandatory attribute named method. This attribute must contain the name of the method to invoke. Additionally, the parameters to use can be specified. The following example shows an ejb-handler that uses an EJB whose only parameter is the data object:
<datanode name="network">
<ejb-handler jndi="com.soffid.sample/NetworksBean">
<insert-method method="insert"/>
<delete-method method="delete"/>
<update-method method="update"/>
</ejb-handler>
...
</datanode>
This second example shows how to call a method with slightly complex parameters:
<datanode name="acl">
<ejb-handler jndi="com.soffid.sample/NetworksBean" >
<insert-method method="grant">
<parameter value="${parent.instance}"/>
<parameter value="${instance}"/>
</insert-method>
<delete-method methos="revoke">
<parameter value="${instance}"/>
</delete-method>
</ejb-handler>
</datanode>