geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@geronimo.apache.org
Subject [Apache Geronimo Wiki] Updated: GBeans
Date Mon, 07 Feb 2005 16:47:14 GMT
   Date: 2005-02-07T08:47:14
   Editor: GeirMagnussonJr.
   Wiki: Apache Geronimo Wiki
   Page: GBeans
   URL: http://wiki.apache.org/geronimo/GBeans

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -101,7 +101,7 @@
 
 The plan has to conform to ''schema/geronimo-config.xsd'' (in the repo it's in ''modules/deployment/src/schema/geronimo-config.xsd'')
 
-Here is a part of the deployment descriptor for the gbeans already available in the binary
distribution of Geronimo (it's ''modules/assembly/src/plan/j2ee-server-plan.xml'' in the repo):
+Here is a part of the deployment descriptor for the gbeans already available in the binary
distribution of Geronimo (it's ''modules/assembly/src/plan/j2ee-server-plan.xml'' in the repo).
 It looks really scary if this is your first time seeing one.  Down below we have a simple
one that we'll use for your GBean.
 
  {{{
     <gbean name="openejb:type=ContainerIndex" class="org.openejb.ContainerIndex">
@@ -142,6 +142,8 @@
 
 '''TODO''': Describe what these elements mean (here or even better in xsd)
 
+So that was scary.  The next section describes the deployment plan necessary for your GBean.
 It's really not so bad...
+
 == Step 2: Your first deployment plan ==
 
 Here's the plan of your first simple GBean - MyGBean. The gbean doesn't expose any attributes
or have references to other GBean.
@@ -163,14 +165,62 @@
 </configuration>
 }}}
 
-Deploying the gbean requires to execute ''Geronimo Deployer''. It boils down to executing
an executable jar ''bin/deployer.jar''.
+There are two ways to deploy the GBean to your server, the so-called "offline" mode for when
your server isn't running, and the "online" mode, when it is.  Both are outlined below.  Deploying
the gbean requires to execute ''Geronimo Deployer''. It boils down to executing an executable
jar ''bin/deployer.jar''.
+
+=== Offline Deployment ===
 
-Here's how to deploy the gbean:
+When the Geronimo server isn't running, it's possible to add a GBean to it's configuration,
and then start the GBean later when the server is running.  
+
+First, 'distribute' the GBean to the server :
 
  {{{
 java -jar bin/deployer.jar distribute mygbean-plan.xml
 }}}
 
+This will do all the necessary things to get the GBean to the server, but the GBean won't
be running when the server starts. 
+
+Now, start the server :
+
+ {{{
+java -jar bin/server.jar
+}}}
+
+And when that is complete, start your GBean :
+
+ {{{
+java -jar bin/deployer.jar start example1/MyGBean
+Username: system
+Password: manager
+}}}
+
+You'll be prompted for the username and password in order to start the GBean, as shown above.
 Use the values shown above.
+
+Note that unless you start the server "in the background", you'll need another command prompt
to start your GBean. 
+
+After starting, you should see the following in your server log :
+
+ {{{
+11:43:11,652 INFO  [ConfigurationManagerImpl] Loaded Configuration geronimo.config:name="example1/MyGBean"
+11:43:11,717 INFO  [Configuration] Started configuration example1/MyGBean
+}}}
+
+=== Online Deployment ===
+
+When you already have a server running, you can distribute and start the GBean in one step
:
+
+ {{{
+java -jar bin/deployer.jar deploy  mygbean-plan.xml
+Username: system
+Password: manager
+}}}
+
+And you'll see a slightly different message in the log.
+
+ {{{
+11:44:25,340 INFO  [LocalConfigStore:config-store] Installed configuration example1/MyGBean
in location 19
+11:44:25,432 INFO  [ConfigurationManagerImpl] Loaded Configuration geronimo.config:name="example1/MyGBean"
+11:44:25,446 INFO  [Configuration] Started configuration example1/MyGBean
+}}}
 = How to run GBean =
 
 == Step 3: Your first GBean in action ==

Mime
View raw message