Try this:
NOTE: this file is in the folder labeled "example1"
====example1/MyGBean.java====
1 package example1;
2
3 import org.apache.geronimo.gbean.GBeanInfo;
4 import org.apache.geronimo.gbean.GBeanInfoBuilder;
5
6 public class MyGBean {
7
8 public static final GBeanInfo GBEAN_INFO;
9
10 static {
11 GBeanInfoBuilder infoBuilder = new GBeanInfoBuilder("MyGBean",
MyGBean.class);
12 GBEAN_INFO = infoBuilder.getBeanInfo();
13 }
14
15 public static GBeanInfo getGBeanInfo() {
16 return GBEAN_INFO;
17 }
18 }
====mygbean.xml====
1 <?xml version="1.0" encoding="UTF-8"?>
2 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2">
3 <environment>
4 <moduleId>
5 <groupId>example1</groupId>
6 <artifactId>MyGBean</artifactId>
7 <version>1.0</version>
8 <type>jar</type>
9 </moduleId>
10 </environment>
11 <gbean name="MySimpleGBean" class="example1.MyGBean"/>
12 </module>
1. Execute these commands
javac -classpath
<geronimo_home>/lib/geronimo-kernel-2.0.1.jarexample1/MyGBean.jar
jar -cvf mygbean.jar example1/*.class
2. Run the server
3. Execute this command from <geronimo_home>/bin dir
java -jar ./deployer.jar -u system -p manager deploy
<mygbeanDir>/mygbean.jar <mygbeanDir>/mygbean.xml
I hope this works for you,
Viet