...
- Before deploying your GBean, you still have to compile it and build a proper .jar file. Maven is used to build Geronimo, so it can be used to build your GBean project. You have to write a
pom.xml
file. See Maven website for more information about the file.Code Block xml xml title pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.apache.geronimo.sample</groupId> <artifactId>simpleServer</artifactId> <packaging>jar</packaging> <version>1.0</version> <name>sample GBean as a simple server</name> <dependencies> <dependency> <groupId>org.apache.geronimo.framework</groupId> <artifactId>geronimo-kernel</artifactId> <version>2.1.3</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> </project>
- Deploy the .jar with to the server via the JAR repository portlet in Geronimo administrative console. For example, you can deploy the SimpleServerGBean with the following information:
- GroupId: org.apache.geronimo.sample
- ArtifactId: simpleServer
- Version: 1.0
- Type: jar
- Deploy the deployment plan to the server using the Deploy New portlet in the administrative console. Or you can deploy the plan using the deployer tools or GShell command.
- If success, you can visit http://localhost:7777 and will get an echo from the server.
Geronimo Bootstrap
When Geronimo starts, the <GERONIMO_HOME>/bin/server.jar
is executed with org.apache.geronimo.cli.daemon.DaemonCLI
as the main class. This will boot the Geronimo kernel, and load initial GBeans from module j2ee-system-2.1.3.car
into the kenel.