# Ejb-handler Handler

It is responsible for persisting the object via a stateless session bean. The following attributes are supported:

<table class="confluenceTable tablesorter tablesorter-default stickyTableHeaders" id="bkmrk-attribute-usage-jndi" role="grid"><thead class="tableFloatingHeaderOriginal"><tr class="tablesorter-headerRow" role="row"><th aria-disabled="false" aria-label="Attribute: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="0" role="columnheader" scope="col" tabindex="0"><div>**Attribute**</div></th><th aria-disabled="false" aria-label="Usage: No sort applied, activate to apply an ascending sort" aria-sort="none" class="confluenceTh tablesorter-header sortableHeader tablesorter-headerUnSorted" data-column="1" role="columnheader" scope="col" tabindex="0"><div>**Usage**</div></th></tr></thead><tbody aria-live="polite" aria-relevant="all"><tr role="row"><td class="confluenceTd">jndi

</td><td class="confluenceTd">JNDI path to EJB Home interface

</td></tr><tr role="row"><td class="confluenceTd">if

</td><td class="confluenceTd">EL expression that must be evaluated to true prior to handler action

</td></tr><tr role="row"><td class="confluenceTd">unless

</td><td class="confluenceTd"> EL expression that must be evaluated to false prior to handler action</td></tr></tbody></table>

<span class="notranslate">Inside the handler, you should specify the suitable insert-method, delete-method and update-method tags.</span> 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. <span class="notranslate">The following example shows an ejb-handler that uses an EJB whose only parameter is the data object:</span>

```western
<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:

```XML
<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>
```