geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: A Simple Plan
Date Wed, 19 Oct 2005 18:06:14 GMT

On Oct 19, 2005, at 10:17 AM, Davanum Srinivas wrote:

> Hi Team,
> I'd like to programatically instantiate a kernel and deploy a plan
> having a simple gbean (say the example1/MyGBean in the example on the
> wiki)
> - What's the absolute minimum set of jars needed? (Geronimo
> jars+dependency jars)
> - Where's the template for a simple, minimal plan?
> (spring-assembly\target\geronimo\doc\plan\system-plan.xml)?
> Anyone done this before? (FYI, dblevins already pointed me to several
> resources ([1] [2] [3]) that will help come up with a stripped down
> geronimo with Axis stuff. Thanks, David.)
> thanks,
> dims
> [1] -  
> test/org/apache/geronimo/jetty/ 
> rev=234156&view=markup
> [2] -  
> test/org/apache/geronimo/axis/ 
> rev=164051&view=markup
> [3] -  
> org/openejb/server/axis/
> PS: Anyone seen the movie "A Simple Plan"? :)

I'm still a  little confused about your goal here.  Are you trying to  
run a unit test or come up with a minimal stand-alone server?

If you are trying to run a unit test, it is much easier to directly  
install the gbeans in the kernel in code than to set up the builders  
etc needed to process a plan.

If you are trying to set up a minimal server, things are not ideal  
right now but I'm working on improving them.  For now I'd recommend:
1. create a maven project to set up and run your minimal geronimo  
instance.  Copy the maven.xml from openejb itests as an example: you  
will remove most of the contents, but it shows how to unpack the  
server.  You need this part anyway:

         <deploy:unpackServer geronimoVersion="${geronimo_version}"/>

2. Copy the var/config/config.xml into src of your project.  Apparently  
you won't need any of our standard configurations running, so remove  
the xml contents, just leaving the top level element.  Add a  
<configuration name="yourConfigID"/> element to start your  
3. Add something like this to maven.xml to deploy your plan using the  
offline deployer:

         <ant:java fork="true"  
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/naming-server-plan.xml"/>

4.  You should now be able to start your server including your  
configuration you just deployed with a goal like this:
             vmArgs="-Xdebug -Xnoagent -Djava.compiler=NONE  
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xmx512m  

The stuff in the server has no way to communicate with the outside  
world, and this goal returns immediately, so it will be difficult to  
determine programatically when the server has started.  Since there is  
no communication, you will have to stop the server through killing its  
process via the operating system.  I think if you include rmi-naming  
and j2ee-security configurations you can stop it using maven.

You can also start the server like this:

java -jar target/geronimo-1.0-SNAPSHOT/bin/server.jar

In a few days I'm hoping to make it easy to assemble a minimal server  
from parts rather than taking a giant server and ignoring most of it.

david jencks

View raw message