...
Code Block |
---|
InstalledLocalContainer container = new Jonas5xInstalledLocalContainer( new Jonas5xStandaloneLocalConfiguration("target/jonas5x")); container.setHome("c:/jonas/jonas-5.1.2"); Deployable ejb = new EJB("src/data/some-ejb3.jar"); container.getConfiguration().addDeployable(ejb); container.start(); |
Example using the Ant
...
tasks
Starting JOnAS 5.x with an EJB JAR to deploy:
Code Block | ||||
---|---|---|---|---|
| ||||
<cargo containerId="jonas5x" home="c:/jonas/jonas-5.1.2" action="start"> <configuration> <deployable type="ejb" file="src/data/some-ejb3.jar"/> </configuration> </cargo> |
Example using the
...
Maven 3 plugin
Here is the plugin configuration defining a JOnAS 5.x container with an EJB JAR to deploy:
Code Block | ||||
---|---|---|---|---|
| ||||
<dependencies> <dependency> <groupId>org.codehaus.cargo</groupId> <artifactId>simple-ejb</artifactId> <version>${simple-ejb.version}</version> <type>ejb</type> </dependency> </dependencies> <plugins> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2maven3-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> <deployables> <deployable> <groupId>org.codehaus.cargo</groupId> <artifactId>simple-ejb</artifactId> <type>ejb</type> </deployable> </deployables> </configuration> </plugin> </plugins> |
...
For more information about how deployment in CARGO in Codehaus Cargo works, please read:
- How deployables work, which explains how to instanciate and personalize deployables.
- How deployers work, which explains how the different deployers work.