Petals-BC-EJB

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (4)

View Page History
* add the libraries to a shared library deployed before component startup (good)

By default this component uses a shared library called "petals-sl-ejb" which must contains the RMI client libraries of the EJB the EJB targeted EJB container with its JEE EJB specification.

A shared library archive may look like this :
To learn more about shared-libraries, feel free to read [this page|petalsesb:Shared Libraries].

{noformat}petals-sl-ejb.zip
+ META-INF
- jbi.xml
- my-ejb-container-rmi-client.jar
- my-ejb-container-rmi-client-dependency1.jar
- my-ejb-container-rmi-client-dependency2.jar
- my-ejb-container-ejb-specification.jar{noformat}

Adding jar files to the archive is not sufficient. Each jar contained by the shared library must be declared within its JBI descriptor. 

Here is an exemple of such files (jbi.xml file) :
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:petals="http://petals.ow2.org/extensions"
xmlns:jbi="http://java.sun.com/xml/ns/jbi" version="1.0">

<jbi:shared-library class-loader-delegation="self-first" version="my-ejb-container-versionXYZ">

<jbi:identification>
<jbi:name>petals-sl-ejb</jbi:name>
<jbi:description>SharedLibrary EJB for my-ejb-container-versionXYZ</jbi:description>
</jbi:identification>

<jbi:shared-library-class-path>
<jbi:path-element>my-ejb-container-rmi-client.jar</jbi:path-element>
<jbi:path-element>my-ejb-container-rmi-client-dependency1.jar</jbi:path-element>
<jbi:path-element>my-ejb-container-rmi-client-dependency2.jar</jbi:path-element>
<jbi:path-element>my-ejb-container-ejb-specification.jar</jbi:path-element>
</jbi:shared-library-class-path>

</jbi:shared-library>
</jbi:jbi>{code}

Finally, to add this shared library to the component classpath you must add the following section to the JBI descriptor of the component (here with the default shared library for the EJB component) just after the end of the "bootstrap-class-path" element:
{code:lang=xml}<shared-library>petals-sl-ejb</shared-library>{code}

h1. XML to Java binding