The following table gives an overview of the key configuration settings used in ejb-jar.xml that are required to setup the providers. It also lists the recommended EJB/JNDI naming conventions to be used.
Table 7-2. Provider Setup
ejb-name | ejb-class | jndi-name | session-type | transaction-type | trans-attribute |
myProvider_Mandatory | org.openmdx.compatibility.application.dataprovider.transport.ejb.server.Dataprovider_1Bean | .../myProvider/NoOrNew | Stateless | Container | Mandatory |
myProvider_Supports | org.openmdx.compatibility.application.dataprovider.transport.ejb.server.Dataprovider_1Bean | .../myProvider/Supports | Stateless | Container | Supports |
myProvider_ Never | org.openmdx.compatibility.application.dataprovider.transport.ejb.server.Dataprovider_1Bean | .../myProvider/Never | Stateless | Container | Never |
Please note:
To be a provider with transaction attribute Mandatory or Supports the designated provider must be able to perform a rollback.
A provider with transaction attribute Mandatory can only call subsequent providers with either transaction attribute Mandatory or Supports.
A provider with transaction attribute Supports can always call subsequent providers with transaction attribute Supports. Only if the provider is called in a transactional context, it can call subsequent providers with transaction attribute Mandatory. Only if the provider is NOT called in a transactional context, it can call subsequent providers with transaction attribute Never.
A provider with transaction attribute Never can only call subsequent providers with either transaction attribute Never or Supports.
The most common way is to write a provider with transaction attribute Supports because transactional and non-transactional calls are supported.
To see how a provider can be configured, please refer to the provided lab example. The file ejb-jar.xml in the openmdx-example-lab/etc/org.openmdx.example.lab1.appserver.jboss/lab_Never/META-INF directory shows in detail how to setup an example provider.