Definition
| Excerpt |
|---|
Deploy a Java EE resource adapter (RAR) that will be started when the container starts |
| Info | ||
|---|---|---|
| ||
An alternative to using RARs is to use the DataSource and Resource Support provided by CARGO. |
...
Starting JOnAS 5.x with a RAR to deploy:
| Code Block |
|---|
InstalledLocalContainer container = new Jonas5xInstalledLocalContainer(
new Jonas5xStandaloneLocalConfiguration("target/jonas5x"));
container.setHome("c:/jonas/jonas-5.1.2");
Deployable rar = new RAR("src/data/mysql-5.1-localhost.rar");
container.getConfiguration().addDeployable(rar);
container.start();
|
...
Starting JOnAS 5.x with a RAR to deploy:
| Code Block | ||
|---|---|---|
| ||
<cargo containerId="jonas5x" home="c:/jonas/jonas-5.1.2" action="start">
<configuration>
<deployable type="rar" file="src/data/src/data/mysql-5.1-localhost.rar"/>
</configuration>
</cargo>
|
...
Here is the plugin configuration defining a JOnAS 5.x container with a RAR to deploy:
| Code Block | ||
|---|---|---|
| ||
<dependencies> <dependency> <groupId>com.myProject</groupId> <artifactId>mysql-5.1-localhost</artifactId> <version>${rar.version}</version> <type>rar</type> </dependency> </dependencies> <plugins> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>${cargo.version}</version> <configuration> <containerId>jonas5x</containerId> <artifactInstaller> <groupId>org.ow2.jonas.assemblies.profiles</groupId> <artifactId>jonas-full</artifactId> <version>5.2.1</version> <classifier>bin</classifier> </artifactInstaller> <configuration> <deployables> <deployable> <groupId>com.myProject</groupId> <artifactId>mysql-5.1-localhost</artifactId> <type>rar</type> </deployable> </deployables> </configuration> </configuration> </plugin> </plugins> |
For more information...
...