Show TOC Start of Content Area

Procedure documentation Setting the MDB Properties in the ejb-j2ee-engine.xml  Locate the document in its SAP Library structure

Use

In the ejb-j2ee-engine.xml there are specific properties under the <bean-props> tag. You can use these properties to:

·        Register the endpoint on each server process in the cluster. For example, in case of JMS destination Topic, activating the endpoint on each server process would mean that each JMS message will be received by the message-driven bean on each server process, which could break the application logic. Setting the property <single-server-node> to true will ensure that the message will be received only once in the cluster. This property could be also applicable for other Resource Adapters except the SAP JMS Resource Adapter.

·        Set one-to-one mapping between the endpoint and a bean instance. This means that each call to the same endpoint instance will be delegated to one and the same bean instance.

·        Specify the name of the Resource Adapter to register the endpoint.

·        Specify the number of attempts to activate an endpoint. This could be helpful if the Resource Adapter or the EIS system at the back-end is not fully operational during MDB application startup.

·        Specify the interval (in milliseconds) between two consecutive attempts to activate an endpoint.

Procedure

To register the endpoint on each server process in the cluster, you use the <single-server-node> property.

<bean-props>

   <property>

      <property-name>single-server-node</property-name>

      <property-value>true</property-value>

   </property>

</bean-props>

To set one-to-one mapping between the endpoint and the bean instance, you use the <stateful-mdb>property.

<bean-props>

   <property>

      <property-name>stateful-mdb</property-name>

      <property-value>true</property-value>

   </property>

</bean-props>

To specify the name of the Resource Adapter to register the endpoint, you use the <resource-adapter-name> property.

<bean-props>

   <property>

      <property-name>resource-adapter-name</property-name>

      <property-value>"SAP_RA"</property-value>

   </property>

</bean-props>

To specify the number of attempts to activate an endpoint, you use the <reconnect-attempts> property.

<bean-props>

   <property>

      <property-name>reconnect-attempts</property-name>

      <property-value>5</property-value>

   </property>

</bean-props>

To specify the interval (in milliseconds) between two consecutive attempts to activate an endpoint, you use the <sleep-between-attempts> property.

<bean-props>

   <property>

      <property-name>sleep-between-attempts</property-name>

      <property-value>1000</property-value>

   </property>

</bean-props>

More Information

Editing the ejb-j2ee-engine.xml – Detailed description about how to edit the ejb-j2ee-engine.xml.

ejb-j2ee-engine_3_0.xsd – Detailed description of the ejb-j2ee-engine.xml XML schema.

End of Content Area