|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (17)
View Page Historyh1. Why use shared libraries ?
todo
Since the petals-bc-ejb is a generic binding component that allows to call Enterprise Java Beans running on different kind of application servers, you must add your application specific RMI client libraries to the component classpath. There are three solutions to add the libraries to do so :
Since the petals-bc-ejb is a generic binding component that allows to call Enterprise Java Beans running on different kind of application servers, you must add your application specific RMI client libraries to the component classpath. There are three solutions to add the libraries to do so :
Some component, like the petals-bc-ejb, the petals-bc-jms and some others requires external libraries to work properly. There are three solutions to add the libraries to do so :
* add the libraries directly in the component classpath (bad)
* add the libraries to each deployed service unit (average)
* add the libraries to a shared library deployed before component startup (good)
* add the libraries to each deployed service unit (average)
* 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 targeted EJB container with its JEE EJB specification.
h1. Anatomy of a shared library
Adding jar files to the archive is not sufficient. Each jar contained by the shared library must be declared within its JBI descriptor.
h2. JBI descriptor of a shared library
Here is an exemple of such files (jbi.xml file) :
Here is an exemple of such files (jbi.xml file) :
{code:lang=xml}
{code:lang=xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
</jbi:shared-library>
</jbi:jbi>{code}
{code}
h2. Using a shared library
{code:lang=xml}<shared-library>my-shared-library</shared-library>{code}
h1. Creating new shared libraries :
\\
To create a new shared library, you can proceed by hand, creating the directory structure, the {{jbi.xml}} and package the whole by yourself.
Alternatively, if every library you need is available on maven repositories, you can use the _maven-archetype-petals-jbi-shared-library_ to create a new shared library :
Alternatively, if every library you need is available on maven repositories, you can use the _maven-archetype-petals-jbi-shared-library_ to create a new shared library :
{info:title=Info}
To create a new shared library using our maven plugins, if you've already installed maven, you can type the following command :
{noformat}
mvn archetype:create
mvn archetype:create
{noformat}
{note:title=Note}
*Note :* Of course this command has been formatted. You should type it as a single line.
{info} {note}
{column}