You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Davanum Srinivas <da...@gmail.com> on 2005/10/19 19:17:43 UTC

A Simple Plan

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] - http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/jetty/src/test/org/apache/geronimo/jetty/ContainerTest.java?rev=234156&view=markup
[2] - http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/AxisWebServiceContainerTest.java?rev=164051&view=markup
[3] - http://cvs.openejb.org/viewrep/openejb/openejb/modules/core/src/test/org/openejb/server/axis/WSContainerTest.java?r=1.10

PS: Anyone seen the movie "A Simple Plan"? :)

--
Davanum Srinivas : http://wso2.com/blogs/

Re: A Simple Plan

Posted by Davanum Srinivas <da...@gmail.com>.
David,

Am trying to come up with a "minimal stand-alone server"

thanks,
dims

On 10/19/05, David Jencks <da...@yahoo.com> wrote:
>
> 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] -
> > http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/jetty/src/
> > test/org/apache/geronimo/jetty/ContainerTest.java?
> > rev=234156&view=markup
> > [2] -
> > http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/axis/src/
> > test/org/apache/geronimo/axis/AxisWebServiceContainerTest.java?
> > rev=164051&view=markup
> > [3] -
> > http://cvs.openejb.org/viewrep/openejb/openejb/modules/core/src/test/
> > org/openejb/server/axis/WSContainerTest.java?r=1.10
> >
> > 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
> configuration.
> 3. Add something like this to maven.xml to deploy your plan using the
> offline deployer:
>
>          <ant:java fork="true"
> jar="${maven.build.dir}/geronimo-${geronimo_version}/bin/deployer.jar"
> failonerror="true">
>              <ant:jvmarg value="-ea"/>
>              <ant:arg value="distribute"/>
>              <ant:arg value="target/plan/naming-server-plan.xml"/>
>          </ant:java>
>
> 4.  You should now be able to start your server including your
> configuration you just deployed with a goal like this:
>          <deploy:startRemoteServer
>
> geronimoTarget="${maven.build.dir}/geronimo-${geronimo_version}"
>              vmArgs="-Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xmx512m
> -XX:MaxPermSize=128m"
>              />
>
> 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.
>
> thanks
> david jencks
>
>
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: A Simple Plan

Posted by Davanum Srinivas <da...@gmail.com>.
David,

Is there a unit test for org.apache.geronimo.deployment.Deployer
GBean? one that i can use in a test case to deploy a plan?

thanks,
dims

On 10/19/05, David Jencks <da...@yahoo.com> wrote:
>
> 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] -
> > http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/jetty/src/
> > test/org/apache/geronimo/jetty/ContainerTest.java?
> > rev=234156&view=markup
> > [2] -
> > http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/axis/src/
> > test/org/apache/geronimo/axis/AxisWebServiceContainerTest.java?
> > rev=164051&view=markup
> > [3] -
> > http://cvs.openejb.org/viewrep/openejb/openejb/modules/core/src/test/
> > org/openejb/server/axis/WSContainerTest.java?r=1.10
> >
> > 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
> configuration.
> 3. Add something like this to maven.xml to deploy your plan using the
> offline deployer:
>
>          <ant:java fork="true"
> jar="${maven.build.dir}/geronimo-${geronimo_version}/bin/deployer.jar"
> failonerror="true">
>              <ant:jvmarg value="-ea"/>
>              <ant:arg value="distribute"/>
>              <ant:arg value="target/plan/naming-server-plan.xml"/>
>          </ant:java>
>
> 4.  You should now be able to start your server including your
> configuration you just deployed with a goal like this:
>          <deploy:startRemoteServer
>
> geronimoTarget="${maven.build.dir}/geronimo-${geronimo_version}"
>              vmArgs="-Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xmx512m
> -XX:MaxPermSize=128m"
>              />
>
> 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.
>
> thanks
> david jencks
>
>
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

Re: A Simple Plan

Posted by Jeff Genender <jg...@savoirtech.com>.
David Jencks wrote:

> You can also start the server like this:
> 
> java -jar target/geronimo-1.0-SNAPSHOT/bin/server.jar
> 

Did everyone know we have startup scripts in the bin directory?  We have 
them for both windows and *nix users.  We have scripts for starting the 
server and deploying...so feel free those too ;-)

Re: A Simple Plan

Posted by David Jencks <da...@yahoo.com>.
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] -  
> http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/jetty/src/ 
> test/org/apache/geronimo/jetty/ContainerTest.java? 
> rev=234156&view=markup
> [2] -  
> http://svn.apache.org/viewcvs.cgi/geronimo/trunk/modules/axis/src/ 
> test/org/apache/geronimo/axis/AxisWebServiceContainerTest.java? 
> rev=164051&view=markup
> [3] -  
> http://cvs.openejb.org/viewrep/openejb/openejb/modules/core/src/test/ 
> org/openejb/server/axis/WSContainerTest.java?r=1.10
>
> 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  
configuration.
3. Add something like this to maven.xml to deploy your plan using the  
offline deployer:

         <ant:java fork="true"  
jar="${maven.build.dir}/geronimo-${geronimo_version}/bin/deployer.jar"  
failonerror="true">
             <ant:jvmarg value="-ea"/>
             <ant:arg value="distribute"/>
             <ant:arg value="target/plan/naming-server-plan.xml"/>
         </ant:java>

4.  You should now be able to start your server including your  
configuration you just deployed with a goal like this:
         <deploy:startRemoteServer
              
geronimoTarget="${maven.build.dir}/geronimo-${geronimo_version}"
             vmArgs="-Xdebug -Xnoagent -Djava.compiler=NONE  
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xmx512m  
-XX:MaxPermSize=128m"
             />

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.

thanks
david jencks