Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

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

...

We DO encourage users to leverage GEP for schema validation, because GEP has already integrated these schema files in its distribution package. The steps described in this article are only for your reference.
You might be experiencing certain XML validation problems when using Geronimo Deployment Plan Editor in Eclipse v3.5(Galileo), it's a known defect of the Xerces feature in WTP. Try the following workaround in Eclipse v3.5 to avoid the problem:

  1. In the toolbar, select Windows->Preferences
  2. Expand XML section, and then select XML Files->Validation
  3. Uncheck the Honour all the XML schema locations option, and then save all the changes.

...

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 3.4.1 (Eclipse Ganymede SR1 distribution)
  • Apache Geronimo v2.2

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

Configuring Eclipse for geronimo schema

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


    Image Added


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


    Image Added


  5. Name the project as geronimoschema and Select Finish.


    Image Added


  6. Under Project explorer right click on geronimoschema project and select Import. Then select General->Archive File. Select Next.


    Image Added


  7. On the next screen Browse to geronimoschema.zip created in step #2. Once done select Finish.


    Image Added


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


    Image Added


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


    Image Added


  10. On the next window select XML->XML Catalog. Select User Specified Entries and click Add.


    Image Added


  11. On the next window click the icon beside Location and select workspace.
    Image Added

  12. Select GeronimoSchema.xmlcatalog. Select OK.


    Image Added


  13. Specify the key, for example, geronimoschema.


    Image Added


  14. On the next screen you can see geronimoschema listed.


    Image Added

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.


    Image Added


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


    Image Added


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


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


    Image Added


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