Child pages
  • Using Eclipse XML tools in Apache Geronimo
Skip to end of metadata
Go to start of metadata

This tutorial will demonstrate on the usage of Eclipse XML tools to generated Geronimo specific deployment plans.

To run this tutorial, as a minimum you will be required to have installed the following prerequisite software.

  • Sun JDK 5.0+ (J2SE 1.5)
  • Eclipse (Eclipse Classic package of Europa distribution), which is platform specific
  • Apache Geronimo v2.1.3

Details on installing eclipse are provided in the Development environment section. This tutorial is organized in the following sections:

This tutorial will take you with the following steps:

Configuring Eclipse for geronimo schema

  1. Geronimo schema can be found <GERONIMO_HOME>/schema. Copy all these schema to a folder say geronimoschema.
  2. Add the following XML catalog file to this folder and zip it. This will give you
    <?xml version="1.0" encoding="UTF-8"?>
    <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
      <uri name="" uri="platform:/resource/geronimoschema/attributes-1.2.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-application-2.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-application-client-2.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-connector-1.2.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-credential-store-1.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-javabean-xmlattribute-1.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-jetty-2.0.2.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-jetty-config-1.0.1.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-login-config-2.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-module-1.2.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-naming-1.2.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-openejb-2.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-security-1.2.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-security-2.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-subject-info-1.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-tomcat-2.0.1.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-tomcat-config-1.0.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/geronimo-web-2.0.1.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/openejb-jar-2.2.xsd"/>
      <uri name="" uri="platform:/resource/geronimoschema/plugins-1.3.xsd"/>
  3. Launch Eclipse and select New->Project as shown in the figure.

  4. On the next screen select General->Project. Select Next.

  5. Name the project as geronimoschema and Select Finish.

  6. Under Project explorer right click on geronimoschema project and select Import.

  7. Select General->Archive File. Select Next.

  8. On the next screen Browse to created in step #2.

  9. Once done select Finish.

  10. Under the geronimoschema project you can see all the schema definitions.

  11. Next select Window->Preferences from Eclipse menu.

  12. On the next window select Web and XML->XML Catalog. Select Advanced.

  13. On the next window select GeronimoSchema.xmlcatalog. Select Ok.

  14. On the next screen expand User Specified Entries and you can see all the geronimo specific schema definitions. Select Ok.

Using the configuration in application development

  1. For the next steps we will consider the Stateless Session Bean project.
  2. Consider the Few More Configurations section in the above tutorial where you have to add a dependency element for database pool.
  3. In StatelessSessionEJB select ejbModule->META-INF->openejb-jar.xml. Right click and select Open With->XML Editor.

  4. Once you have the openejb-jar.xml select Design tab.

  5. Right click and select *Add Child->dependencies.

  6. Right click on sys:dependencies select Add Child->dependency.

  7. Right click on sys:dependency select Add Child->groupId.

  8. You can edit the fields by double clicking against each fields.

  9. Once done open the source tab you can see the dependency element added to openejb-jar.xml.

This completes the illustration of using Eclipse xml tools for Apache Geronimo.

  • No labels