JBoss Tools SVN: r13339 - branches/jbosstools-3.0.0.CR2/jbpm/docs/converter_ref/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 12:34:34 -0500 (Thu, 29 Jan 2009)
New Revision: 13339
Added:
branches/jbosstools-3.0.0.CR2/jbpm/docs/converter_ref/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571- adding the master_output.xml;
Added: branches/jbosstools-3.0.0.CR2/jbpm/docs/converter_ref/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.CR2/jbpm/docs/converter_ref/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.CR2/jbpm/docs/converter_ref/en/master_output.xml 2009-01-29 17:34:34 UTC (rev 13339)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+
+[<!ENTITY overview SYSTEM "modules/overview.xml">
+<!ENTITY bpmn2jpdl SYSTEM "modules/bpmn2jpdl.xml">
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>BPMN Convert User Guide</title>
+ <author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author>
+ <pubdate>October 2008</pubdate>
+ <copyright>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 1.0.0.CR1
+ </diffmk:wrapper></releaseinfo>
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/bpmn_convert_guide/p...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="overview" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/converter_ref/en/modules/overview.xml">
+ <title>BPMN Convert Overview</title>
+
+ <para>JBoss BPMN Convert module is a tool. Users can use it to translate a BPMN file to something else.</para>
+ <para>The BPMN file may be written by hands or by some editors. In this guide, we use STP BPMN editor to draw a BPMN file.</para>
+ <para>As a part of JBoss tools, this module realizes BPMN -> JPDL translation. Users can get a basic JPDL file from a BPMN file by using this module.</para>
+
+</chapter>
+<chapter id="bpmn2jpdl" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/converter_ref/en/modules/bpmn2jpdl.xml">
+ <title>Translate a BPMN file to a JPDL file</title>
+ <para>In this chapter we provide you with the necessary steps to translate a BPMN file to a JPDL file.</para>
+
+ <section id="createproject">
+ <title>Creating a project</title>
+ <para>Before creating a bpmn file, you should have a Project created.</para>
+ <para>Create a project by
+ <emphasis><property moreinfo="none">New > Project... > Project</property></emphasis>
+ . Enter the following information:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Project Name: test</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>A Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <property moreinfo="none">Finish</property> button.</para>
+ </section>
+
+ <section id="createbpmnfile">
+ <title>Creating a bpmn file by STP BPMN editor</title>
+ <para>Create a bpmn diagram file by
+ <emphasis><property moreinfo="none">New > Others... > Bpmn Diagram</property></emphasis>
+ . Enter the following information:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>File Name: test</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create BPMN Diagram</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <property moreinfo="none">Finish</property> button.</para>
+ <para>Open the test.bpmn_diagram file by double-click it.</para>
+ <para>Draw the bpmn diagram using STP BPMN editor. If you do not know how to use STP BPMN editor, please go to web site: www.eclipse.org/stp to get the information about STP BPMN editor.</para>
+ </section>
+
+ <section id="bpmntojpdl">
+ <title>Exporting a bpmn file to some jpdl files</title>
+ <para>A BPMN file may include more than one pool. Every pool can be mapped to a corresponding JPDL file.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select 'test.bpmn' file and right-click it. Open the export wizard by
+ <emphasis><property moreinfo="none">Export... > BPMN Export > BPMN -> JPDL</property></emphasis>
+ .
+ </para>
+ <figure float="0">
+ <title>BPMN Export</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>Select the BPMN file that you want to translate.
+ </para>
+ <figure float="0">
+ <title>Choose a BPMN file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>Select the Pools of BPMN that you want to translate.
+ </para>
+ <figure float="0">
+ <title>Choose BPMN Pools</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>In this page, You may get error messages or warning messages that occured during the conversion. If no any messages, this page will be skipped.
+ </para>
+ <figure float="0">
+ <title>Show Messages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>Select the target location to save the generated JPDL files.
+ </para>
+ <figure float="0">
+ <title>Target Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Overwrite existing resources: if you don't want to overwrite existing resources, please keep uncheck this checkbox.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click on the <property moreinfo="none">Finish</property> button.</para>
+ <para>Then the JPDL files are generated to the target location.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The generated files look like this: </para>
+ <figure float="0">
+ <title>The Generated JPDL Files</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/bpmnconvert_bpmn2jpdl_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+
+</chapter>
+</book>
15 years, 11 months
JBoss Tools SVN: r13338 - branches/jbosstools-3.0.0.CR2/hibernatetools/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 12:34:03 -0500 (Thu, 29 Jan 2009)
New Revision: 13338
Added:
branches/jbosstools-3.0.0.CR2/hibernatetools/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571- adding the master_output.xml;
Added: branches/jbosstools-3.0.0.CR2/hibernatetools/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.CR2/hibernatetools/docs/reference/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.CR2/hibernatetools/docs/reference/en/master_output.xml 2009-01-29 17:34:03 UTC (rev 13338)
@@ -0,0 +1,5170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[
+<!ENTITY preface SYSTEM "modules/preface.xml">
+<!ENTITY setup SYSTEM "modules/setup.xml">
+<!ENTITY codegenarchitecture SYSTEM "modules/codegenarchitecture.xml">
+<!ENTITY plugins SYSTEM "modules/plugins.xml">
+<!ENTITY ant SYSTEM "modules/ant.xml">
+<!ENTITY reveng SYSTEM "modules/reverseengineering.xml">
+<!ENTITY codegen SYSTEM "modules/codegen.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+]><book lang="en" xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Hibernate Tools Reference Guide</title>
+
+ <author><firstname>Max</firstname><surname>Andersen</surname><email>max.andersen(a)jboss.com</email></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 3.2.4.CR1
+ </diffmk:wrapper></releaseinfo>
+
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/hibernate_logo_a.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/hibernatetools/pdf/H...">PDF version</ulink>
+ </para>
+</abstract>
+
+ </bookinfo>
+ <toc></toc>
+
+
+<chapter id="preface" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/preface.xml">
+
+ <title>Preface</title>
+
+ <para><property moreinfo="none">Hibernate Tools</property> is a toolset for <ulink url="http://www.hibernate.org/6.html">Hibernate 3</ulink> and <ulink url="http://www.hibernate.org/27.html">related projects</ulink>. The tools provide Ant
+ tasks and Eclipse plugins for performing reverse engineering, code generation, visualization
+ and interaction with Hibernate.</para>
+
+ <section id="hibernate_key_features">
+ <title>Key Features</title>
+
+ <para>First, we propose to look through the list of key features that you can benefit from
+ if you start using <property moreinfo="none">Hibernate Tools</property>.</para>
+
+ <table>
+ <title>Key Functionality for Hibernate Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="5*"></colspec>
+ <colspec align="left" colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>Code Generation through Ant Task</para>
+ </entry>
+ <entry>
+ <para>Allows to execute mapping or Java code generation from reverse
+ engineering, schema generation and generation of other artifacts
+ during the build process.</para>
+ </entry>
+ <entry><link linkend="ant">ant task</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Wizards for creation
+ purposes and code
+ generation</para>
+ </entry>
+ <entry>
+ <para> A set of wizards are provided with the Hibernate Eclipse tools to
+ quickly create common Hibernate files such as configuration
+ (cfg.xml) files, mapping files and revenge.xml as well. Code
+ Generation wizard helps to generate a series of various artifacts,
+ there is even support for completely reverse engineer an existing
+ database schema.</para>
+ </entry>
+ <entry> <link linkend="map_file_wizard">hibernate mapping file</link>
+ <link linkend="hib_config_file">hibernate configuration file</link>
+ <link linkend="code_gen">code generation</link>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>
+ Mapping and Configuration files
+ Editors
+ </para>
+ </entry>
+ <entry>
+ <para>Support auto-completion and syntax highlighting. Editors also
+ support semantic auto-completion for class names and property/field
+ names, making it much more versatile than a normal XML
+ editor.</para>
+ </entry>
+ <entry> <link linkend="map_config_editor">mapping and configuration files editors</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Tools for organizing and controlling Reverse Engineering</para>
+ </entry>
+ <entry>
+ <para>Code Generation wizard provides powerful functionality for
+ generating a series of various artifacts like domain model classes,
+ mapping files, annotated EJB3 entity beans, etc. and reveng.xml file
+ editor allows to control this processes.</para>
+ </entry>
+ <entry><link linkend="code_gen">code generation</link>
+ <link linkend="rev_xml_editor">reveng.xml editor</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Hibernate Console</para>
+ </entry>
+ <entry>
+ <para>It is a new perspective in Eclipse which provides an overview of
+ your Hibernate Console configurations, were you also can get an
+ interactive view of your persistent classes and their relationships.
+ The console allows you to execute HQL queries against your database
+ and browse the result directly in Eclipse.</para>
+ </entry>
+ <entry><link linkend="hib_console">hibernate console</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Functional Mapping Diagram</para>
+ </entry>
+ <entry>
+ <para>Makes possible to visualize structure of entities and
+ relationships between them.</para>
+ </entry>
+ <entry><link linkend="map_diagram">mapping diagram</link></entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>Eclipse JDT integration</para>
+ </entry>
+ <entry>
+ <para>Hibernate Tools integrates into the Java code completion and build
+ support of Java in Eclipse. This gives you code completion of HQL
+ inside Java code. Additionally, Hibernate Tools will add problem
+ markers if your queries are not valid against the console
+ configuration associated with the project.</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>Hibernate Tools page on the <ulink url="http://www.hibernate.org/255.html">hibernate.org</ulink>.</para>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="setup" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/setup.xml">
+ <title>Download and install Hibernate Tools</title>
+
+ <para><property moreinfo="none">Hibernate Tools</property> can be used "standalone" via Ant
+ 1.6.x or fully integrated into an Eclipse 3.3.x + WTP 2.x based IDE, such as <property moreinfo="none">JBoss
+ Tools</property> or a default Eclipse 3.3.x + WTP 2.x installation. The following describes
+ the install steps in these environments.</para>
+
+ <section>
+ <title>JBoss Tools</title>
+
+ <para><property moreinfo="none">JBoss Tools 2.x</property> includes <property moreinfo="none">Hibernate Tools</property> and
+ thus nothing is required besides <ulink url="http://labs.jboss.com/tools/download/index.html">downloading</ulink> and <ulink url="../../GettingStartedGuide/html_single/index.html#JBossToolsInstall">installing JBoss Tools</ulink>. If you need to update to a newer version of the
+ <property moreinfo="none">Hibernate Tools</property> just follow the instructions in the Eclipse IDE
+ section.</para>
+ </section>
+
+ <section>
+ <title>Eclipse IDE</title>
+
+ <para>To install into any <property moreinfo="none">Eclipse 3.3.x</property> based Eclipse IDE you can either
+ download the <property moreinfo="none">Hibernate Tools</property> distribution from the <ulink url="http://www.hibernate.org/6.html">Hibernate website</ulink> or use the <ulink url="http://download.jboss.org/jbosstools/updates/stable/">JBoss Tools Update Site</ulink>
+ (see also <ulink url="http://tools.hibernate.org">http://tools.hibernate.org</ulink> for links
+ to the update site).</para>
+
+ <para>If you download the <property moreinfo="none">Hibernate Tools</property> distribution you need to place
+ the <emphasis>
+ <property moreinfo="none">/plugins</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">/feature</property>
+ </emphasis> directory into your eclipse directory or eclipse extensions directory. Sometimes
+ Eclipse does not automatically detect new plugins and thus the tools will not be activated. To
+ ensure eclipse sees these changes just clean up the cached plugin information by running eclipse with the <emphasis>
+ <property moreinfo="none">-clean</property></emphasis> option, e.g. <emphasis>
+ <property moreinfo="none">eclipse
+ -clean</property>.</emphasis> Using the updatesite does not require any additional steps.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>If you need more basic instructions on installing plugins and general usage of eclipse
+ then check out <ulink url="https://eclipse-tutorial.dev.java.net/">https://eclipse-tutorial.dev.java.net/</ulink> and especially <ulink url="https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html">https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html</ulink> which
+ covers using the update manager.</para>
+ </note>
+
+ <section>
+ <title>Usage of Eclipse WTP</title>
+
+ <para>The <property moreinfo="none">Hibernate Tools</property> plugins currently use <property moreinfo="none">WTP
+ 2.x</property> which at this time is the latest stable release from the Eclipse Webtools
+ project.</para>
+
+ <para>Because the WTP project not always have had proper versioning of their plugins there
+ might exist WTP plugins in your existing eclipse directory from other Eclipse based projects
+ that are from an earlier WTP release but has either the same version number or higher. It is
+ thus recommended that if you have issues with WTP provided features to try and install the
+ plugins on a clean install of eclipse to ensure there are no version collisions.</para>
+
+ </section>
+ </section>
+
+ <section>
+ <title>Ant</title>
+
+ <para>To use the tools via Ant you need the <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>
+ </emphasis> and associated libraries. The libraries are included in the distribution from the
+ Hibernate website and the Eclipse updatesite. The libraries are located in the eclipse plugins
+ directory at <emphasis>
+ <property moreinfo="none">/plugins/org.hibernate.eclipse.x.x.x/lib/tools/</property></emphasis>. These libraries are 100%
+ independent from the eclipse platform. How to use these via ant tasks are described in the
+ <link linkend="ant">Ant Tools</link> chapter.</para>
+ </section>
+</chapter>
+
+
+<chapter id="codegenarchitecture" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml">
+ <title>Code generation architecture</title>
+
+ <para>The code generation mechanism in the <property moreinfo="none">Hibernate Tools</property> consists of a few
+ core concepts. This section explains their overall structure which are the same for the Ant and
+ Eclipse tools.</para>
+
+ <section>
+ <title>Hibernate Meta Model</title>
+
+ <para>The meta model is the model used by Hibernate Core to perform its object relational
+ mapping. The model includes information about tables, columns, classes, properties,
+ components, values, collections etc. The API is in <literal moreinfo="none">org.hibernate.mapping</literal>
+ and its main entry point is the <literal moreinfo="none">Configuration</literal> class, the same class that is
+ used to build a session factory.</para>
+
+ <para>The model represented by the <literal moreinfo="none">Configuration</literal> class can be build in many
+ ways. The following list the currently supported ones in <property moreinfo="none">Hibernate Tools</property>. </para>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>A Core configuration uses Hibernate Core and supports reading <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> files, requires a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis>. Named core in Eclipse and <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><configuration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+
+ <listitem>
+ <para>An Annotation configuration uses Hibernate Annotations and supports <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> and annotated classes, requires a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis>. Named annotations in Eclipse and <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><annotationconfiguration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+
+ <listitem>
+ <para>A JPA configuration uses a Hibernate EntityManager and supports <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> and annotated classes requires that the project has a <emphasis>
+ <property moreinfo="none">META-INF/persistence.xml</property>
+ </emphasis> in its classpath. Named JPA in Eclipse and <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jpaconfiguration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+
+ <listitem>
+ <para>A JDBC configuration uses <property moreinfo="none">Hibernate Tools</property> reverse engineering
+ and reads its mappings via JDBC metadata + additional reverse engineering files
+ (reveng.xml). Automatically used in Eclipse when doing reverse engineering from JDBC and
+ named <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>In most projects you will normally use only one of the Core, Annotation or JPA
+ configuration and possibly the JDBC configuration if you are using the reverse engineering
+ facilities of <property moreinfo="none">Hibernate Tools</property>. </para>
+
+ <note>
+ <title>Note:</title>
+ <para>No matter which Hibernate Configuration type you are using <property moreinfo="none">Hibernate
+ Tools</property> supports them.</para>
+ </note>
+
+ <para>The following drawing illustrates the core concepts:</para>
+
+ <para>
+ <figure float="0">
+ <title>Hibernate Core Concepts</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/code_generation/code_generation_1.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+
+ <imagedata align="center" fileref="images/code_generation/code_generation_1.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+
+ <para>The code generation is done based on the Configuration model no matter which type of
+ configuration have been used to create the meta model, and thus the code generation is
+ independent on the source of the meta model and represented via Exporters.</para>
+ </section>
+
+ <section>
+ <title>Exporters</title>
+
+ <para>Code generation is done in so called Exporters. An <literal moreinfo="none">Exporter</literal> is handed a
+ Hibernate Meta Model represented as a <literal moreinfo="none">Configuration</literal> instance and it is then
+ the job of the exporter to generate a set of code artifacts.</para>
+
+ <para>The tools provides a default set of Exporter's which can be used in both Ant and the
+ Eclipse UI. Documentation for these Exporters is in the <link linkend="ant">Ant Tools</link>
+ and <link linkend="plugins">Eclipse Plugins</link> chapters.</para>
+
+ <para>Users can provide their own customer Exporter's, either by custom classes implementing the
+ Exporter interface or simply be providing custom templates. This is documented at <xref linkend="hbmtemplate"></xref></para>
+ </section>
+</chapter>
+
+
+<chapter id="plugins" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/plugins.xml">
+ <title>Eclipse Plugins</title>
+
+ <para>This chapter will introduce you to the functionality that <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Hibernate
+ Tools</diffmk:wrapper></property> provide within Eclipse. That is a set of wizards and editors for simplifying
+ the work with <property moreinfo="none">Hibernate</property>.</para>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>Hibernate Eclipse Tools include wizards for creating Hibernate mapping files,
+ configuration files (.cfg.xml), revenge.xml as well as wizards for adjusting Console
+ Configuration and Code Generation. Special structured and XML editors, editors for executing
+ HQL and Criteria queries are also provided in Hibernate Console. Refer to <link linkend="hibernate_key_features">Key Features</link> section to find all benefits that you
+ can take advantage of while using the tools within Eclipse.</para>
+
+ <note>
+ <title>Note:</title>
+ <para><diffmk:wrapper diffmk:change="changed">Please note that these tools do not try to hide any functionality of
+ </diffmk:wrapper><property moreinfo="none">Hibernate</property>. The tools make working with <property moreinfo="none">Hibernate</property>
+ easier, but you are still encouraged/required to read the <ulink url="http://www.hibernate.org/5.html">Hibernate Documentation</ulink> to fully utilize
+ <property moreinfo="none">Hibernate Tools</property> and especially <property moreinfo="none">Hibernate</property> it
+ self.</para>
+ </note>
+ </section>
+
+ <section id="map_file_wizard">
+ <title>Creating a Hibernate Mapping File</title>
+
+ <para>Hibernate mapping files are used to specify how your objects are related to database
+ tables.</para>
+
+ <para>For creating a skeleton mapping file, i. e. any <emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis>, Hibernate Tools provide a basic wizard which you can bring up by navigating <emphasis>
+ <property moreinfo="none">New > Hibernate XML mapping file</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Hibernate XML Mapping File Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_0.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At first you'll be asked to specify the location and the name for a new mapping
+ file. On the next dialog you should type or browse the class to map.</para>
+ <figure float="0">
+ <title>Specifying the Class to Map</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_0_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Pressing finish creates the file and opens it in the <link linkend="map_config_struct_editor">structured hbm.xml editor</link>.</para>
+
+ <para> If you start the wizard from the selected class, all values will be detected there
+ automatically.</para>
+
+ <figure float="0">
+ <title>Creating Mapping File for Selected Class</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_0_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="hib_config_file">
+ <title>Creating a Hibernate Configuration File</title>
+
+ <para>To be able to reverse engineer, prototype queries, and of course to simply use
+ <property moreinfo="none">Hibernate Core</property> a <emphasis>
+ <property moreinfo="none">hibernate.properties</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> file is needed. The <property moreinfo="none">Hibernate Tools</property> provide a wizard for
+ generating the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> file if you do not already have such one.</para>
+
+ <para>Start the wizard by clicking <emphasis>
+ <property moreinfo="none">New > Other (Ctrl+N)</property>
+ </emphasis>, then <emphasis>
+ <property moreinfo="none">Hibernate > Hibernate Configuration File (cfg.xml)</property>
+ </emphasis> and press <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis>. After selecting the wanted location for the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> file, you will see the following page:</para>
+
+ <figure float="0">
+ <title>Hibernate Configuration File Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_1.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_1.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>The contents in the combo boxes for the JDBC driver class and JDBC URL change
+ automatically, depending on the Dialect and actual driver you have chosen.</para>
+ </note>
+
+ <para>Enter your configuration information in this dialog. Details about the configuration
+ options can be found in <ulink url="http://docs.jboss.org/ejb3/app-server/Hibernate3/reference/en/html_single">Hibernate
+ Reference Documentation</ulink>.</para>
+
+ <para>Press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to create the configuration file, after optionally creating a Console
+ configuration, the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> will be automatically opened in an editor. The last option <emphasis>
+ <property moreinfo="none">Create Console Configuration</property>
+ </emphasis> is enabled by default and when enabled, it will automatically use the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> for the basis of a Console configuration.</para>
+ </section>
+
+ <section id="console_conf">
+ <title>Creating a Hibernate Console Configuration</title>
+
+ <para>A Console configuration describes how the <property moreinfo="none">Hibernate plugin</property> should
+ configure <property moreinfo="none">Hibernate</property> and what configuration files, including which
+ classpath are needed to load the POJO's, JDBC drivers etc. It is required to make usage of
+ query prototyping, reverse engineering and code generation. You can have multiple named
+ console configurations. Normally you would just need one per project, but more is definitely
+ possible if your project requires this.</para>
+
+ <para>You create a console configuration by running the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Console Configuration
+ Wizard</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">, shown in the following screenshot. The same wizard will also be used if
+ you are coming from the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> wizard and had enabled <emphasis>
+ <property moreinfo="none">Create Console Configuration</property>
+ </emphasis>.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The wizard will look at the current selection in the IDE and try and auto-detect the
+ settings which you then can just approve or modify to suit your needs.</para>
+ </note>
+ <para></para>
+
+ <para>The dialog consists of five tabs: </para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property moreinfo="none">Main</property>
+ </emphasis> for the basic/required settings</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title> Creating Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_2.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_2.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The following table describes the available settings on the <emphasis>
+ <property moreinfo="none">Main</property>
+ </emphasis> tab. The wizard can automatically detect default values for most of these if you
+ started the wizard with the relevant java project or resource selected.</para>
+
+ <table>
+ <title>Hibernate Console Configuration Parameters</title>
+
+ <tgroup cols="3">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec align="left" colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Name</para>
+ </entry>
+
+ <entry>
+ <para>The unique name of the console configuration</para>
+ </entry>
+
+ <entry>
+ <para>Name of the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Type</para>
+ </entry>
+
+ <entry>
+ <para>Choose between "Core", "Annotations" and
+ "JPA". Note that the two latter requires running Eclipse IDE with
+ a JDK 5 runtime, otherwise you will get classloading and/or version errors.</para>
+ </entry>
+
+ <entry>
+ <para>No default value</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Project</para>
+ </entry>
+
+ <entry>
+ <para>The name of a java project which classpath should be used in the console
+ configuration</para>
+ </entry>
+
+ <entry>
+ <para>Name of the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Database connection</para>
+ </entry>
+
+ <entry>
+ <para>DTP provided connection that you can use instead of what is in cfg.xml and jpa
+ persistence.xml. It's possible to use already configured connection or
+ specify a new one here.</para>
+ </entry>
+
+ <entry>
+ <para>[Hibernate Configured connection]</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Property file</para>
+ </entry>
+
+ <entry>
+ <para>Path to a hibernate.properties file</para>
+ </entry>
+
+ <entry>
+ <para>First hibernate.properties file found in the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Configuration file</para>
+ </entry>
+
+ <entry>
+ <para>Path to a hibernate.cfg.xml file</para>
+ </entry>
+
+ <entry>
+ <para>First hibernate.cfg.xml file found in the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Persistence unit</para>
+ </entry>
+
+ <entry>
+ <para>Name of the persistence unit to use</para>
+ </entry>
+
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">No default value (lets Hibernate Entity Manager find the persistence
+ unit)</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <tip>
+ <title>Tip:</title>
+
+ <para>The two latter settings are normally not required if you specify a project and it has <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"> /hibernate.cfg.xml </literal>
+ </property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none">/META-INF/persistence.xml</literal>
+ </property>
+ </emphasis> in its project classpath.</para>
+ </tip>
+
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>
+ <property moreinfo="none">Options</property>
+ </emphasis> for the additional/optional settings</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Options Tab of the Console Configuration Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_2_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The next table describes Hibernate Console Configuration options available on the <emphasis>
+ <property moreinfo="none">Options</property>
+ </emphasis> tab.</para>
+
+ <table>
+ <title>Hibernate Console Configuration Options</title>
+
+ <tgroup cols="3">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec align="left" colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Naming strategy</para>
+ </entry>
+
+ <entry>
+ <para>Fully qualified classname of a custom NamingStrategy. Only required if you use a
+ special naming strategy.</para>
+ </entry>
+
+ <entry>
+ <para>No default value</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Entity resolver</para>
+ </entry>
+
+ <entry>
+ <para>Fully qualified classname of a custom EntityResolver. Only required if you have
+ special xml entity includes in your mapping files.</para>
+ </entry>
+
+ <entry>
+ <para>No default value</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property moreinfo="none">Classpath</property>
+ </emphasis> for classpath</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Specifying Classpath in Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_3.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_3.png" format="PNG"></imagedata>
+ </imageobject>
+
+ </mediaobject>
+ </figure>
+
+ <para>The following table specifies the parameters of the Classpath tab of the wizard.</para>
+
+ <table>
+ <title>Hibernate Console Configuration Classpath</title>
+
+ <tgroup cols="3">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Classpath</para>
+ </entry>
+
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">The classpath for loading POJO and JDBC drivers; only needed if the default
+ classpath of the Project does not contain the required classes. Do not add Hibernate
+ core libraries or dependencies, they are already included. If you get ClassNotFound
+ errors then check this list for possible missing or redundant
+ directories/jars.</diffmk:wrapper></para>
+ </entry>
+
+ <entry>
+ <para>Empty</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Include default classpath from project</para>
+ </entry>
+
+ <entry>
+ <para>When enabled the project classpath will be appended to the classpath specified
+ above</para>
+ </entry>
+
+ <entry>
+ <para>Enabled</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>
+ <property moreinfo="none">Mappings</property>
+ </emphasis> for additional mappings</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Specifying additional Mappings in Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_4.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_4.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Parameters of the Mappings tab of the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Hibernate Console Configuration
+ wizard</diffmk:wrapper></property> are explained below:</para>
+ <table>
+ <title>Hibernate Console Configuration Mappings</title>
+
+ <tgroup cols="3">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Mapping files </para>
+ </entry>
+
+ <entry>
+ <para>List of additional mapping files that should be loaded. Note: A
+ hibernate.cfg.xml or persistence.xml can also contain mappings. Thus if these are
+ duplicated here, you will get "Duplicate mapping" errors when using the console
+ configuration.</para>
+ </entry>
+
+ <entry>
+ <para>empty</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <itemizedlist>
+ <listitem>
+ <para>and the last tab <emphasis>
+ <property moreinfo="none">Common</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Common Tab of the Console Configuration Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_4_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It allows to define general aspects of the launch configuration including storage
+ location, console encoding and some others.</para>
+
+ <para>Clicking <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> creates the configuration and shows it in the <property moreinfo="none">Hibernate Configurations
+ view</property>.</para>
+
+ <figure float="0">
+ <title>Console Overview</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_5.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_5.png" format="PNG"></imagedata>
+ </imageobject>
+
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="refeng_codegen" role="updated">
+ <title>Reverse Engineering and Code Generation</title>
+
+ <para><diffmk:wrapper diffmk:change="changed">A "click-and-generate" reverse engineering and code generation facility
+ is available. This facility allows you to generate a range of artifacts based on database or
+ an already existing Hibernate configuration, be that mapping files or annotated classes. Some
+ of these are POJO Java source file, Hibernate </diffmk:wrapper><emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> generation and schema documentation.</para>
+
+ <para>To start working with this process, start the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Hibernate Code
+ Generation</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> which is available in the toolbar via the
+ </diffmk:wrapper><property moreinfo="none">Hibernate</property><diffmk:wrapper diffmk:change="changed"> icon or via the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Run > Hibernate Code Generation</property>
+ </emphasis> menu item.</para>
+
+ <section id="code_gen">
+ <title>Code Generation Launcher</title>
+
+ <para>When you click on <emphasis>
+ <property moreinfo="none">Open Hibernate Code Generation Dialog...</property>
+ </emphasis> the standard Eclipse launcher dialog will appear. In this dialog you can create,
+ edit and delete named Hibernate code generation "launchers".</para>
+
+ <figure float="0" id="hib_code_gen">
+ <title>Getting Hibernate Code Generation Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/plugins/plugins_6.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_6.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para></para>
+
+ <figure float="0">
+ <title>Hibernate Code Generation Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_7.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_7.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first time you create a code generation launcher you should give it a meaningful
+ name, otherwise the default prefix <emphasis>
+ <property moreinfo="none">New_Generation</property>
+ </emphasis> will be used.</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>The "At least one exporter option must be selected" is just a
+ warning stating that for this launch to work you need to select an exporter on the
+ Exporter tab. When an exporter has been selected the warning will disappear.</para>
+ </tip>
+
+ <para>The dialog also have the standard tabs <emphasis>
+ <property moreinfo="none">Refresh</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Common</property>
+ </emphasis> that can be used to configure which directories should be automatically
+ refreshed and various general settings launchers, such as saving them in a project for
+ sharing the launcher within a team.</para>
+
+ <para>On the <emphasis>
+ <property moreinfo="none">Main</property>
+ </emphasis> tab you see the following fields:</para>
+
+ <table>
+ <title>Code generation "Main" tab fields</title>
+
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec colnum="3" colwidth="0.5*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Field</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Console Configuration</para>
+ </entry>
+
+ <entry>
+ <para>The name of the console configuration which should be used when code
+ generating</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Output directory</para>
+ </entry>
+
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">Path to a directory where all output will be written by default. Be aware that
+ existing files will be overwritten, so be sure to specify the correct
+ directory.</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Reverse engineer from JDBC Connection</para>
+ </entry>
+
+ <entry>
+ <para>If enabled, the tools will reverse engineer the database available via the
+ connection information in the selected Hibernate Console Configuration and
+ generate code based on the database schema. If not enabled, the code generation
+ will just be based on the mappings already specified in the Hibernate Console
+ configuration.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Package</para>
+ </entry>
+
+ <entry>
+ <para>The package name here is used as the default package name for any entities
+ found when reverse engineering</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>reveng.xml</para>
+ </entry>
+
+ <entry>
+ <para>Path to a reveng.xml file. A reveng.xml file allows you to control certain
+ aspects of the reverse engineering. e.g. how jdbc types are mapped to hibernate
+ types and especially important which tables are included/excluded from the
+ process. Clicking "setup" allows you to select an existing reveng.xml file or
+ create a new one. See more details about the reveng.xml file in <xref linkend="reverseengineering"></xref>.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>reveng. strategy</para>
+ </entry>
+
+ <entry>
+ <para>If reveng.xml does not provide enough customization you can provide your own
+ implementation of an ReverseEngineeringStrategy. The class needs to be in the
+ classpath of the Console Configuration, otherwise you will get class not found
+ exceptions. See <xref linkend="custom-reveng-strategy"></xref> for details and an
+ example of a custom strategy.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Generate basic typed composite ids</para>
+ </entry>
+
+ <entry>
+ <para>A table that has a multi-colum primary key a <composite-id>
+ mapping will always be created. If this option is enabled and there are matching
+ foreign-keys each key column is still considered a 'basic' scalar (string, long,
+ etc.) instead of a reference to an entity. If you disable this option a
+ <key-many-to-one> instead. Note: a <many-to-one>
+ property is still created, but is simply marked as non-updatable and
+ non-insertable.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Detect optimistic lock columns</para>
+ </entry>
+
+ <entry>
+ <para>Automatically detect optimistic lock columns. Controllable via reveng.
+ strategy; the current default is to use columns named VERSION or TIMESTAMP.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Detect many-to-many tables</para>
+ </entry>
+
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">Automatically detect many-to-many tables. Controllable via reveng.
+ strategy.</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Use custom templates</para>
+ </entry>
+
+ <entry>
+ <para>If enabled, the Template directory will be searched first when looking up the
+ templates, allowing you to redefine how the individual templates process the
+ hibernate mapping model.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Template directory</para>
+ </entry>
+
+ <entry>
+ <para>A path to a directory with custom templates</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section id="exportes">
+ <title>Exporters</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Exporters</property>
+ </emphasis> tab is used to specify which type of code that should be generated. Each
+ selection represents an Exporter that is responsible for generating the code, hence the
+ name.</para>
+
+ <figure float="0">
+ <title>Selecting Exporters</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_8.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_8.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The following table describes in short the various exporters. Remember you can
+ add/remove any Exporters depending on your needs.</para>
+
+ <table>
+ <title>Code generation "Exporter" tab fields</title>
+
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Field</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Domain code</para>
+ </entry>
+
+ <entry>
+ <para>Generates POJO's for all the persistent classes and components found in the
+ given Hibernate configuration.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>DAO code</para>
+ </entry>
+
+ <entry>
+ <para>Generates a set of DAO's for each entity found.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Hibernate XML Mappings</para>
+ </entry>
+
+ <entry>
+ <para>Generate mapping (hbm.xml) files for each entity.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Hibernate XML Configuration</para>
+ </entry>
+
+ <entry>
+ <para>Generate a hibernate.cfg.xml file. Used to keep the hibernate.cfg.xml update
+ with any new found mapping files.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Schema Documentation (.html)</para>
+ </entry>
+
+ <entry>
+ <para>Generates a set of html pages that documents the database schema and some of
+ the mappings.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Generic Exporter (hbmtemplate)</para>
+ </entry>
+
+ <entry>
+ <para><diffmk:wrapper diffmk:change="added">Fully customizable exporter which can be used to perform custom
+ generation.</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Schema Export (.ddl)</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Generates the appropriate SQL DDL and allows you to store the result in a file
+ or export it directly to the database.</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Each Exporter listens to certain properties and these can be setup in the <emphasis>
+ <property moreinfo="none">Properties</property>
+ </emphasis> section where you can add/remove predefined or customer properties for each of
+ the exporters. The following table lists the time of writing predefined properties:</para>
+
+ <para>
+ <table>
+ <title>Exporter Properties</title>
+
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>jdk5</para>
+ </entry>
+
+ <entry>
+ <para>Generate Java 5 syntax</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>ejb3</para>
+ </entry>
+
+ <entry>
+ <para>Generate EJB 3 annotations</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>for_each</para>
+ </entry>
+
+ <entry>
+ <para>Specifies for which type of model elements the exporter should create a file
+ and run through the templates. Possible values are: entity, component,
+ configuration</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>template_path</para>
+ </entry>
+
+ <entry>
+ <para>Custom template directory for this specific exporter. You can use Eclipse
+ variables.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>template_name</para>
+ </entry>
+
+ <entry>
+ <para>Name for template relative to the template path</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>outputdir</para>
+ </entry>
+
+ <entry>
+ <para>Custom output directory for this specific exporter. You can use Eclipse
+ variables.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>file_pattern</para>
+ </entry>
+
+ <entry>
+ <para>Pattern to use for the generated files, relatively for the output dir.
+ Example: {package-name}/{class-name}.java .</para>
+ </entry>
+ </row>
+
+
+
+ <row>
+ <entry>
+ <para>dot.executable</para>
+ </entry>
+
+ <entry>
+ <para>Executable to run GraphViz (only relevant, but optional for Schema
+ documentation)</para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">drop</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Output will contain drop statements for the tables, indices and
+ constraints</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">delimiter</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If specified the statements will be dumped to this file</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">create</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Output will contain create statements for the tables, indices and
+ constraints</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">scriptToConsole</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The script will be output to Console</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">exportToDatabase</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Executes the generated statements against the database</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">outputFileName</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If specified the statements will be dumped to this file</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">haltOnError</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Halts the build process if an error occurs</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">format</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Applies basic formatting to the statements</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">schemaUpdate</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Updates a schema</diffmk:wrapper></para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To add a property to the chosen Exporter click the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Add</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Properties</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> section. In the appeared dialog
+ you should select the property from the proposed list and the value for it.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Adding the Property for Schema Export (.ddl)</diffmk:wrapper></title>
+
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/plugins/plugins_8a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Tip:</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If the property is a directory, it is
+ possible to browse directories in the Value field.</diffmk:wrapper></para>
+ </tip>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Specifying the Property Value</diffmk:wrapper></title>
+
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/plugins/plugins_8b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="map_config_editor">
+ <title>Hibernate Mapping and Configuration File Editor</title>
+
+ <para>The <property moreinfo="none">Hibernate Mapping File editor</property> provides XML editing functionality
+ for the <emphasis>
+ <property moreinfo="none">hbm.xml </property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">cfg.xml</property>
+ </emphasis> files. The editor is based on the Eclipse WTP tools and extends its functionality
+ to provide Hibernate specific code completion.</para>
+
+ <figure float="0">
+ <title>XML Editing Functionality</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_9.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_9.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section>
+ <title>Java property/class completion</title>
+
+ <para>Package, class, and field completion is enabled for relevant XML attributes. The
+ auto-completion detects its context and limits the completion for e.g. <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> and only shows the properties/fields available in the enclosing <emphasis>
+ <property moreinfo="none"><class></property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none"><subclass></property>
+ </emphasis> etc. It is also possible to navigate from the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> files to the relevant class/field in java code.</para>
+
+ <figure float="0">
+ <title>Navigation Functionality</title>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_10.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_10.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+
+ </figure>
+
+ <para>This is done via the standard hyperlink navigation functionality in Eclipse; per default
+ it is done by pressing F3 while the cursor is on a class/field or by pressing <emphasis>
+ <property moreinfo="none">Ctrl</property>
+ </emphasis> and the mouse button to perform the same navigation.</para>
+
+ <para>For java completion and navigation to work the file needs to reside inside an Eclipse
+ Java project, otherwise no completion will occur.</para>
+ <note>
+ <title>Note:</title>
+ <para>Java completion does not require a Hibernate console configuration to be used.</para>
+ </note>
+ </section>
+
+ <section>
+ <title>Table/Column completion</title>
+
+ <para>Table and column completion is also available for all table and column attributes. </para>
+
+ <figure float="0">
+ <title>Table and Column Completion</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_11.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_11.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <important>
+ <title>Important:</title>
+ <para>Table/Column completion requires a proper configured hibernate console configuration
+ and this configuration should be the default for the project where the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> resides.</para>
+ </important>
+
+ <para>You can check which console configuration is selected under the Properties of a project
+ and look under the <emphasis>
+ <property moreinfo="none">Hibernate Settings</property>
+ </emphasis> page. When a proper configuration is selected it will be used to fetch the
+ table/column names in the background.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Currently it is not recommended to use this feature on large databases since it does
+ not fetch the information iteratively. It will be improved in future versions.</para>
+ </note>
+ </section>
+
+ <section>
+ <title>Configuration property completion</title>
+
+ <para>In <emphasis>
+ <property moreinfo="none">cfg.xml</property>
+ </emphasis> code completion for the value of <emphasis>
+ <property moreinfo="none"><property> name</property>
+ </emphasis> attributes is available.</para>
+
+
+ <figure float="0">
+ <title>Property Completion</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_12.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_12.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+ <section id="map_config_struct_editor">
+ <title>Structured Hibernate Mapping and Configuration File Editor</title>
+ <para>The structured editor represents the file in the tree form. It also allows to modify the
+ structure of the file and its elements with the help of tables provided on the right-hand
+ area.</para>
+
+ <para>To open any mapping file in the editor, choose <emphasis>
+ <property moreinfo="none">Open With > Hibernate 3.0 XML Editor</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> option from the context menu of the file. The editor should look as
+ follows:</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Structured hbm.xml Editor</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_12_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For the configuration file you should choose <emphasis>
+ <property moreinfo="none">Open With > Hibernate Configuration 3.0 XML Editor</property>
+ </emphasis>option.</para>
+
+ <figure float="0">
+ <title>Structured cfg.xml Editor</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_12_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="rev_xml_editor">
+ <title>Reveng.xml Editor</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none">reveng.xml </property>
+ </emphasis> file is used to customize and control how reverse engineering is performed by the
+ tools. The plugins provide an editor to ease the editing of this file and hence used to
+ configure the reverse engineering process.</para>
+
+ <para>The editor is intended to allow easy definition of type mappings, table include/excludes
+ and specific override settings for columns, e.g. define an explicit name for a column when the
+ default naming rules are not applicable.</para>
+
+ <note>
+ <title>Note:</title>
+ <para> Not all the features of the <emphasis>
+ <property moreinfo="none">.reveng.xml </property>
+ </emphasis> file are exposed or fully implemented in the editor, but the main functionality
+ is there. To understand the full flexibility of the <emphasis>
+ <property moreinfo="none">reveng.xml</property>
+ </emphasis>, please see <xref linkend="hibernaterevengxmlfile"></xref>
+ </para>
+ </note>
+
+ <para>The editor is activated as soon as an <emphasis>
+ <property moreinfo="none">.reveng.xml </property>
+ </emphasis> file is opened. To get an initial <emphasis>
+ <property moreinfo="none">reveng.xml </property>
+ </emphasis> file the <property moreinfo="none">Reverse Engineering File Wizard</property> can be started via <emphasis>
+ <property moreinfo="none">Ctrl+N</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Hibernate > Hibernate Reverse Engineering File (reveng.xml)</property>
+ </emphasis> then.</para>
+
+ <figure float="0">
+ <title>Overview Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_22.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_22.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Or you can get it via the <property moreinfo="none">Code Generation Launcher</property> by checking the
+ proper section in the <emphasis>
+ <property moreinfo="none">Main</property>
+ </emphasis> tab of the <link linkend="hib_code_gen"><diffmk:wrapper diffmk:change="changed">Hibernate Code Generation
+ Wizard</diffmk:wrapper></link>.</para>
+
+ <para>The following screenshot shows the <emphasis>
+ <property moreinfo="none">Overview</property>
+ </emphasis> page where the wanted console configuration is selected (auto-detected if
+ Hibernate 3 support is enabled for the project)</para>
+
+ <figure float="0">
+ <title>Overview Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_13.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_13.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Table Filter</property>
+ </emphasis> page allows you to specify which tables to include and exclude. Pressing <emphasis>
+ <property moreinfo="none">Refresh</property>
+ </emphasis> shows the tables from the database that have not yet been excluded.</para>
+
+ <figure float="0">
+ <title>Table Filters Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_14.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_14.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Type Mappings</property>
+ </emphasis> page is used for specifying type mappings from JBDC types to any Hibernate type
+ (including usertypes) if the default rules are not applicable. Here again to see the database
+ tables press <emphasis>
+ <property moreinfo="none">Refresh</property>
+ </emphasis> button underneath. More about type mappings you can find further in the <link linkend="type_map">Type Mappings</link> section.</para>
+
+ <figure float="0">
+ <title>Type Mappings Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_15.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_15.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Table and Columns</property>
+ </emphasis> page allows you to explicit set e.g. which hibernatetype and propertyname that
+ should be used in the reverse engineered model. For more details on how to configure the
+ tables while reverse engineering read the <link linkend="tab_and_col">Specific table
+ configuration</link> section.</para>
+
+ <figure float="0">
+ <title>Table and Columns Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_16.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_16.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now that you have configured all necessary parts, you can learn how to work with
+ <property moreinfo="none">Hibernate Console Perspective</property>.</para>
+ </section>
+
+ <section id="hib_console">
+ <title>Hibernate Console Perspective</title>
+
+ <para>The <property moreinfo="none">Hibernate Console Perspective</property> combines a set of views which allow
+ you to see the structure of your mapped entities/classes, edit HQL queries, execute the
+ queries, and see the results. To use this perspective you need to create a <link linkend="console_conf">Console configuration</link>.</para>
+
+ <section>
+ <title>Viewing the entity structure</title>
+
+ <para>To view your new configuration and entity/class structure, switch to <property moreinfo="none">Hibernate
+ Configurations View</property>. Expanding the tree allows you to browse the class/entity
+ structure and see the relationships.</para>
+
+ <figure float="0">
+ <title>Hibernate Console Perspective</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_17.png" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+
+ </figure>
+
+ <para>The <property moreinfo="none">Console Configuration</property> does not dynamically adjust to changes
+ done in mappings and java code. To reload the configuration select the configuration and
+ click the <emphasis>
+ <property moreinfo="none">Reload</property>
+ </emphasis> button in the view toolbar or in the context menu.</para>
+
+ <para>Besides, it's possible to open source and mapping files for objects showed in
+ <property moreinfo="none">Hibernate Configurations View</property>. Just bring up the context menu for a
+ necessary object and select <emphasis>
+ <property moreinfo="none">Open Source File</property>
+ </emphasis> to see appropriate Java class or <emphasis>
+ <property moreinfo="none">Open Mapping File</property>
+ </emphasis> to open a proper <emphasis>
+ <property moreinfo="none">.hbm.xml</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Opening Source for Objects</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_17_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="map_diagram">
+ <title>Mapping Diagram</title>
+
+ <para>In order to get a visual feel on how entities are related as well as view their
+ structures, a <property moreinfo="none">Mapping Diagram</property> is provided. It is available by right
+ clicking on the entity you want a mapping diagram for and then choosing <emphasis>
+ <property moreinfo="none">Open Mapping Diagram</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Mapping Diagram</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_18.png" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For better navigating on the Diagram use <property moreinfo="none">Outline view</property> which is
+ available in the structural and graphical modes.</para>
+ <figure float="0">
+ <title>Navigating in the Structural Mode</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To switch over between the modes use the buttons in the top-right corner of the
+ <property moreinfo="none">Outline view</property>.</para>
+
+ <figure float="0">
+ <title>Navigating in the Graphical Mode</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As in <property moreinfo="none">Hibernate Configurations View</property> in <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Mapping
+ Diagram</diffmk:wrapper></property> it's also possible to open source/mapping file for a chosen
+ object by selecting appropriate option in the context menu. </para>
+
+ <figure float="0">
+ <title>Navigating on the Diagram</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you ask to open source/mapping file by right clicking on any entity element, this
+ element will be highlighted in the open file.</para>
+
+ <figure float="0">
+ <title>Opening Source for Object</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_d.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Finally, if you need to have your Diagram exported as <emphasis><property moreinfo="none">.png
+ </property>,</emphasis>
+ <emphasis>
+ <property moreinfo="none">.jpeg</property>
+ </emphasis> or <emphasis><property moreinfo="none">.bmp </property>,</emphasis> you should right-click
+ anywhere in the <property moreinfo="none">Mapping Diagram editor</property> and select <emphasis>
+ <property moreinfo="none">Export as Image</property>
+ </emphasis>.</para>
+
+ <figure float="0">
+ <title>Mapping Diagram Export</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_e.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see on the figure above, <emphasis><property moreinfo="none">Undo</property>, </emphasis>
+ <emphasis>
+ <property moreinfo="none">Redo</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Auto layout </property>
+ </emphasis> options are also available through the context menu.</para>
+ </section>
+ </section>
+
+ <section>
+ <title>Prototyping Queries</title>
+
+ <para>Queries can be prototyped by entering them in the <property moreinfo="none">HQL</property> or
+ <property moreinfo="none">Criteria Editor</property>. The query editors are opened by right-clicking the
+ <property moreinfo="none">Console Configuration</property> and selecting either <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">HQL
+ Editor</diffmk:wrapper></property> or <property moreinfo="none">Hibernate Criteria Editor</property>. The editors
+ automatically detect the chosen configuration.</para>
+
+ <para>If the menu item is disabled then you need at first to create a <property moreinfo="none">Session
+ Factory</property>. That is done by simply expanding the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Session
+ Factory</diffmk:wrapper></property> node.</para>
+
+ <para>By brining up the context menu for a chosen entity or property in the <property moreinfo="none">Console
+ Configuration</property> and opening <emphasis>
+ <property moreinfo="none">HQL Editor</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">Hibernate Criteria Editor</property>
+ </emphasis> you'll get a prefill query.</para>
+
+ <figure float="0">
+ <title>Entering Simple Queries</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_19.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_19.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To copy a portion of code from .java file into a HQL or Criteria editor, make use of the
+ Quick Fix option (Ctrl + 1).</para>
+
+ <figure float="0">
+ <title>Quick Fix Option Demonstration</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_19_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also update the original java code according to changes in the HQL or Criteria
+ editor. For that you should save your HQL/Criteria query and submit the replacing in
+ appeared confirmation dialog.</para>
+
+ <figure float="0">
+ <title>Updating Java Code</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_19_c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Executing the query is done by clicking the green run button in the toolbar or pressing <emphasis>
+ <property moreinfo="none">Ctrl+Enter</property>
+ </emphasis>.</para>
+
+ <para>Errors during creation of the <property moreinfo="none">Session Factory</property> or running the
+ queries (e.g. if your configuration or query is incorrect) will be shown in a message dialog
+ or inclined in the view that detected the error, you may get more information about the
+ error in the <property moreinfo="none">Error Log View</property> on the right pane.</para>
+
+ <para>Results of a query will be shown in the <property moreinfo="none">Hibernate Query Result View</property>
+ and details of possible errors (syntax errors, database errors, etc.) can be seen in the
+ <property moreinfo="none">Error Log View</property>.</para>
+
+
+ <note>
+ <title>Note:</title>
+ <para>HQL queries are executed by default using <literal moreinfo="none">list()</literal> thus without any
+ limit of the size of the output the query could return a large result set. You might run
+ out of memory. To avoid this you can put a value in the Max results field to reduce the
+ number of elements returned.</para>
+ </note>
+
+ <section>
+ <title>Dynamic Query Translator</title>
+
+ <para>If the <property moreinfo="none">Hibernate Dynamic Query Translator View</property> is visible while
+ writing in the <property moreinfo="none">HQL Editor</property> it will show the generated SQL for a HQL
+ query.</para>
+
+ <figure float="0">
+ <title>Hibernate Dynamic Query Translator View</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_20.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_20.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The translation is done each time you stop typing into the editor, if there are errors
+ in the HQL the parse exception will be shown embedded in the view.</para>
+ </section>
+ </section>
+
+ <section>
+ <title>Properties View</title>
+
+ <para>As you can see on the figure, <property moreinfo="none">Properties view</property> shows the number of
+ query results as well as the time of executing.</para>
+
+ <figure float="0">
+ <title>Properties View</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_21_a.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_21_a.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It also displays the structure of any persistent object selected in the
+ <property moreinfo="none">Hibernate Query Results View</property>. Editing is not yet supported.</para>
+
+ <figure float="0">
+ <title>Properties View for Selected Object</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_21_b.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_21_b.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="debug_log">
+ <title>Enable debug logging in the plugins</title>
+
+ <para>It is possible to configure the eclipse plugin to route all logging made by the plugins
+ and hibernate code it self to the <property moreinfo="none">Error Log View</property> in Eclipse.</para>
+
+ <para>This is done by editing the <emphasis>
+ <property moreinfo="none">hibernate-log4j.properties</property>
+ </emphasis> in <emphasis>
+ <property moreinfo="none">org.hibernate.eclipse/ directory/jar</property>
+ </emphasis>. This file includes a default configuration that only logs WARN and above to a set
+ of custom appenders (PluginFileAppender and PluginLogAppender). You can change these settings
+ to be as verbose or silent as you please - see <ulink url="http://www.hibernate.org/5.html">Hibernate Documentation</ulink> for interesting categories and Log4j documentation.</para>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>Find more on how to configure logging via a log4j property file in <ulink url="http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/...">Log4j documentation</ulink>.</para>
+ </section>
+ </section>
+
+ <section id="dali_integration">
+ <title>Hibernate support for Dali plugins in Eclipse WTP</title>
+
+ <para>Starting from 3.0.0 Alpha1 version of <property moreinfo="none">JBoss Tools</property> Hibernate plugins
+ support Eclipse Dali integration what now makes it possible to use a Hibernate as a complete
+ JPA development platform.</para>
+
+ <para>When starting your new JPA project from <emphasis>
+ <property moreinfo="none">New > Other... > JPA > JPA Project</property>
+ </emphasis> (or simply <emphasis>
+ <property moreinfo="none">New > JPA Project</property>
+ </emphasis> in <property moreinfo="none">JPA Perspective</property>) on the JPA Facet page you'll be
+ prompted to choose Hibernate as a target platform.</para>
+
+ <figure float="0">
+ <title>Targeting at Hibernate Platform</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>By enabling Hibernate platform specific features you can now generate DDL and Entities.
+ For that find <emphasis>
+ <property moreinfo="none">JPA Tools > Generate DDL.../Generate Entities...</property>
+ </emphasis> options in the context menu of your JPA project.</para>
+
+ <figure float="0">
+ <title>Generate DDL/Entities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Generate DDL/Entities wizards first will ask you to choose the <property moreinfo="none">Console
+ Configuration</property>.</para>
+
+ <figure float="0">
+ <title>Generate Entities Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+
+ <para>Please note, currently the wizards require that you have a <link linkend="console_conf">Hibernate Console Configuration</link> already configured.</para>
+ </note>
+ </section>
+</chapter>
+
+
+<chapter id="ant" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/ant.xml">
+ <title>Ant Tools</title>
+
+ <para>Maybe somebody will find it more preferable to use Ant for generation purposes. Thus, this
+ chapter is intended to get you ready to start using Hibernate Tools via Ant tasks.</para>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>
+ </emphasis> contains the core for the <property moreinfo="none">Hibernate Tools</property>. It is used as the
+ basis for both the Ant tasks described in this document and the eclipse plugins both available
+ from tools.hibernate.org. The <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>
+ </emphasis> is located in your eclipse plugins directory at <emphasis>
+ <property moreinfo="none">/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar</property>.</emphasis></para>
+ <para>This jar is 100% independent from the eclipse platform and can thus be used independently
+ of eclipse.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>There might be incompatibilities with respect to the Hibernate3.jar bundled with the
+ tools and your own jar. Thus to avoid any confusion it is recommended to use the
+ hibernate3.jar and hibernate-annotations.jar bundled with the tools when you want to use the
+ Ant tasks. Do not worry about using e.g. Hibernate 3.2 jar's with e.g. a Hibernate 3.1
+ project since the output generated will work with previous Hibernate 3 versions. </para>
+ </note>
+ </section>
+
+ <section>
+ <title>The <hibernatetool> Ant Task</title>
+
+ <para>To use the ant tasks you need to have the <emphasis>
+ <property moreinfo="none">hibernatetool</property>
+ </emphasis> task defined. That is done in your <emphasis>
+ <property moreinfo="none">build.xml</property>
+ </emphasis> by inserting the following xml (assuming the jars are in the
+ <literal moreinfo="none">lib</literal> directory): </para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<path id="toolslib">
+ <path location="lib/hibernate-tools.jar" />
+ <path location="lib/hibernate3.jar" />
+ <path location="lib/freemarker.jar" />
+ <path location="${jdbc.driver.jar}" />
+</path>
+
+<taskdef name="hibernatetool"
+ classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="toolslib" />
+]]></programlisting>
+
+ <para>This <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><taskdef></literal>
+ </property>
+ </emphasis> defines an Ant task called <emphasis>
+ <property moreinfo="none"> hibernatetool </property>
+ </emphasis> which now can be used anywhere in your ant <emphasis>
+ <property moreinfo="none">build.xml</property>
+ </emphasis> files. It is important to include all the <property moreinfo="none">Hibernate Tools</property>
+ dependencies as well as the jdbc driver.</para>
+
+ <para>Notice that to use the annotation based Configuration you must <ulink url="http://annotations.hibernate.org">get a release</ulink>. </para>
+
+ <para></para>
+
+ <para>When using the <emphasis>
+ <property moreinfo="none"> hibernatetool </property>
+ </emphasis> task you have to specify one or more of the following:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool
+ destdir="defaultDestinationDirectory"
+ templatepath="defaultTemplatePath"
+>
+ <classpath ...>
+ <property key="propertyName" value="value"/>
+ <propertyset ...>
+ (<configuration ...>|<annotationconfiguration ...>|
+ <jpaconfiguration ...>|<jdbcconfiguration ...>)
+ (<hbm2java>,<hbm2cfgxml>,<hbmtemplate>,...)
+</hibernatetool>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Hibernatetool attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>destdir</para>
+ </entry>
+
+ <entry>
+ <para>Destination directory for files generated with exporters</para>
+ </entry>
+
+ <entry>
+ <para>Required</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>templatepath</para>
+ </entry>
+
+ <entry>
+ <para>A path to be used to look up user-edited templates</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>classpath</para>
+ </entry>
+
+ <entry>
+ <para>A classpath to be used to resolve resources, such as mappings and
+ usertypes</para>
+ </entry>
+
+ <entry>
+ <para>Optional, but very often required</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>property (and propertyset)</para>
+ </entry>
+
+ <entry>
+ <para>Used to set properties to control the exporters. Mostly relevant for providing
+ custom properties to user defined templates</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>configuration (annotationconfiguration, jpaconfiguration,
+ jdbcconfiguration)</para>
+ </entry>
+
+ <entry>
+ <para>One of four different ways of configuring the Hibernate Meta Model must be
+ specified</para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>hbm2java (hbm2cfgxml, hbmtemplate, etc.)</para>
+ </entry>
+
+ <entry>
+ <para>One or more of the exporters must be specified</para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Basic examples</title>
+
+ <para>The following example shows the most basic setup for generating pojo's via <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> from a normal <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none">hibernate.cfg.xml</literal>
+ </property>. </emphasis> The output will be put in the <emphasis>
+ <property moreinfo="none">${build.dir}/generated</property>
+ </emphasis> directory.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <classpath>
+ <path location="${build.dir}/classes"/>
+ </classpath>
+
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2java/>
+</hibernatetool>]]></programlisting>
+
+
+ <para>The following example is similar, but now we are performing multiple exports from the
+ same configuration. We are exporting the schema via <emphasis>
+ <property moreinfo="none"><hbm2dll></property>, </emphasis> generates some DAO code via <emphasis>
+ <property moreinfo="none"><hbm2dao></property>
+ </emphasis> and finally runs a custom code generation via <emphasis>
+ <property moreinfo="none"><hbmtemplate></property>. </emphasis> This is again from a normal <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> and the output is still put in the <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none">${build.dir}/generated</literal>
+ </property>
+ </emphasis> directory. Furthermore the example also shows where a classpath is specified
+ when you e.g. have custom usertypes or some mappings that is needed to be looked up as a
+ classpath resource.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <classpath>
+ <path location="${build.dir}/classes"/>
+ </classpath>
+
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2ddl/>
+ <hbm2dao/>
+ <hbmtemplate
+ filepattern="{package-name}/I{class-name}Constants.java"
+ templatepath="${etc.dir}/customtemplates"
+ template="myconstants.vm"
+ />
+</hibernatetool>]]></programlisting>
+
+ </section>
+ </section>
+
+ <section>
+ <title>Hibernate Configurations</title>
+
+ <para><literal moreinfo="none">Hibernatetool</literal> supports four different Hibernate configurations: A
+ standard Hibernate configuration <emphasis>
+ (<property moreinfo="none"><configuration></property>), </emphasis> Annotation based
+ configuration <emphasis> (<property moreinfo="none"><annotationconfiguration></property>),
+ </emphasis> JPA persistence based configuration <emphasis>
+ (<property moreinfo="none"><jpaconfiguration></property>) </emphasis> and a JDBC based
+ configuration <emphasis> (<property moreinfo="none"><jdbcconfiguration></property>) </emphasis>
+ for use when reverse engineering.</para>
+
+ <para>Each have in common that they are able to build up a Hibernate Configuration object from
+ which a set of exporters can be run to generate various output. </para>
+
+ <note>
+ <title>Note:</title>
+ <para>Output can be anything, e.g. specific files, statements execution against a database,
+ error reporting or anything else that can be done in java code.</para>
+ </note>
+
+ <para>The following sections describe what the various configurations can do, plus lists the
+ individual settings they have.</para>
+
+ <section>
+ <title>Standard Hibernate Configuration (<configuration>)</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none"><configuration></property>
+ </emphasis> is used to define a standard Hibernate configuration. A standard Hibernate
+ configuration reads the mappings from a <emphasis>
+ <property moreinfo="none">cfg.xml</property>
+ </emphasis> and/or a fileset.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<configuration
+ configurationfile="hibernate.cfg.xml"
+ propertyfile="hibernate.properties"
+ entityresolver="EntityResolver classname"
+ namingstrategy="NamingStrategy classname"
+>
+ <fileset...>
+
+ </configuration>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Configuration attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>configurationfile</para>
+ </entry>
+
+ <entry>
+ <para>The name of a Hibernate configuration file, e.g. "hibernate.cfg.xml"</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>propertyfile</para>
+ </entry>
+
+ <entry>
+ <para>The name of a property file, e.g. "hibernate.properties"</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>entity-resolver</para>
+ </entry>
+
+ <entry>
+ <para>Name of a class that implements org.xml.sax.EntityResolver. Used if the
+ mapping files require custom entity resolver</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>namingstrategy</para>
+ </entry>
+
+ <entry>
+ <para>Name of a class that implements org.hibernate.cfg.NamingStrategy. Used for
+ setting up the naming strategy in Hibernate which controls the automatic naming of
+ tables and columns.</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>fileset</para>
+ </entry>
+
+ <entry>
+ <para>A standard Ant fileset. Used to include hibernate mapping files. Remember that
+ if mappings are already specified in the hibernate.cfg.xml then it should not be
+ included via the fileset as it will result in duplicate import exceptions.</para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>This example shows an example where no <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none">hibernate.cfg.xml</literal>
+ </property>
+ </emphasis> exists, and a <emphasis>
+ <property moreinfo="none"> hibernate.properties </property>
+ </emphasis> and fileset is used instead. </para>
+
+ <note>
+ <title>Note:</title>
+ <para> Hibernate will still read any global <emphasis>
+ <property moreinfo="none">hibernate.properties</property>
+ </emphasis> available in the classpath, but the specified properties file here will
+ override those values for any non-global property.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <configuration propertyfile="{etc.dir}/hibernate.properties">
+ <fileset dir="${src.dir}">
+ <include name="**/*.hbm.xml"/>
+ <exclude name="**/*Test.hbm.xml"/>
+ </fileset>
+ </configuration>
+
+ <!-- list exporters here -->
+
+</hibernatetool>]]></programlisting>
+
+ </section>
+ </section>
+
+ <section>
+ <title>Annotation based Configuration (<annotationconfiguration>)</title>
+
+ <para>An <emphasis>
+ <property moreinfo="none"><annotationconfiguration></property>
+ </emphasis> is used when you want to read the metamodel from EJB3/Hibernate Annotations
+ based POJO's.</para>
+
+ <important>
+ <title>Important:</title>
+ <para>To use it remember to put the jar files needed for using hibernate annotations in the
+ classpath of the <emphasis>
+ <property moreinfo="none"><taskdef></property>, </emphasis> i. e.
+ hibernate-annotations.jar and hibernate-commons-annotations.jar.</para>
+ </important>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><annotationconfiguration></property>
+ </emphasis> supports the same attributes as a <emphasis>
+ <property moreinfo="none"><configuration></property>
+ </emphasis> except that the configurationfile attribute is now required as that is from
+ where an <literal moreinfo="none">AnnotationConfiguration</literal> gets the list of classes/packages it
+ should load.</para>
+
+ <para>Thus the minimal usage is:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <annotationconfiguration
+ configurationfile="hibernate.cfg.xml"/>
+
+ <!-- list exporters here -->
+
+</hibernatetool>
+]]></programlisting>
+
+ </section>
+
+ <section>
+ <title>JPA based configuration (<jpaconfiguration>)</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none"><jpaconfiguration></property>
+ </emphasis> is used when you want to read the metamodel from JPA/Hibernate Annotation where
+ you want to use the auto-scan configuration as defined in the JPA spec (part of EJB3). In
+ other words, when you do not have a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>, </emphasis> but instead have a setup where you use
+ a <emphasis>
+ <property moreinfo="none">persistence.xml</property>
+ </emphasis> packaged in a JPA compliant manner.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><jpaconfiguration></property>
+ </emphasis> will simply just try and auto-configure it self based on the available
+ classpath, e.g. look for <emphasis>
+ <property moreinfo="none">META-INF/persistence.xml</property>. </emphasis></para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">persistenceunit</property>
+ </emphasis> attribute can be used to select a specific persistence unit. If no <emphasis>
+ <property moreinfo="none">persistenceunit</property>
+ </emphasis> is specified it will automatically search for one and if a unique one is found,
+ use it, but if multiple persistence units are available it will error.</para>
+
+ <para>To use a <emphasis>
+ <property moreinfo="none"><jpaconfiguration></property>
+ </emphasis> you will need to specify some additional jars from Hibernate EntityManager in
+ the <emphasis>
+ <property moreinfo="none"><taskdef></property>
+ </emphasis> of the hibernatetool. The following shows a full setup:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<path id="ejb3toolslib">
+ <path refid="jpatoolslib"/> <!-- ref to previously defined toolslib -->
+ <path location="lib/hibernate-annotations.jar" />
+ <path location="lib/ejb3-persistence.jar" />
+ <path location="lib/hibernate-entitymanager.jar" />
+ <path location="lib/jboss-archive-browsing.jar" />
+ <path location="lib/javaassist.jar" />
+</path>
+
+<taskdef name="hibernatetool"
+ classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="jpatoolslib" />
+
+<hibernatetool destdir="${build.dir}">
+ <jpaconfiguration persistenceunit="caveatemptor"/>
+ <classpath>
+ <!-- it is in this classpath you put your classes dir,
+ and/or jpa persistence compliant jar -->
+ <path location="${build.dir}/jpa/classes" />
+ </classpath>
+
+ <!-- list exporters here -->
+
+</hibernatetool>
+]]></programlisting>
+
+
+ <note>
+ <title>Note:</title>
+ <para>ejb3configuration was the name used in previous versions. It still works but will emit
+ a warning telling you to use <literal moreinfo="none">jpaconfiguration</literal> instead.</para>
+ </note>
+
+ </section>
+
+ <section>
+ <title>JDBC Configuration for reverse engineering (<jdbcconfiguration>)</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> is used to perform reverse engineering of the database from a JDBC connection.</para>
+
+ <para>This configuration works by reading the connection properties either from <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">hibernate.properties</property>
+ </emphasis> with a fileset.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> has the same attributes as a <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><configuration></literal>
+ </property>
+ </emphasis> plus the following additional attributes:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<jdbcconfiguration
+ ...
+ packagename="package.name"
+ revengfile="hibernate.reveng.xml"
+ reversestrategy="ReverseEngineeringStrategy classname"
+ detectmanytomany="true|false"
+ detectoptmisticlock="true|false"
+>
+ ...
+ </jdbcconfiguration>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Jdbcconfiguration attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>packagename</para>
+ </entry>
+
+ <entry>
+ <para>The default package name to use when mappings for classes are created</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>revengfile</para>
+ </entry>
+
+ <entry>
+ <para>The name of a property file, e.g. "hibernate.properties"</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>reversestrategy</para>
+ </entry>
+
+ <entry>
+ <para>Name of a class that implements
+ org.hibernate.cfg.reveng.ReverseEngineeringStrategy. Used for setting up the
+ strategy the tools will use to control the reverse engineering, e.g. naming of
+ properties, which tables to include/exclude etc. Using a class instead of (or as
+ addition to) a reveng.xml file gives you full programmatic control of the reverse
+ engineering.</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>detectManytoMany</para>
+ </entry>
+
+ <entry>
+ <para>If true, tables which are pure many-to-many link tables will be mapped as
+ such. A pure many-to-many table is one which primary-key contains exactly two
+ foreign-keys pointing to other entity tables and has no other columns.</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>detectOptimisticLock</para>
+ </entry>
+
+ <entry>
+ <para>If true, columns named VERSION or TIMESTAMP with appropriate types will be
+ mapped with the appropriate optimistic locking corresponding to
+ <version> or <timestamp>.</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>Here is an example of using <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> to generate Hibernate xml mappings via <emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>.</emphasis> The connection settings here
+ is read from a <emphasis>
+ <property moreinfo="none"> hibernate.properties </property>
+ </emphasis> file but could just as well have been read from a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>. </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool>
+ <jdbcconfiguration propertyfile="etc/hibernate.properties" />
+ <hbm2hbmxml destdir="${build.dir}/src" />
+</hibernatetool>
+]]></programlisting>
+ </section>
+ </section>
+ </section>
+
+ <section>
+ <title>Exporters</title>
+
+ <para>Exporters are the parts that do the actual job of converting the hibernate metamodel into
+ various artifacts, mainly code. The following section describes the current supported set of
+ exporters in the <property moreinfo="none">Hibernate Tool</property> distribution. It is also possible for
+ userdefined exporters, that is done through the <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><hbmtemplate></literal>
+ </property>
+ </emphasis> exporter.</para>
+
+ <section>
+ <title>Database schema exporter (<hbm2ddl>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2ddl></property>
+ </emphasis> lets you run schemaexport and schemaupdate which generates the appropriate SQL
+ DDL and allow you to store the result in a file or export it directly to the database.
+ Remember that if a custom naming strategy is needed it is placed on the configuration
+ element.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hbm2ddl
+ export="true|false"
+ update="true|false"
+ drop="true|false"
+ create="true|false"
+ outputfilename="filename.ddl"
+ delimiter=";"
+ format="true|false"
+ haltonerror="true|false"
+ >]]></programlisting>
+
+ <table frame="topbot">
+ <title>Hbm2ddl exporter attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>export</para>
+ </entry>
+
+ <entry>
+ <para>Executes the generated statements against the database</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>update</para>
+ </entry>
+
+ <entry>
+ <para>Try and create an update script representing the "delta"
+ between what is in the database and what the mappings specify. Ignores
+ create/update attributes. (<emphasis>Do *not* use against production databases, no
+ guarantees at all that the proper delta can be generated nor that the underlying
+ database can actually execute the needed operations</emphasis>).</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>drop</para>
+ </entry>
+
+ <entry>
+ <para>Output will contain drop statements for the tables, indices and
+ constraints</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>create</para>
+ </entry>
+
+ <entry>
+ <para>Output will contain create statements for the tables, indices and
+ constraints</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>outputfilename</para>
+ </entry>
+
+ <entry>
+ <para>If specified the statements will be dumped to this file</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>delimiter</para>
+ </entry>
+
+ <entry>
+ <para>If specified the statements will be dumped to this file</para>
+ </entry>
+
+ <entry>
+ <para>Default: ";"</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>format</para>
+ </entry>
+
+ <entry>
+ <para>Apply basic formatting to the statements</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>haltonerror</para>
+ </entry>
+
+ <entry>
+ <para>Halt build process if an error occurs</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>Basic example of using <emphasis>
+ <property moreinfo="none"><hbm2ddl></property>, </emphasis> which does not export to the
+ database but simply dumps the sql to a file named <emphasis>
+ <property moreinfo="none">sql.ddl</property>. </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2ddl export="false" outputfilename="sql.ddl"/>
+</hibernatetool>]]></programlisting>
+ </section>
+ </section>
+
+ <section>
+ <title>POJO java code exporter (<literal moreinfo="none"><hbm2java></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> is a java codegenerator. Options for controlling whether JDK 5 syntax can be
+ used and whether the POJO should be annotated with EJB3/Hibernate Annotations.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hbm2java
+ jdk5="true|false"
+ ejb3="true|false"
+>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Hbm2java exporter attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Default value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>jdk</para>
+ </entry>
+
+ <entry>
+ <para>Code will contain JDK 5 constructs such as generics and static imports</para>
+ </entry>
+
+ <entry>
+ <para>False</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>ejb3</para>
+ </entry>
+
+ <entry>
+ <para>Code will contain EJB 3 features, e.g. using annotations from
+ javax.persistence and org.hibernate.annotations</para>
+ </entry>
+
+ <entry>
+ <para>False</para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>Basic example of using <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> to generate POJO's that utilize jdk5 constructs.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2java jdk5="true"/>
+</hibernatetool>]]></programlisting>
+ </section>
+ </section>
+
+ <section>
+ <title>Hibernate Mapping files exporter (<literal moreinfo="none"><hbm2hbmxml></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>
+ </emphasis> generates a set of .hbm files. Intended to be used together with a <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> when performing reverse engineering, but can be used with any kind of
+ configuration. e.g. to convert from annotation based pojo's to <emphasis>
+ <property moreinfo="none">hbm.xml</property>. </emphasis></para>
+
+ <note>
+ <title>Note:</title>
+ <para>Not every possible mapping transformation is possible/implemented (contributions
+ welcome) so some hand editing might be necessary.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hbm2hbmxml/>]]></programlisting>
+
+ <section>
+ <title>Example</title>
+
+ <para>Basic usage of <emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>. </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2hbmxml/>
+</hibernatetool>]]></programlisting>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>
+ </emphasis> is normally used with a <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> like in the above example, but any other configuration can also be used to
+ convert between the different ways of performing mappings. Here is an example of that,
+ using an <emphasis>
+ <property moreinfo="none"><annotationconfiguration></property>
+ </emphasis>.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Not all conversions are implemented (contributions welcome), so some hand editing
+ might be necessary.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+ <annotationconfiguration configurationfile="hibernate.cfg.xml"/>
+ <hbm2hbmxml/>
+</hibernatetool>]]></programlisting>
+ </section>
+ </section>
+
+ <section>
+ <title>Hibernate Configuration file exporter (<literal moreinfo="none"><hbm2cfgxml></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2cfgxml></property>
+ </emphasis> generates a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>. </emphasis> Intended to be used together with a <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> when performing reverse engineering, but it can be used with any kind of
+ configuration. The <emphasis>
+ <property moreinfo="none"><hbm2cfgxml></property>
+ </emphasis> will contain the properties used and adds mapping entries for each mapped class.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hbm2cfgxml
+ ejb3="true|false"
+/>
+]]></programlisting>
+
+ <table frame="topbot">
+ <title>Hbm2cfgxml exporter attribute</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Default value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>ejb3</para>
+ </entry>
+
+ <entry>
+ <para>The generated cfg.xml will have <mapping class=".."/>, opposed
+ to <mapping resource="..."/> for each mapping.</para>
+ </entry>
+
+ <entry>
+ <para>False</para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title>Documentation exporter (<literal moreinfo="none"><hbm2doc></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2doc></property>
+ </emphasis> generates html documentation a'la javadoc for the database schema et.al.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hbm2doc/>]]></programlisting>
+ </section>
+
+ <section>
+ <title>Query exporter (<query>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><query></property>
+ </emphasis> is used to execute a HQL query statements and optionally sends the output to a
+ file. It can be used for verifying the mappings and for basic data extraction.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<query
+ destfile="filename">
+ <hql>[a HQL query string]</hql>
+</query>
+]]></programlisting>
+
+ <para>Currently one session is opened and used for all queries and the query is executed via
+ the list() method. In the future more options might become available, like performing
+ executeUpdate(), use named queries and etc.</para>
+
+ <para></para>
+
+ <section>
+ <title>Examples</title>
+
+ <para>The simplest usage of <emphasis>
+ <property moreinfo="none"><query></property>
+ </emphasis> will just execute the query without dumping to a file. This can be used to
+ verify that queries can actually be performed.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool>
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <query>from java.lang.Object</query>
+</hibernatetool>]]></programlisting>
+
+ <para>Multiple queries can be executed by nested <emphasis>
+ <property moreinfo="none"><hql></property>
+ </emphasis> elements. In this example we also let the output be dumped to <emphasis>
+ <property moreinfo="none">queryresult.txt</property>. </emphasis></para>
+
+ <note>
+ <title>Note:</title>
+ <para> Currently the dump is simply a call to toString on each element.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool>
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <query destfile="queryresult.txt">
+ <hql>select c.name from Customer c where c.age > 42</hql>
+ <hql>from Cat</hql>
+</hibernatetool>]]></programlisting>
+
+ </section>
+ </section>
+
+ <section id="hbmtemplate">
+ <title>Generic Hibernate metamodel exporter (<literal moreinfo="none"><hbmtemplate></literal>)</title>
+
+ <para>Generic exporter that can be controlled by a user provides a template or class.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hbmtemplate
+ filepattern="{package-name}/{class-name}.ftl"
+ template="somename.ftl"
+ exporterclass="Exporter classname"
+/>]]></programlisting>
+
+ <note>
+ <title>Note:</title>
+ <para>Previous versions of the tools used Velocity. We are now using Freemarker which
+ provides us much better exception and error handling.</para>
+ </note>
+
+ <section>
+ <title>Exporter via <hbmtemplate></title>
+
+ <para>The following is an example of reverse engineering via <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> and usage of a custom Exporter via the <emphasis>
+ <property moreinfo="none"><hbmtemplate></property>
+ </emphasis>.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[ <hibernatetool destdir="${destdir}">
+ <jdbcconfiguration
+ configurationfile="hibernate.cfg.xml"
+ packagename="my.model"/>
+
+ <!-- setup properties -->
+ <property key="appname" value="Registration"/>
+ <property key="shortname" value="crud"/>
+
+ <hbmtemplate
+ exporterclass="my.own.Exporter"
+ filepattern="."/>
+
+</hibernatetool>
+]]></programlisting>
+
+ </section>
+ <section>
+ <title>Relevant Resources Links</title>
+
+ <para>Read more about <ulink url="http://velocity.apache.org/">Velocity</ulink> and <ulink url="http://freemarker.org/">Freemarker</ulink> to find out why using the last is better
+ or refer to Max Andersen discussion on the topic in <ulink url="http://in.relation.to/2110.lace;jsessionid=3462F47B17556604C15DF1B96572E940">"A story about FreeMarker and Velocity"</ulink>.</para>
+ </section>
+ </section>
+ </section>
+
+
+
+ <section>
+ <title>Using properties to configure Exporters</title>
+
+ <para>Exporters can be controlled by user properties. The user properties are specified via <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><propertyset></literal>
+ </property>
+ </emphasis> and each exporter will have access to them directly in the templates and via
+ <property moreinfo="none">Exporter.setProperties()</property>.</para>
+
+ <section>
+ <title><literal moreinfo="none"><property></literal> and
+ <literal moreinfo="none"><propertyset></literal></title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> allows you bind a string value to a key. The value will be available in the
+ templates via <emphasis>
+ <property moreinfo="none">$<key></property>
+ </emphasis>. The following example will assign the string value <emphasis>
+ <property moreinfo="none">"true"</property>
+ </emphasis> to the variable <emphasis>
+ <property moreinfo="none">$descriptors</property>
+ </emphasis>.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<property key="descriptors" value="true"/>]]></programlisting>
+
+ <para>Most times using <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><property></literal>
+ </property>
+ </emphasis> is enough for specifying the properties needed for the exporters. Still the ant
+ tools supports the notion of <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><propertyset></literal>
+ </property>
+ </emphasis> that is used for grouping a set of properties. More about the functionality of <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><propertyset></literal>
+ </property>
+ </emphasis> is explained in detail in the <ulink url="http://ant.apache.org/manual/">Ant
+ manual</ulink>.</para>
+ </section>
+
+ <section>
+ <title>Getting access to user specific classes</title>
+
+ <para>If the templates need to access some user class it becomes possible by specifying a <emphasis>
+ <property moreinfo="none">"toolclass"</property>
+ </emphasis> in the properties.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<property key="hibernatetool.sometool.toolclass" value="x.y.z.NameOfToolClass"/>
+]]></programlisting>
+
+ <para>Placing the above <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><property></literal>
+ </property>
+ </emphasis> tag in <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><hibernatetool></literal>
+ </property>
+ </emphasis> or inside any exporter will automatically create an instance of
+ <literal moreinfo="none">x.y.z.NameOfToolClass</literal> and it will be available in the templates as
+ <literal moreinfo="none">$sometool</literal>. This is useful to delegate logic and code generation to java
+ code instead of placing such logic in the templates.</para>
+
+ <section>
+ <title>Example</title>
+
+ <para>Here is an example that uses <emphasis>
+ <property moreinfo="none"><hbmtemplate></property>
+ </emphasis> together with <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> which will be available to the templates/exporter. </para>
+ <note>
+ <title>Note:</title>
+ <para> This example actually simulates what <hbm2java> actually does.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernatetool destdir="${build.dir}/generated">
+<configuration
+ configurationfile="etc/hibernate.cfg.xml"/>
+ <hbmtemplate
+ templateprefix="pojo/"
+ template="pojo/Pojo.ftl"
+ filepattern="{package-name}/{class-name}.java">
+ <property key="jdk5" value="true" />
+ <property key="ejb3" value="true" />
+ </hbmtemplate>
+</hibernatetool>
+]]></programlisting>
+ </section>
+ </section>
+ </section>
+</chapter>
+
+
+<chapter id="reverseengineering" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml">
+ <title>Controlling reverse engineering</title>
+
+ <para>When using the <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>, </emphasis> the ant task will read the
+ database metadata and thus will perform a reverse engineering of the database schema into a
+ normal Hibernate Configuration. It is from this object e.g. <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis>can generate other artifacts such as <emphasis>
+ <property moreinfo="none">.java</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis> etc.</para>
+
+ <para>To govern this process <property moreinfo="none">Hibernate</property> uses a reverse engineering strategy. A
+ reverse engineering strategy is mainly called to provide more java like names for tables, column
+ and foreignkeys into classes, properties and associations. It also used to provide mappings from
+ SQL types to <property moreinfo="none">Hibernate</property> types. The strategy can be customized by a user. The
+ user can even provide its own custom reverse engineering strategy if the provided strategy is
+ not enough, or simply just provide a small part of the strategy and delegate the rest to the
+ default strategy.</para>
+
+ <para>Thus, further in this chapter we will discuss how you can configure the process of a reverse
+ engineering, what default reverse engineering strategy includes as well as some custom concepts.</para>
+
+ <section>
+ <title>Default reverse engineering strategy</title>
+
+ <para>The default strategy uses some rules for mapping JDBC artifact names to java artifact
+ names. It also provide basic typemappings from JDBC types to <property moreinfo="none">Hibernate</property>
+ types. It is the default strategy that uses the packagename attribute to convert a table name
+ to a fully qualified classname.</para>
+ </section>
+
+ <section id="hibernaterevengxmlfile">
+ <title>hibernate.reveng.xml file</title>
+
+ <para>To have fine control over the process a <emphasis>
+ <property moreinfo="none">hibernate.reveng.xml</property>
+ </emphasis> file can be provided. In this file you can specify type mappings and table
+ filtering. This file can be created by hand (it's just basic XML) or you can use the
+ <ulink url="http://www.hibernate.org/30.html">Hibernate plugins</ulink> which have a
+ specialized editor.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Many databases are case-sensitive with their names and thus if you cannot make some
+ table match and you are sure it is not excluded by a <table-filter> then check
+ if the case matches; most databases stores table names in uppercase.</para>
+ </note>
+
+ <para>Below you can see an example of a <emphasis>
+ <property moreinfo="none">reveng.xml</property>. </emphasis> Following the example gives you more details
+ about the format.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-reverse-engineering
+ SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
+
+<hibernate-reverse-engineering>
+
+<type-mapping>
+ <!-- jdbc-type is name fom java.sql.Types -->
+ <sql-type jdbc-type="VARCHAR" length='20' hibernate-type="SomeUserType" />
+ <sql-type jdbc-type="VARCHAR" length='1' hibernate-type="yes_no" />
+ <!-- length, scale and precision can be used to specify the mapping precisly -->
+ <sql-type jdbc-type="NUMERIC" precision='1' hibernate-type="boolean" />
+ <!-- the type-mappings are ordered. This mapping will be consulted last,
+ thus overriden by the previous one if precision=1 for the column -->
+ <sql-type jdbc-type="NUMERIC" hibernate-type="long" />
+</type-mapping>
+
+<!-- BIN$ is recycle bin tables in Oracle -->
+<table-filter match-name="BIN$.*" exclude="true" />
+
+<!-- Exclude DoNotWantIt from all catalogs/schemas -->
+<table-filter match-name="DoNotWantIt" exclude="true" />
+
+<!-- exclude all tables from the schema SCHEMA in catalog BAD. -->
+<table-filter match-catalog="BAD" match-schema="SCHEMA" match-name=".*" exclude="true" />
+
+<!-- table allows you to override/define how reverse engineering
+ is done for a specific table -->
+<table name="ORDERS">
+ <primary-key>
+ <!-- setting up a specific id generator for a table -->
+ <generator class="sequence">
+ <param name="table">seq_table</param>
+ </generator>
+ <key-column name="CUSTID"/>
+ </primary-key>
+ <column name="NAME" property="orderName" type="string" />
+ <!-- control many-to-one and set names for a specific named foreign key constraint -->
+ <foreign-key constraint-name="ORDER_CUST">
+ <many-to-one property="customer"/>
+ <set property="orders"/>
+ </foreign-key>
+ <!-- can also control a pure (shared pk) one-to-one -->
+ <foreign-key constraint-name="ADDRESS_PERSON">
+ <one-to-one exclude="false"/>
+ <inverse-one-to-one exclude="true"/>
+ </foreign-key>
+</table>
+
+</hibernate-reverse-engineering>]]></programlisting>
+
+
+ <section>
+ <title>Schema Selection (<schema-selection>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><schema-selection></property>
+ </emphasis> is used to drive which schemas the reverse engineering will try and
+ process.</para>
+
+ <para>By default the reverse engineering will read all schemas and then use <emphasis>
+ <property moreinfo="none"><table-filter></property>
+ </emphasis> to decide which tables get reverse engineered and which do not; this makes it
+ easy to get started but can be inefficient on databases with many schemas.</para>
+
+ <para>With <emphasis>
+ <property moreinfo="none"><schema-selection></property>
+ </emphasis> it is thus possible to limit the actual processed schemas and thus significantly
+ speed-up the reverse engineering. <emphasis>
+ <property moreinfo="none"><table-filter></property>
+ </emphasis> is still used to then decide which tables will be included/excluded.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>If no <literal moreinfo="none"><schema-selection></literal> is specified, the reverse
+ engineering works as if all schemas should be processed. This is equal to:
+ <![CDATA[<schema-selection/>]]>. Which in turn is equal to:
+ <![CDATA[<schema-selection match-catalog=".*" match-schema=".*" match-table=".*"/>]]></para>
+ </note>
+
+ <section>
+ <title>Examples</title>
+
+ <para>The following will process all tables from <emphasis>
+ <property moreinfo="none">"MY_SCHEMA"</property>.
+ </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<schema-selection match-schema="MY_SCHEMA"/>]]></programlisting>
+
+ <para>It is possible to have multiple <literal moreinfo="none">schema-selection</literal>'s to support
+ multi-schema reading or simply to limit the processing to very specific tables. The
+ following example processes all tables in <emphasis>
+ <property moreinfo="none">"MY_SCHEMA"</property>,
+ </emphasis> a specific <emphasis>
+ <property moreinfo="none">"CITY"</property>
+ </emphasis> table plus all tables that starts with <emphasis>
+ <property moreinfo="none">"CODES_"</property>
+ </emphasis> in <emphasis>
+ <property moreinfo="none">"COMMON_SCHEMA"</property>.
+ </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<schema-selection match-schema="MY_SCHEMA"/>
+<schema-selection match-schema="COMMON_SCHEMA" match-table="CITY"/>
+<schema-selection match-schema="COMMON_SCHEMA" match-table="CODES_.*"/>]]></programlisting>
+ </section>
+ </section>
+
+ <section id="type_map">
+ <title>Type mappings (<type-mapping>)</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><type-mapping></property>
+ </emphasis> section specifies how the JDBC types found in the database should be mapped to
+ Hibernate types. e.g. <emphasis>
+ <property moreinfo="none">java.sql.Types.VARCHAR</property></emphasis> with a length of 1 should be mapped to the
+ Hibernate type <emphasis>
+ <property moreinfo="none">yes_no</property></emphasis> or <emphasis>
+ <property moreinfo="none">java.sql.Types.NUMERIC</property></emphasis> should generally just be
+ converted to the Hibernate type <literal moreinfo="none">long</literal>.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<type-mapping>
+ <sql-type
+ jdbc-type="integer value or name from java.sql.Types"
+ length="a numeric value"
+ precision="a numeric value"
+ scale="a numeric value"
+ not-null="true|false"
+ hibernate-type="hibernate type name"
+ />
+</type-mapping>]]></programlisting>
+
+ <para>The number of attributes specified and the sequence of the <literal moreinfo="none">sql-type</literal>'s
+ is important. Meaning that <property moreinfo="none">Hibernate</property> will search for the most specific
+ first, and if no specific match is found it will seek from top to bottom when trying to
+ resolve a type mapping.</para>
+
+ <section>
+ <title>Example</title>
+
+ <para>The following is an example of a type-mapping which shows the flexibility and the
+ importance of ordering of the type mappings.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<type-mapping>
+ <sql-type jdbc-type="NUMERIC" precision="15" hibernate-type="big_decimal"/>
+ <sql-type jdbc-type="NUMERIC" not-null="true" hibernate-type="long" />
+ <sql-type jdbc-type="NUMERIC" not-null="false" hibernate-type="java.lang.Long" />
+ <sql-type jdbc-type="VARCHAR" length="1" not-null="true"
+ hibernate-type="java.lang.Character"/>
+ <sql-type jdbc-type="VARCHAR" hibernate-type="your.package.TrimStringUserType"/>
+ <sql-type jdbc-type="VARCHAR" length="1" hibernate-type="char"/>
+ <sql-type jdbc-type="VARCHAR" hibernate-type="string"/>
+</type-mapping>]]></programlisting>
+
+ <para>The following table shows how this affects an example table named <emphasis>
+ <property moreinfo="none">CUSTOMER</property>:</emphasis></para>
+
+ <table frame="topbot">
+ <title>sql-type examples</title>
+
+ <tgroup cols="7">
+ <colspec colwidth="0.4*"></colspec>
+
+ <colspec colwidth="0.4*"></colspec>
+
+ <colspec colwidth="0.2*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="0.2*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.7*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Column</entry>
+
+ <entry>jdbc-type</entry>
+
+ <entry>length</entry>
+
+ <entry>precision</entry>
+
+ <entry>not-null</entry>
+
+ <entry>Resulting hibernate-type</entry>
+
+ <entry>Rationale</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>ID</entry>
+
+ <entry>INTEGER</entry>
+
+ <entry></entry>
+
+ <entry>10</entry>
+
+ <entry>true</entry>
+
+ <entry>int</entry>
+
+ <entry>Nothing is defined for INTEGER. Falling back to default behavior.</entry>
+ </row>
+
+ <row>
+ <entry>NAME</entry>
+
+ <entry>VARCHAR</entry>
+
+ <entry>30</entry>
+
+ <entry></entry>
+
+ <entry>false</entry>
+
+ <entry>your.package.TrimStringUserType</entry>
+
+ <entry>No type-mapping matches length=30 and not-null=false, but type-mapping
+ matches the 2 mappings which only specifies VARCHAR. The type-mapping that comes
+ first is chosen.</entry>
+ </row>
+
+ <row>
+ <entry>INITIAL</entry>
+
+ <entry>VARCHAR</entry>
+
+ <entry>1</entry>
+
+ <entry></entry>
+
+ <entry>false</entry>
+
+ <entry>char</entry>
+
+ <entry>Even though there is a generic match for VARCHAR, the more specific
+ type-mapping for VARCHAR with not-null="false" is chosen. The first VARCHAR
+ sql-type matches in length but has no value for not-null and thus is not
+ considered.</entry>
+ </row>
+
+ <row>
+ <entry>CODE</entry>
+
+ <entry>VARCHAR</entry>
+
+ <entry>1</entry>
+
+ <entry></entry>
+
+ <entry>true</entry>
+
+ <entry>java.lang.Character</entry>
+
+ <entry>The most specific VARCHAR with not-null="true" is selected</entry>
+ </row>
+
+ <row>
+ <entry>SALARY</entry>
+
+ <entry>NUMERIC</entry>
+
+ <entry></entry>
+
+ <entry>15</entry>
+
+ <entry>false</entry>
+
+ <entry>big_decimal</entry>
+
+ <entry>There is a precise match for NUMERIC with precision 15</entry>
+ </row>
+
+ <row>
+ <entry>AGE</entry>
+
+ <entry>NUMERIC</entry>
+
+ <entry></entry>
+
+ <entry>3</entry>
+
+ <entry>false</entry>
+
+ <entry>java.lang.Long</entry>
+
+ <entry>type-mapping for NUMERIC with not-null="false"</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para></para>
+ </section>
+ </section>
+
+ <section>
+ <title>Table filters (<table-filter>)</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><table-filter></property>
+ </emphasis> let you specify matching rules for performing general filtering/setup for
+ tables, e.g. let you include or exclude specific tables based on the schema or even a
+ specific prefix.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<table-filter
+ match-catalog="catalog_matching_rule"
+ match-schema="schema_matching_rule"
+ match-name="table_matching_rule"
+ exclude="true|false"
+ package="package.name"
+/>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Table-filter attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Default value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>match-catalog</para></entry>
+
+ <entry><para>Pattern for matching catalog part of the table</para></entry>
+
+ <entry><para>.*</para></entry>
+ </row>
+
+ <row>
+ <entry><para>match-schema</para></entry>
+
+ <entry><para>Pattern for matching schema part of the table</para></entry>
+
+ <entry><para>.*</para></entry>
+ </row>
+
+ <row>
+ <entry><para>match-table</para></entry>
+
+ <entry><para>Pattern for matching table part of the table</para></entry>
+
+ <entry><para>.*</para></entry>
+ </row>
+
+ <row>
+ <entry><para>exclude </para></entry>
+
+ <entry><para>If true the table will not be part of the reverse
+ engineering</para></entry>
+
+ <entry><para>false</para></entry>
+ </row>
+
+ <row>
+ <entry><para>package</para></entry>
+
+ <entry><para>The default package name to use for classes based on tables
+ matched by this table-filter</para></entry>
+
+ <entry><para>""</para></entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section id="tab_and_col">
+ <title>Specific table configuration (<table>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><table></property>
+ </emphasis> allows you to provide explicit configuration on how a table should be reverse
+ engineered. Amongst other things it allows controlling over the naming of a class for the
+ table, specifying which identifier generator should be used for the primary key etc.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<table
+ catalog="catalog_name"
+ schema="schema_name"
+ name="table_name"
+ class="ClassName"
+>
+ <primary-key.../>
+ <column.../>
+ <foreign-key.../>
+ </table>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Table attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>catalog</para></entry>
+
+ <entry><para>Catalog name for a table. It has to be specified if you are
+ reverse engineering multiple catalogs or if it is not equal to
+ hiberante.default_catalog.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>schema</para></entry>
+
+ <entry><para>Schema name for a table. It has to be specified if you are
+ reverse engineering multiple schemas or if it is not equal to
+ hiberante.default_schema.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>name</para></entry>
+
+ <entry><para>Name for a table.</para></entry>
+
+ <entry><para>Required</para></entry>
+ </row>
+
+ <row>
+ <entry><para>class</para></entry>
+
+ <entry><para>The class name for a table. Default name is a camelcase version
+ of the table name.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title><primary-key></title>
+
+ <para>A <emphasis>
+ <property moreinfo="none"><primary-key></property>
+ </emphasis> allows you to define a primary-key for tables that don't have it
+ defined in the database, and probably more importantly it allows you to define which
+ identifier strategy should be used (even for already existing primary-key's).</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<primary-key
+ <generator class="generatorname">
+ <param name="param_name">parameter value</param>
+ </generator>
+ <key-column...>
+ </primary-key>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Primary-key attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>generator/class</para></entry>
+
+ <entry><para>Defines which identifier generator should be used.
+ The class name is any hibernate short hand name or fully qualified class name for an
+ identifier strategy.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>generator/param</para></entry>
+
+ <entry><para>Allows to specify which parameter with a name and
+ value should be passed to the identifier generator.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>key-column</para></entry>
+
+ <entry><para>Specifies which column(s ) the primary-key consists of. A
+ key-column is same as column, but does not have the exclude property.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title><column></title>
+
+ <para>With a <emphasis>
+ <property moreinfo="none"><column></property>
+ </emphasis> it is possible to explicitly name the resulting property for a column. It is
+ also possible to redefine what jdbc and/or Hibernate type a column should be processed as
+ and finally it is possible to completely exclude a column from processing.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<column
+ name="column_name"
+ jdbc-type="java.sql.Types type"
+ type="hibernate_type"
+ property="propertyName"
+ exclude="true|false"
+/>]]></programlisting>
+
+ <table frame="topbot">
+ <title>Column attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>name</para></entry>
+
+ <entry><para>Column name</para></entry>
+
+ <entry><para>Required</para></entry>
+ </row>
+
+ <row>
+ <entry><para>jdbc-type</para></entry>
+
+ <entry><para>Which jdbc-type this column should be processed as. A
+ value from java.sql.Types, either numerical (93) or the constant name
+ (TIMESTAMP).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>type</para></entry>
+
+ <entry><para>Which hibernate-type to use for this specific column</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+
+ <row>
+ <entry><para>property</para></entry>
+
+ <entry><para>What property name will be generated for this
+ column</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>exclude</para></entry>
+
+ <entry><para>Set to true if this column should be ignored</para></entry>
+
+ <entry><para>default: false</para></entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title><foreign-key></title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><foreign-key></property>
+ </emphasis> has two purposes. One for allowing to define foreign-keys in databases that
+ does not support them or does not have them defined in their schema. Secondly, to allow
+ defining the name of the resulting properties (many-to-one, one-to-one and one-to-many's).</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<foreign-key
+ constraint-name="foreignKeyName"
+ foreign-catalog="catalogName"
+ foreign-schema="schemaName"
+ foreign-table="tableName"
+ >
+ <column-ref local-column="columnName" foreign-column="foreignColumnName"/>
+ <many-to-one
+ property="aPropertyName"
+ exclude="true|false"/>
+ <set
+ property="aCollectionName"
+ exclude="true|false"
+
+ <one-to-one
+ property="aPropertyName"
+ exclude="true|false"/>
+ <inverse-one-to-one
+ property="aPropertyName"
+ exclude="true|false"/>
+ </foreign-key>]]></programlisting>
+ <table frame="topbot">
+ <title>Foreign-key attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>constraint-name</para></entry>
+
+ <entry><para>Name of the foreign key constraint. Important when
+ naming many-to-one, one-to-one and set. It is the constraint-name that is used to link the
+ processed foreign-keys with the resulting property names.</para></entry>
+
+ <entry><para>Required</para></entry>
+ </row>
+
+ <row>
+ <entry><para>foreign-catalog</para></entry>
+
+ <entry><para>Name of the foreign table's catalog. (Only
+ relevant if you want to explicitly define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>foreign-schema</para></entry>
+
+ <entry><para>Name of the foreign table's schema. (Only relevant
+ if you want to explicitly define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+
+ <row>
+ <entry><para>foreign-table</para></entry>
+
+ <entry><para>Name of the foreign table. (Only relevant if you
+ want to explicitly define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>column-ref </para></entry>
+
+ <entry><para>Defines that the foreign-key constraint between a
+ local-column and foreign-column name. (Only relevant if you want to explicitly
+ define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>many-to-one</para></entry>
+
+ <entry><para>Defines that a many-to-one should be created and the
+ property attribute specifies the name of the resulting property. Exclude can be
+ used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>set</para></entry>
+
+ <entry><para>Defines that a set should be created based on this foreign-key
+ and the property attribute specifies the name of the resulting (set) property.
+ Exclude can be used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>one-to-one</para></entry>
+
+ <entry><para>Defines that a one-to-one should be created and the
+ property attribute specifies the name of the resulting property. Exclude can be
+ used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>inverse-one-to-one</para></entry>
+
+ <entry><para>Defines that an inverse one-to-one should be created based on this foreign-key
+ and the property attribute specifies the name of the resulting property.
+ Exclude can be used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+ </section>
+ </section>
+
+ <section id="custom-reveng-strategy">
+ <title>Custom strategy</title>
+
+ <para>It is possible to implement a user strategy. Such strategy must implement <emphasis>
+ <property moreinfo="none">org.hibernate.cfg.reveng.ReverseEngineeringStrategy</property>.
+ </emphasis> It is recommended that one uses the
+ <property moreinfo="none">DelegatingReverseEngineeringStrategy</property> and provide a public constructor
+ which takes another <property moreinfo="none">ReverseEngineeringStrategy </property> as an argument. This will
+ allow you to only implement the relevant methods and provide a fallback strategy. Example of
+ custom delegating strategy which converts all column names that ends with <emphasis>
+ <property moreinfo="none">"PK"</property>
+ </emphasis> into a property named <emphasis>
+ <property moreinfo="none">"id"</property>.
+ </emphasis></para>
+
+ <programlisting format="linespecific" role="JAVA"><![CDATA[public class ExampleStrategy extends DelegatingReverseEngineeringStrategy {
+
+ public ExampleStrategy(ReverseEngineeringStrategy delegate) {
+ super(delegate);
+ }
+
+ public String columnToPropertyName(TableIdentifier table, String column) {
+ if(column.endsWith("PK")) {
+ return "id";
+ } else {
+ return super.columnToPropertyName(table, column);
+ }
+ }
+}]]></programlisting>
+ </section>
+
+ <section>
+ <title>Custom Database Metadata</title>
+
+ <para>By default the reverse engineering is performed by reading using the JDBC database
+ metadata API. This is done via the class <emphasis>
+ <property moreinfo="none">org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect</property>
+ </emphasis> which is an implementation of <emphasis>
+ <property moreinfo="none">org.hibernate.cfg.reveng.dialect.MetaDataDialect</property>.
+ </emphasis></para>
+
+ <para>The default implementation can be replaced with an alternative implementation by setting
+ the property <emphasis>
+ <property moreinfo="none">hibernatetool.metadatadialect</property>
+ </emphasis> to a fully qualified classname for a class that implements
+ <property moreinfo="none">JDBCMetaDataDialect</property>.</para>
+
+ <para>This can be used to provide database specific optimized metadata reading. If you create an
+ optimized/better metadata reading for your database it will be a very welcome
+ contribution.</para>
+ </section>
+</chapter>
+
+
+<chapter id="codegen" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/codegen.xml">
+ <title>Controlling POJO code generation</title>
+
+ <para>When using <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> or the eclipse plugin to generate POJO java code you have the possibility to control
+ certain aspects of the code generation. This is primarily done with the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag in the mapping files. The following section describes the possible <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tags and their use.</para>
+
+ <section>
+ <title>The <literal moreinfo="none"><meta></literal> attribute</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag is a simple way of annotating the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> with information, so tools have a natural place to store/read information that is
+ not directly related to the Hibernate core.</para>
+
+ <para>You can use the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag to e.g. tell <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> to only generate <emphasis>
+ <property moreinfo="none">"protected"</property>
+ </emphasis> setters, have classes always implement a certain set of interfaces or even have
+ them extend a certain base class and even more.</para>
+
+ <para>The following example shows how to use various <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes and the resulting java code.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<class name="Person">
+ <meta attribute="class-description">
+ Javadoc for the Person class
+ @author Frodo
+ </meta>
+ <meta attribute="implements">IAuditable</meta>
+ <id name="id" type="long">
+ <meta attribute="scope-set">protected</meta>
+ <generator class="increment"/>
+ </id>
+ <property name="name" type="string">
+ <meta attribute="field-description">The name of the person</meta>
+ </property>
+</class>]]></programlisting>
+
+ <para>The above <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> will produce something like the following (code shortened for better
+ understanding). Notice the Javadoc comment and the protected set methods:</para>
+
+ <programlisting format="linespecific" role="JAVA"><![CDATA[// default package
+
+import java.io.Serializable;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * Javadoc for the Person class
+ * @author Frodo
+ */
+public class Person implements Serializable, IAuditable {
+
+ public Long id;
+
+ public String name;
+
+ public Person(java.lang.String name) {
+ this.name = name;
+ }
+
+ public Person() {
+ }
+
+ public java.lang.Long getId() {
+ return this.id;
+ }
+
+ protected void setId(java.lang.Long id) {
+ this.id = id;
+ }
+
+ /**
+ * The name of the person
+ */
+ public java.lang.String getName() {
+ return this.name;
+ }
+
+ public void setName(java.lang.String name) {
+ this.name = name;
+ }
+
+}]]></programlisting>
+
+ <table frame="topbot">
+ <title>Supported meta tags</title>
+
+ <tgroup cols="2">
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <literal moreinfo="none">class-description</literal>
+ </entry>
+
+ <entry>inserted into the javadoc for classes</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">field-description</literal>
+ </entry>
+
+ <entry>inserted into the javadoc for fields/properties</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">interface</literal>
+ </entry>
+
+ <entry>If true, an interface is generated instead of an class.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">implements</literal>
+ </entry>
+
+ <entry>interface the class should implement</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">extends</literal>
+ </entry>
+
+ <entry>class that the current class should extend (ignored for subclasses)</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">generated-class</literal>
+ </entry>
+
+ <entry>overrule the name of the actual class generated</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-class</literal>
+ </entry>
+
+ <entry>scope for class</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-set</literal>
+ </entry>
+
+ <entry>scope for setter method</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-get</literal>
+ </entry>
+
+ <entry>scope for getter method</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-field</literal>
+ </entry>
+
+ <entry>scope for actual field</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">default-value</literal>
+ </entry>
+
+ <entry>default initialization value for a field</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">use-in-tostring</literal>
+ </entry>
+
+ <entry>include this property in the <literal moreinfo="none">toString()</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">use-in-equals</literal>
+ </entry>
+
+ <entry>include this property in the <literal moreinfo="none">equals()</literal> and
+ <literal moreinfo="none">hashCode()</literal> method. If no use-in-equals is specified, no
+ equals/hashcode will be generated.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">gen-property</literal>
+ </entry>
+
+ <entry>property will not be generated if false (use with care)</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">property-type</literal>
+ </entry>
+
+ <entry>Overrides the default type of property. Use this with any tag's to specify the
+ concrete type instead of just Object.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">class-code</literal>
+ </entry>
+
+ <entry>Extra code that will inserted at the end of the class</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">extra-import</literal>
+ </entry>
+
+ <entry>Extra import that will inserted at the end of all other imports</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Attributes declared via the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag are per default <emphasis>
+ <property moreinfo="none">"inherited"</property>
+ </emphasis> inside an <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> file.</para>
+
+ <para>What does that mean? It means that if you e.g want to have all your classes implement
+ <literal moreinfo="none">IAuditable</literal> then you just add an <emphasis> <meta
+ attribute="implements">IAuditable</meta></emphasis> in the top of the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> file, just after <emphasis>
+ <property moreinfo="none"><hibernate-mapping></property>. </emphasis> Now all classes defined
+ in that <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> file will implement <literal moreinfo="none">IAuditable</literal>!</para>
+
+ <note>
+ <title>Note:</title>
+ <para>This applies to <emphasis>all</emphasis>
+ <literal moreinfo="none"><meta></literal>-tags. Thus it can also e.g. be used to specify that
+ all fields should be declare protected, instead of the default private. This is done by
+ adding <literal moreinfo="none"><meta
+ attribute="scope-field">protected</meta></literal> at e.g. just under
+ the <literal moreinfo="none"><class></literal> tag and all fields of that class will be
+ protected.</para>
+ </note>
+
+ <para>To avoid having a <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag inherited then you can simply specify <emphasis> inherit = "false"</emphasis>
+ for the attribute, e.g. <emphasis> <meta attribute = "scope-class" inherit =
+ "false">public abstract</meta></emphasis> will restrict the <emphasis>
+ <property moreinfo="none">"class-scope"</property>
+ </emphasis> to the current class, not the subclasses.</para>
+
+ <section>
+ <title>Recommendations</title>
+
+ <para>The following are some good practices when using <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes.</para>
+
+ <section>
+ <title>Dangers of a class level <literal moreinfo="none">use-in-string and use-in-equals</literal> meta
+ attributes when having bi-directional associations</title>
+
+ <para>If we have two entities with a bi-directional association between them and define at
+ class scope level the meta attributes: <emphasis>
+ <property moreinfo="none">use-in-string</property>, </emphasis>
+ <emphasis>
+ <property moreinfo="none">use-in-equals</property>: </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernate-mapping>
+ <class name="Person">
+ <meta attribute="use-in-tostring">true</meta>
+ <meta attribute="use-in-equals">true</meta>
+ ...
+ </class>
+</hibernate-mapping>]]></programlisting>
+
+ <para>And for <emphasis>
+ <property moreinfo="none">Event.hbm</property>
+ </emphasis> file:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernate-mapping>
+ <class name="events.Event" table="EVENTS">
+ <meta attribute="use-in-tostring">true</meta>
+ <meta attribute="use-in-equals">true</meta>
+ <id name="id" column="EVENT_ID">
+ <generator class="native"/>
+ </id>
+ <property name="date" type="timestamp" column="EVENT_DATE"/>
+ <property name="title"/>
+ <set name="participants" table="PERSON_EVENT" inverse="true">
+ <key column="EVENT_ID"/>
+ <many-to-many column="PERSON_ID" class="events.Person"/>
+ </set>
+ </class>
+</hibernate-mapping>]]></programlisting>
+
+ <para>Then <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> will assume you want to include all properties and collections in the
+ <property moreinfo="none">toString()/equals()</property> methods and this can result in infinite
+ recursive calls.</para>
+
+ <para>To remedy this you have to decide which side of the association will include the other
+ part (if at all) in the <property moreinfo="none">toString()/equals()</property> methods. Therefore it is
+ not a good practice to put at class scope such <emphasis>
+ <property moreinfo="none">meta</property>
+ </emphasis> attributes, unless you are defining a class without bi-directional
+ associations.</para>
+
+ <para>We recomend instead to add the <emphasis>
+ <property moreinfo="none">meta</property>
+ </emphasis> attributes at the property level:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernate-mapping>
+ <class name="events.Event" table="EVENTS">
+ <id name="id" column="EVENT_ID">
+ <meta attribute="use-in-tostring">true</meta>
+ <generator class="native"/>
+ </id>
+ <property name="date" type="timestamp" column="EVENT_DATE"/>
+ <property name="title">
+ <meta attribute="use-in-tostring">true</meta>
+ <meta attribute="use-in-equals">true</meta>
+ </property>
+ <set name="participants" table="PERSON_EVENT" inverse="true">
+ <key column="EVENT_ID"/>
+ <many-to-many column="PERSON_ID" class="events.Person"/>
+ </set>
+ </class>
+</hibernate-mapping>]]></programlisting>
+
+ <para>and now for <property moreinfo="none">Person</property>:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernate-mapping>
+ <class name="Person">
+ <meta attribute="class-description">
+ Javadoc for the Person class
+ @author Frodo
+ </meta>
+ <meta attribute="implements">IAuditable</meta>
+ <id name="id" type="long">
+ <meta attribute="scope-set">protected</meta>
+ <meta attribute="use-in-tostring">true</meta>
+ <generator class="increment"/>
+ </id>
+ <property name="name" type="string">
+ <meta attribute="field-description">The name of the person</meta>
+ <meta attribute="use-in-tostring">true</meta>
+ </property>
+ </class>
+</hibernate-mapping>]]></programlisting>
+ </section>
+
+ <section>
+ <title>Be aware of putting at class scope level <literal moreinfo="none"><meta></literal>
+ attribute <literal moreinfo="none">use-in-equals</literal></title>
+
+ <para>For <property moreinfo="none">equal()/hashCode()</property> method generation, you have to take into
+ account that the attributes that participate on such method definition, should take into
+ account only attributes with business meaning (the name, social security number, etc, but
+ no generated id's, for example).</para>
+
+ <para>This is important because Java's hashbased collections, such as
+ <property moreinfo="none">java.util.Set</property> relies on <property moreinfo="none">equals()</property> and
+ <property moreinfo="none">hashcode()</property> to be correct and not change for objects in the set;
+ this can be a problem if the id gets assigned for an object after you inserted it into a
+ set.</para>
+
+ <para>Therefore automatically configuration of the generation of
+ <property moreinfo="none">equals()/hashCode()</property> methods specifying at class scope level the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attribute <emphasis>
+ <property moreinfo="none">use-in-equals</property>
+ </emphasis> could be a dangerous decision that could produce non expected
+ side-effect.</para>
+
+ <para><ulink url="http://www.hibernate.org/109.html">Here</ulink> you can get more in-depth
+ explanation on the subject of <property moreinfo="none">equals()</property> and
+ <property moreinfo="none">hashcode()</property>.</para>
+ </section>
+ </section>
+
+ <section>
+ <title>Advanced <meta> attribute examples</title>
+
+ <para>This section shows an example for using meta attributes (including userspecific
+ attributes) together with the code generation features in <property moreinfo="none">Hibernate
+ Tools</property>.</para>
+
+ <para>The usecase being implemented is to automatically insert some pre- and post-conditions
+ into the getter and setters of the generated POJO. </para>
+
+ <section>
+ <title>Generate pre/post-conditions for methods</title>
+
+ <para>With a <emphasis> <meta attribute="class-code"></emphasis>, you can add
+ additional methods on a given class, nevertheless such <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attribute can not be used at a property scope level and <property moreinfo="none">Hibernate
+ Tools</property> does not provide such <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes.</para>
+
+ <para>A possible solution for this is to modify the freemarker templates responsible for
+ generating the POJO's. If you look inside <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>, </emphasis> you can find the template: <emphasis>
+ <property moreinfo="none">pojo/PojoPropertyAccessor.ftl</property>
+ </emphasis></para>
+
+ <para>This file is as the name indicates used to generate property accessors for
+ pojo's.</para>
+
+ <para>Extract the <emphasis>
+ <property moreinfo="none">PojoPropertyAccessor.ftl</property>
+ </emphasis> into a local folder i.e. <emphasis>
+ <property moreinfo="none">${hbm.template.path}</property>, </emphasis> respecting the whole path, for
+ example: <emphasis>
+ <property moreinfo="none">${hbm.template.path}/pojo/PojoPropertyAccessor.ftl</property>
+ </emphasis></para>
+
+ <para>The contents of the file is something like this:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<#foreach property in pojo.getAllPropertiesIterator()>
+ ${pojo.getPropertyGetModifiers(property)}
+ ${pojo.getJavaTypeName(property, jdk5)}
+ ${pojo.getGetterSignature(property)}() {
+ return this.${property.name};
+ }
+
+ ${pojo.getPropertySetModifiers(property)} void set${pojo.getPropertyName(property)}
+ (${pojo.getJavaTypeName(property, jdk5)} ${property.name})
+ {
+ this.${property.name} = ${property.name};
+ }
+</#foreach>]]></programlisting>
+
+ <para>We can add conditionally pre/post-conditions on our <literal moreinfo="none">set</literal> method
+ generation just adding a little Freemarker syntax to the above source code:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<#foreach property in pojo.getAllPropertiesIterator()>
+ ${pojo.getPropertyGetModifiers(property)}
+ ${pojo.getJavaTypeName(property, jdk5)}
+ ${pojo.getGetterSignature(property)}()
+ {
+ return this.${property.name};
+ }
+
+ ${pojo.getPropertySetModifiers(property)} void set${pojo.getPropertyName(property)}
+ (${pojo.getJavaTypeName(property, jdk5)} ${property.name})
+ {
+ <#if pojo.hasMetaAttribute(property, "pre-cond")>
+ ${c2j.getMetaAsString(property, "pre-cond","\n")}
+ </#if>
+ this.${property.name} = ${property.name};
+ <#if pojo.hasMetaAttribute(property, "post-cond")>
+ ${c2j.getMetaAsString(property, "post-cond","\n")}
+ </#if>
+}
+</#foreach>]]>
+</programlisting>
+
+ <para>Now if in any <emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis> file we define the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes: <literal moreinfo="none">pre-cond</literal> or <literal moreinfo="none">post-cond</literal>, their
+ contents will be generated into the body of the relevant <literal moreinfo="none">set</literal>
+ method.</para>
+
+ <para>As an example let us add a pre-condition for property <literal moreinfo="none">name</literal>
+ preventing no <property moreinfo="none">Person</property> can have an empty name. Hence we have to modify
+ the <emphasis>
+ <property moreinfo="none">Person.hbm.xml</property>
+ </emphasis> file like this:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[<hibernate-mapping>
+ <class name="Person">
+ <id name="id" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="firstName" type="string">
+ <meta attribute="pre-cond">
+ if ((firstName != null) && (firstName.length() == 0) ) {
+ throw new IllegalArgumentException("firstName can not be an empty String");
+ }
+ </meta>
+ </property>
+</class>
+</hibernate-mapping>]]></programlisting>
+
+ <note>
+ <title>Note:</title>
+ <para>I) To escape the & symbol we put &amp;. You can use
+ <![CDATA[]]> instead.</para>
+ <para>II) Note that we are referring to "firstName" directly and this is the parameter
+ name not the actual field name. If you want to refer the field you have to use
+ "this.firstName" instead. </para>
+ </note>
+
+ <para>Finally we have to generate the <emphasis>
+ <property moreinfo="none">Person.java</property>
+ </emphasis> class, for this we can use both Eclipse and Ant as long as you remember to set
+ or fill in the templatepath setting. For Ant we configure <emphasis>
+ <property moreinfo="none"><hibernatetool></property>
+ </emphasis> task via <literal moreinfo="none">the templatepath</literal> attribute as in:</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[
+ <target name="hbm2java">
+ <taskdef name="hibernatetool"
+ classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="lib.classpath"/>
+ <hibernatetool destdir="${hbm2java.dest.dir}"
+ templatepath="${hbm.template.path}">
+ <classpath>
+ <path refid="pojo.classpath"/>
+ </classpath>
+ <configuration>
+ <fileset dir="${hbm2java.src.dir}">
+ <include name="**/*.hbm.xml"/>
+ </fileset>
+ </configuration>
+ <hbm2java/>
+ </hibernatetool>
+ </target>]]></programlisting>
+
+ <para>Invoking the target <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> will generate on the <emphasis>
+ <property moreinfo="none">${hbm2java.dest.dir}</property>
+ </emphasis> the file <emphasis>
+ <property moreinfo="none">Person.java</property>
+ </emphasis>:</para>
+
+ <programlisting format="linespecific" role="JAVA"><![CDATA[// default package
+import java.io.Serializable;
+public class Person implements Serializable {
+
+ public Long id;
+
+ public String name;
+
+ public Person(java.lang.String name) {
+ this.name = name;
+ }
+
+ public Person() {
+ }
+
+ public java.lang.Long getId() {
+ return this.id;
+ }
+
+ public void setId(java.lang.Long id) {
+ this.id = id;
+ }
+
+ public java.lang.String getName() {
+ return this.name;
+ }
+
+ public void setName(java.lang.String name) {
+ if ((name != null) && (name.length() == 0)) {
+ throw new IllegalArgumentException("name can not be an empty String");
+ }
+ this.name = name;
+ }
+ }]]></programlisting>
+
+ <para>In conclusion, this document is intended to introduce you to Hibernate plugin specific
+ features related to tools bath for the Eclipse and Ant tasks.</para>
+
+ <para>In the <link linkend="plugins">Eclipse Plugins</link> chapter you've learnt
+ about a set of wizards for creating Mapping files, Configuration file, Console
+ Configuration, got familiar with Mapping and Configuration files editors, tooling for
+ organizing and controlling Reverse Engineering, Hibernate Console and Mapping diagram as
+ well.</para>
+
+ <para>The rest chapters have shown the aspects of using the <property moreinfo="none">Hibernate
+ Tools</property> via Ant tasks.</para>
+
+ <para>Please, visit <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
+ Tools Users Forum</ulink> to leave questions or/and suggestions on the topic. Your
+ feedback is always appreciated.</para>
+ </section>
+ </section>
+
+ </section>
+
+</chapter>
+
+
+
+ </book>
15 years, 11 months
JBoss Tools SVN: r13337 - branches/jbosstools-3.0.0.CR2/esb/docs/esb_ref_guide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 12:33:33 -0500 (Thu, 29 Jan 2009)
New Revision: 13337
Added:
branches/jbosstools-3.0.0.CR2/esb/docs/esb_ref_guide/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571- adding the master_output.xml;
Added: branches/jbosstools-3.0.0.CR2/esb/docs/esb_ref_guide/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.CR2/esb/docs/esb_ref_guide/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.CR2/esb/docs/esb_ref_guide/en/master_output.xml 2009-01-29 17:33:33 UTC (rev 13337)
@@ -0,0 +1,819 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY esb_support SYSTEM "modules/esb_support.xml">
+<!ENTITY esb_editor SYSTEM "modules/esb_editor.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>ESB Tools Reference Guide</title>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+ <author><firstname>Tatyana</firstname><surname>Romanovich</surname></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 1.1.0.CR1
+ </diffmk:wrapper></releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/esb_ref_guide/pdf/ES...">PDF version</ulink>
+ </para>
+</abstract>
+
+</bookinfo>
+ <toc></toc>
+
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>ESB</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <section>
+
+ <title>What is ESB?</title>
+
+ <para>ESB (Enterprise Service Bus) - an abstraction layer on top of implementation of an
+ enterprise messaging system that provides the features Service Oriented
+ Architectures may be implemented with.</para>
+ <para><diffmk:wrapper diffmk:change="changed">If you want to develop applications using ESB technology JBoss ESB also meets your
+ needs. The JBoss Tools provide an ESB editor and all necessary wizards for creating an ESB
+ file.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">In this guide we provide you with the information on JBoss ESB support (installation, configuration and deployment) and usage of ESB Editor which allows you to
+ develop an ESB file much faster and with far fewer errors so sparing your time.</diffmk:wrapper></para>
+
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>You can find a set of benefits and other extra information on:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/jbossesb">JBoss ESB</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://wiki.jboss.org/wiki/JBossESB">JBoss Wiki</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/jbossesb/docs/index.html">JBoss ESB
+ Documentation Library</ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The latest <property moreinfo="none">JBoss Tools/JBoss Developer Studio</property> documentation
+ builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+ </section>
+</chapter>
+
+
+<chapter id="esb_support" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml">
+ <?dbhtml filename="esb_support.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>ESB</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>ESB Support</title>
+
+ <para>In this section we will focus on all concepts that <property moreinfo="none">JBoss Tools</property>
+ integrate for working with JBoss ESB.</para>
+
+ <section>
+ <title>ESB Tools Installation</title>
+
+ <para>This chapter will provide you with the information on how to install
+ JBoss ESB plugin into Eclipse.</para>
+
+ <para>ESB Tools come as one module of JBoss Tools project. Since ESB Tools have a
+ dependence on other JBoss Tools modules we recommend you to install a bundle
+ of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss
+ Tools plug-ins</ulink>. You can find all necessary installation instructions on JBoss Wiki in the <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
+ </section>
+
+ <section>
+ <title>Creating a ESB Project</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating a new
+ ESB project. Let's try to create a new JBoss ESB project.</para>
+
+ <para>We will show you how to use the ESB Project Creation wizard for creating a new ESB project and setting basic ESB classpath.</para>
+
+ <para>Select <emphasis>
+ <property moreinfo="none">File >New > Project...</property>
+ </emphasis> in the main menu bar or context menu for selected project and
+ then <emphasis>
+ <property moreinfo="none">ESB > ESB Project</property>
+ </emphasis> in the dialog opened:</para>
+
+ <figure float="0">
+ <title>Select a Wizard dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/01_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the JBoss ESB Project wizard page where a project name, ESB version and target JBoss Runtime are to be specified. Specify, for example, <emphasis>
+ <property moreinfo="none">helloworld</property>
+ </emphasis> as a Project name and accept the default ESB version.</para>
+ <figure float="0">
+ <title>JBoss ESB Project wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/02_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the ESB facet installation page where you can
+ specify Java Source Directory and ESB Content Directory. ESB Content Directory is a folder that contains the most of
+ artifacts that an ESB archive needs. You also can configure ESB libraries to the project by selecting a ESB runtime using one of the options:,
+ </para>
+ <para>1. Use <emphasis>
+ <property moreinfo="none">Server Supplied ESB Runtime</property>
+ </emphasis>
+
+ </para>
+ <para> 2. Select a ESB runtime from the JBoss ESB runtime list predefined in the preferences
+ </para>
+ <para>If you choose the first option, make sure that the project has the Target JBoss Runtime set and this runtime has a ESB runtime installed.
+ </para>
+ <figure float="0">
+ <title>Install ESB facet step</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/03_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> and a ESB project with the default <emphasis><property moreinfo="none">jboss-esb.xml</property></emphasis>
+ will be created. </para>
+
+ <figure float="0">
+ <title>The generated ESB project structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/04_create_esb_project.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="ESB_project_wizard" xreflabel="here">
+ <title>Creating ESB Project using JBoss Tools Project Examples Wizard</title>
+ <para>JBoss Tools provides a Project Example wizard that is an easy way for users to create some kinds of projects to be used as examples with some predefined structure. Let's start
+ creating a ESB project using this wizard.</para>
+
+ <para>Before creating a ESB project example create JBoss Runtime with name <emphasis><property moreinfo="none">
+ JBoss 4.2 Runtime</property></emphasis>, it will be used by your ESB project example. </para>
+
+ <para>Select <emphasis>
+ <property moreinfo="none">File >New > Others </property>
+ </emphasis> , in the main menu bar or context menu for selected project and
+ then <emphasis>
+ <property moreinfo="none">JBoss Tools > Project Examples</property>
+ </emphasis> in the New dialog:</para>
+
+ <figure float="0">
+ <title>Select a wizard - Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/05_esb_project_example.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the wizard page where you can select a ESB project example from the example list.
+ Every ESB example has two projects, one is a ESB project and another is a Java project used to test the ESB project.</para>
+ <figure float="0">
+ <title>JBoss Tools ESB Project Examples</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/06_esb_project_example.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select <emphasis><property moreinfo="none">JBoss ESB HelloWorld Example</property> </emphasis> ESB and Client project, and then click
+ <emphasis><property moreinfo="none">Finish</property></emphasis>, then you will get two projects created. </para>
+ <figure float="0">
+ <title>JBoss ESB Project Examples: helloworld and helloworld_testclient</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/07_esb_project_example.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Deploy the HelloWorld ESB project and run a test class in the client Java project to see the test result in the Console view.</para>
+ </section>
+
+ <section>
+ <title>Deploying a ESB Project</title>
+ <para>In this chapter youwill see how to deploy a ESB project using the WTP deployment framework.</para>
+
+ <para>Before deploying the project, open the JBoss Server View by selecting <emphasis><property moreinfo="none">Window > Show View > Other >
+ Server > JBoss Server View</property></emphasis>,
+ create a JBoss Server in the Server view and start it, and then right click the created JBoss server,
+ select <emphasis><property moreinfo="none"> </property> Add and Remove Projects</emphasis>,
+ and add the ESB projects you want to deploy from the left side to the right side in the opened dialog. </para>
+
+ <figure float="0">
+ <title>Add and Remove Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/08_esb_project_deploy.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click <emphasis><property moreinfo="none">Finish</property> </emphasis> to add the project to the server.
+ You also can drag the ESB project from the Project View to the server.</para>
+
+ <figure float="0">
+ <title>JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/09_esb_runtime_new.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus, you have just added the ESB project to the JBoss server module list. Right click the JBoss Server and select <emphasis><property moreinfo="none">Publish</property></emphasis> to publish the project on the server.
+ You can check the deploying result in the Console view.</para>
+
+ </section>
+
+ <section>
+ <title>Creating a ESB File</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating your own
+ simple file. Let's try to organize a new ESB file.</para>
+
+ <para>We will show you how to use the Creation wizard for creating a new ESB file.</para>
+
+ <para>At first you should open any project. Select <emphasis>
+ <property moreinfo="none">File >New > Other...</property>
+ </emphasis> in the main menu bar or context menu for selected project and
+ then <emphasis>
+ <property moreinfo="none">ESB > ESB File</property>
+ </emphasis> in the New dialog:</para>
+
+ <figure float="0">
+ <title>Select a wizard - ESB File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_support/01_create_esb.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings you to the wizard page where a folder, a name and a version for the file should be specified. Choose, for example, <emphasis>
+ <property moreinfo="none">jboss-esb.xml</property>
+ </emphasis> as the name and accept the selected projects folder and the default
+ version.</para>
+ <figure float="0">
+ <title>Folder, Name and Version for ESB file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_support/02_create_esb.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus, your file will be created in the selected projects folder by default. If
+ you want to change the folder for your future file click <emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to set needed folder or simply type it.</para>
+
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> results in the file being generated. The wizard creates one xml
+ file.</para>
+
+ </section>
+
+ <section role="updated">
+ <title>Configuring ESB Runtime in Preferences</title>
+ <para>In this chapter you will know how to predefine a JBoss ESB runtime on the Preferences page.</para>
+
+ <para>You may already know, there are two ways to set JBoss ESB runtime when creating a ESB project,
+ one is to use the project target JBoss runtime, and another is to select a JBoss ESB runtime predefined in JBoss Tools preferences.
+ Let's configure it.</para>
+
+ <para>Select <emphasis>
+ <property moreinfo="none">Window >Preferences > JBoss Tools > JBoss ESB Runtime</property>
+ </emphasis>, to open the JBoss ESB Runtime Preferences page where you can add, remove and Edit a JBoss ESB runtime.</para>
+
+ <figure float="0">
+ <title>JBoss ESB Runtimes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/10_esb_runtime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Select <emphasis><property moreinfo="none">Add</property></emphasis> to open a dialog where you can specify the JBoss ESB runtime location, name and version number.
+ You also can customize the libraries of the runtime by checking the <emphasis><property moreinfo="none">Customize JBoss ESB Runtime jars</property> </emphasis> checkbox. </para>
+
+ <figure float="0">
+ <title>Configure new JBoss ESB Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/11_esb_runtime_new.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The new JBoss ESB Runtime will be configured. Click <emphasis> <property moreinfo="none">OK</property> </emphasis> to finish and save the preferences.
+ You can use the configuration when creating a JBoss ESB project. </para>
+ <para>When a ESB runtime is configured for your ESB project you are able to change it to any other using the classpath container page for ESB runtime. To do that, turn to the Package Explorer view and right-click the "JBoss ESB Runtime" library. Select <emphasis><property moreinfo="none">Properties</property></emphasis> and a table listing all available JBoss ESB runtimes will appear:</para>
+
+ <figure float="0">
+ <title>Classpath Container Page to change ESB runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/20_classpath_container.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <para>Choose one of them to set to the ESB project and click <emphasis><property moreinfo="none">Ok</property></emphasis>.</para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">ESB container allows Source and JavaDoc locations to be set via the Properties dialog on each contained .jar: right-click on any .jar file, select </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Properties</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">. Choose </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Java Source Attachment</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and select location (folder, JAR or zip) containing new source for the chosen .jar using one of the suggested options (workspace, external folder or file) or enter the path manually:</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Classpath Container: Java Source Attachment</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/esb_project/21_source.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click on </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Apply</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and then on </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Ok</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To change Javadoc Location choose </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Javadoc Location</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">package-list</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">:</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Classpath Container: Javadoc Location</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/esb_project/22_Javadoc.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click on </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Apply</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and then on </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Ok</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ </section>
+
+
+ <section id="using_SOA">
+ <title>Using and Configuring SOA Platform</title>
+
+ <para>In this chapter you will know what is JBoss Enterprise SOA Platform and how you can configure it to use for your ESB projects. </para>
+
+ <para>JBoss Enterprise SOA Platform delivers a flexible, standards-based platform to integrate applications, SOA services, business events and automate business processes. The SOA Platform integrates specific versions of JBoss ESB, jBPM, Drools and the JBoss Enterprise Application Platform that are certified to work together in a single supported enterprise distribution.</para>
+ <para>Having configured JBoss Enterprise SOA Platform for your ESB project you don't need to install and configure ESB server and runtime as they are already included.</para>
+
+ <para>Check here to find more details on the platform: <ulink url="http://www.jboss.com/products/platforms/soa">JBoss Enterprise SOA Platform</ulink> and <ulink url="http://www.jboss.com/products/platforms/soa/components">JBoss Enterprise SOA Platform Component Details</ulink>.</para>
+ <para>You can find out what is SOA here: <ulink url="http://www.jboss.org/jbossesb/resources/SOABasics.html">Basics of SOA</ulink> and <ulink url="http://www.jboss.org/jbossesb/resources/SOAEOA.html">SOA and EOA</ulink>.</para>
+
+ <para>To configure the JBoss Enterprise SOA platform select <emphasis>
+ <property moreinfo="none">Window > Preferences > Server > Runtime Enironments</property></emphasis>, that will open the Server Runtime Environments Preferences page where you can add, remove and edit a Server Runtime Environment.</para>
+
+ <figure float="0">
+ <title>Configure new Server Runtime Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/13NewServerRuntimeEnv.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select <emphasis><property moreinfo="none">Add</property></emphasis>, choose <emphasis><property moreinfo="none">JBoss 4.2 Runtime</property></emphasis> as a type of runtime environment, check the <emphasis><property moreinfo="none">Create a new local server</property></emphasis> checkbox and click <emphasis><property moreinfo="none">Next</property></emphasis>:</para>
+ <figure float="0">
+ <title>Type of Server Runtime Environment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/14typeOfRuntime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next step you can specify a name of the server runtime environement and browse to its location. Click <emphasis><property moreinfo="none">Finish</property></emphasis> to add the server runtime environment.</para>
+
+
+ <figure float="0">
+ <title>New Server Runtime Environment Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/15AddNew.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now you have your SOA platform configured. To check the configuration create a ESB Project using instructions described <xref linkend="ESB_project_wizard"></xref>. As a result you will have two projects created:</para>
+
+ <figure float="0">
+ <title>Helloworld Projects Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/16HelloworldProjects.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then you will need to add JBoss ESB libraries to your projects to configure the SOA server runtime exactly for your projects. Right-click on your project, select <emphasis><property moreinfo="none">Build Path > Add Libraries</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>Add Libraries</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/17_Add_new_libraries.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Choose <emphasis><property moreinfo="none">JBoss ESB Libraries</property></emphasis> and click <emphasis><property moreinfo="none">Next</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>ESB Libraries</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/18_select_libraries.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select the necessary runtime to add to the project classpath:</para>
+
+
+ <figure float="0">
+ <title>Select a ESB runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_project/19_select_runtime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis><property moreinfo="none">Finish</property></emphasis>.</para>
+ <para>Now you can deploy your Helloworld project to the server and run a test class in the client Java project to see the test result in the Console view.</para>
+
+
+
+</section>
+
+
+
+
+
+
+
+
+
+
+</chapter>
+
+
+<chapter id="esb_editor" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml" xreflabel="esb_editor">
+ <?dbhtml filename="esbEditor.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss ESB</keyword>
+ <keyword>Editor</keyword>
+ <keyword>ESB</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>ESB Editor</title>
+
+ <para> ESB editor has lots of useful features, they are described in details in this chapter. In
+ addition you'll get to know with how <property moreinfo="none">ESB Editor</property> uses combined
+ visual and source editing of esb files.</para>
+
+ <section id="esb_file" role="updated">
+
+ <title>ESB File Editor</title>
+ <para><property moreinfo="none">ESB File Editor</property> is a powerful and customizable tool. ESB File
+ Editor allows developing an application using ESB technology.</para>
+
+ <para>ESB file editor has two tabs: Tree and Source.</para>
+
+ <para>You can switch to Tree. The Tree view for the editor displays all ESB artifacts in a
+ tree format. By selecting any node you can see and edit its properties which will appear
+ in the right-hand area. For example, a Provider:</para>
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/01_esb_tree_view.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can easily switch from Tree to Source by selecting the Source tab at the bottom of
+ the editor and work in <property moreinfo="none">Source view</property>.</para>
+
+ <figure float="0" id="sourceView">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/02_esb_source_view.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The Source view for the editor displays a text content of the ESB file. It is always
+ synchronized with <property moreinfo="none">Tree view</property>, so any changes made in one of the
+ views will immediately appear in the other.</para>
+
+ <para>No matter what view you select, you get full integration with <property moreinfo="none">Outline
+ view</property>. For example, you can work in the Source view with the help of the
+ Outline view. The Outline view shows a tree structure of the ESB file. Simply select any
+ element in the <property moreinfo="none">Outline view</property> and it will jump to the same place in
+ the Source editor, so you can navigate through the source code with Outline view.</para>
+ <figure float="0">
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/03_esb_outline_view.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Adding, editing or deleting of some artifacts operations are available right in the
+ <property moreinfo="none">Tree view</property> . Right-click any node and select one of the
+ available actions in the context menu. For example, you can easily add a new Provider:</para>
+ <para></para>
+ <figure float="0">
+ <title>Adding New Provider</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/04_esb_add_provider.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can easily add a new Service too:</para>
+ <figure float="0">
+ <title>Adding New Service</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/05_esb_add_service.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The same way you can create a listener for service and other elements of ESB:</para>
+ <figure float="0">
+ <title>Adding New Listener for Service</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/06_esb_add_listener.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The same actions can be done in the right part of <property moreinfo="none">Tree view</property> tab
+ (Form editor) using <property moreinfo="none">Add</property>, <property moreinfo="none">Edit</property> and
+ <property moreinfo="none">Remove</property> buttons.</para>
+
+
+ <para>In order to add a new generic Action to your ESB XML file you should select the
+ Actions node under the Services, then right-click and choose <emphasis>
+ <property moreinfo="none">New > Generic Action</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>Adding New Action in the Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/11_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Or instead make use of <emphasis>
+ <property moreinfo="none">Add...</property>
+ </emphasis> button in the <property moreinfo="none">Form editor</property> on the left.</para>
+ <figure float="0">
+ <title>Adding New Action in the Form Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/12_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see on the bath figures above, the context menu will also prompt you to
+ insert one of the Actions that are supplied out-of-the-box with <property moreinfo="none">JBoss
+ ESB</property>. After choosing one an appeared <property moreinfo="none">New Action wizard</property>
+ will ask you to fill out a name field and other fields specific for each Action
+ property. For example, for <emphasis>
+ <property moreinfo="none">Content Based Router</property>
+ </emphasis> Action the wizard looks as follows:</para>
+
+ <figure float="0">
+ <title>New Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/13_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After confirming creating the Action you can see it in the Tree under the <emphasis>
+ <property moreinfo="none">Actions</property>
+ </emphasis> node and preview as well as edit its settings in the <property moreinfo="none">Form
+ editor</property> on the left.</para>
+
+ <figure float="0">
+ <title>Form Editor for Content Based Router</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/14_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><property moreinfo="none">ESB editor</property> can recognize some specific objects. On the figure you
+ can see <emphasis>org.jboss.soa.esb.actions.ContentBasedRouter</emphasis> in the <emphasis>
+ <property moreinfo="none">Class</property>
+ </emphasis> section.</para>
+
+ </section>
+
+ <section id="esb_editors_features">
+
+ <title>ESB Editors Features</title>
+ <para><diffmk:wrapper diffmk:change="added">JBoss ESB tooling has powerful editor features that help you easily make use of
+ content and code assist.</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">This last chapter covers capabilities on how you can use ESB editor.</diffmk:wrapper></para>
+
+ <section id="ESBsyntaxvalidation84">
+
+ <title>ESB syntax validation</title>
+ <para>When working in <property moreinfo="none">JBoss ESB editor</property> you are constantly provided
+ with feedback and contextual error checking as you type. In the Source viewer, if at
+ any point a tag is incorrect or incomplete, an error will be indicated next to the
+ line and also in the <property moreinfo="none">Problems view</property> below.</para>
+ </section>
+
+ <section id="ESBSupportXMLSchema">
+ <title>Support for XML Schema</title>
+
+ <para>JBoss ESB Framework fully <link linkend="sourceView">supports XML files based on
+ schemas as well as DTDs</link>.</para>
+ </section>
+
+ <!--<section id="OpenOnSelection">
+
+ <title>OpenOn</title>
+
+ <para><property>OpenOn</property> let's you easily navigate through your
+ project without using the Package Explorer view (project tree). With OpenOn, you can
+ simply click on a reference to another file and that file will be opened.</para>
+
+ <para>OpenOn is available for the XML files </para>
+
+ <para>Press and hold down the Ctrl key. As you move the mouse cursor over different
+ file references in the file, they display an underline. When you have the mouse
+ cursor over the name of the file you want to open, click and the file will open
+ in its own editor. In this example the managed bean NameBean will open.</para>
+
+ </section>
+ -->
+
+ <section id="ESBContentAssist">
+
+ <title>Content Assist for ESB XML file</title>
+
+ <para>When you work with any ESB XML file <property moreinfo="none">Content Assist</property> is
+ available to help you. It provides pop-up tip to help you complete your code
+ statements. It allows you to write your code faster and with more accuracy. Content
+ assist is always available in the Source mode. Simply type <emphasis>
+ <property moreinfo="none">Ctrl-Space</property>
+ </emphasis> to see what is available.</para>
+
+ <para>Content Assist for ESB XML file:</para>
+ <figure float="0">
+ <title>Content Assist for ESB XML file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/08_esb_features.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Content Assist for attributes:</para>
+ <figure float="0">
+ <title>Content Assist for attributes:</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/09_esb_features.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <!-- </section>
+
+ <section id="ContentAssistWithinTreeEditor">
+
+ <title>Content Assist within Tree ESB Editor</title>
+
+ <para>JBoss Developer Studio also provides Content Assist when working within the Tree ESB editor.
+ Just click <emphasis><property>Ctrl-Space</property>.</emphasis></para>
+ <figure>
+ <title>Content Assist in Tree ESB Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/esb_file/09_editors_features.png" scale="85"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section> -->
+ </section>
+
+ <section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing">
+
+ <title>Synchronized Source and Visual Editing</title>
+
+ <para>ESB file can be edited in either source or extra visual modes at the same time.</para>
+
+ <para>JBoss Tools provide you two different editors to speed your development: a
+ graphical view (<property moreinfo="none">Tree</property>) and source (<property moreinfo="none">Source</property>).
+ At the same time, you always have full control over esb source file. Any changes you
+ make in the source view will immediately appear in the tree view. Both views are
+ synchronized, you can edit the file in any view.</para>
+
+ <figure float="0">
+ <title>Two Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/10_esb_features.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In summary, this reference supplies you with all necessary information on the
+ functionality that JBoss ESB Editor provides for work with JBoss ESB.</para>
+ </section>
+ </section>
+</chapter>
+
+
+</book>
15 years, 11 months
JBoss Tools SVN: r13336 - trunk/ws/docs/reference/en/images.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-01-29 12:33:26 -0500 (Thu, 29 Jan 2009)
New Revision: 13336
Added:
trunk/ws/docs/reference/en/images/jbossws_ws_creation1_1.png
Log:
Added: trunk/ws/docs/reference/en/images/jbossws_ws_creation1_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/ws/docs/reference/en/images/jbossws_ws_creation1_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months
JBoss Tools SVN: r13335 - trunk/ws/docs/reference/en/images.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-01-29 12:33:06 -0500 (Thu, 29 Jan 2009)
New Revision: 13335
Removed:
trunk/ws/docs/reference/en/images/jbossws_ws_creation1_1.png
Log:
Deleted: trunk/ws/docs/reference/en/images/jbossws_ws_creation1_1.png
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Tools SVN: r13334 - branches/jbosstools-3.0.0.CR2/documentation/guides/GettingStartedGuide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 12:32:59 -0500 (Thu, 29 Jan 2009)
New Revision: 13334
Added:
branches/jbosstools-3.0.0.CR2/documentation/guides/GettingStartedGuide/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571- adding the master_output.xml;
Added: branches/jbosstools-3.0.0.CR2/documentation/guides/GettingStartedGuide/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.CR2/documentation/guides/GettingStartedGuide/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.CR2/documentation/guides/GettingStartedGuide/en/master_output.xml 2009-01-29 17:32:59 UTC (rev 13334)
@@ -0,0 +1,4031 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+[
+<!ENTITY getting_started SYSTEM "modules/getting_started.xml">
+<!ENTITY manage SYSTEM "modules/manage.xml">
+<!ENTITY first_seam SYSTEM "modules/first_seam.xml">
+<!ENTITY jsp_application SYSTEM "modules/jsp_application.xml">
+<!ENTITY rad_jsf_application SYSTEM "modules/rad_jsf_application.xml">
+<!ENTITY gsg_faq SYSTEM "modules/gsg_faq.xml">
+<!ENTITY further_reading SYSTEM "modules/further_reading.xml">
+<!ENTITY project_examples SYSTEM "modules/project_examples.xml">
+
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY jbossportallink "../../jboss_portal_tools_ref_guide/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+<!ENTITY wslink "../../ws_ref_guide/html_single/index.html">
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Getting Started with JBoss Developer Studio</title>
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">Version: 2.0.0.CR2</diffmk:wrapper></releaseinfo>
+ <abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/GettingStartedGuide/...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+</bookinfo>
+ <toc></toc>
+
+
+
+
+<chapter id="getting_started" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml" xreflabel="getting_started">
+ <?dbhtml filename="getting_started.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Getting Started with JBoss Developer Studio</title>
+
+ <section id="intro1">
+ <title>What is JBDS?</title>
+ <para><property moreinfo="none">JBoss Developer Studio</property> is a set of eclipse-based development tools that
+ are pre-configured for JBoss Enterprise Middleware Platforms and Red Hat Enterprise Linux.
+ Developers are not required to use <property moreinfo="none">JBoss Developer Studio</property> to develop on
+ JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these pre-configured tools offer
+ significant time-savings and value, making them more productive and speeding time to deployment.</para>
+ <para>This guide covers the first steps to get started working with <property moreinfo="none">JBoss Developer
+ Studio</property>. You will learn how to install and configure necessary software for your OS
+ (currently Linux, Microsoft Windows or Mac OSX).</para>
+ <para>Thus this guide will provide you with detailed info on how to start JDK, JBDS and JBoss
+ Tools.</para>
+ </section>
+
+ <section id="ConfigJavaEnvironment">
+ <?dbhtml filename="ConfigJavaEnvironment.html"?>
+ <title>Configuring Your Java Environment</title>
+ <para>You must have a working installation of JDK 5 before you install <property moreinfo="none">JBoss Developer
+ Studio</property>. Currently it will only fully work with a 32-bit JVM, not a 64-bit JVM. On a
+ 64-bit JVM the visual editor fails to launch because of feature of OS architecture. Thus in this
+ guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft
+ Windows Platform.</para>
+
+ <section id="InstallJDK50onLinux">
+ <title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
+ <para>To install 32-bit Sun JDK 5.0 on Linux and configure it, you should follow the next steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
+ (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK 5.0 Update
+ <x>" (where "x" is the latest update number) for
+ download and then select "Red Hat Package Manager in self-extracting" file
+ for Linux. Read the instructions on Sun's website for installing the JDK.</para>
+ </listitem>
+ <listitem>
+ <para>If you don't want to use SysV service scripts you can install the
+ "self-extracting file" for Linux instead of choosing the "RPM in
+ self-extracting" file. In that case you can skip the next step mentioned here. But it
+ is recommended to use the SysV service scripts for production servers.</para>
+ </listitem>
+ <listitem>
+ <para>Download and install the appropriate -compat RPM from JPackage <ulink url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>.
+ Please ensure you choose a matching version of the -compat package to the JDK you've
+ installed.</para>
+ </listitem>
+ <listitem>
+ <para>Create an environment variable that points to the JDK installation directory and call it
+ JAVA_HOME. Add <emphasis>
+ <property moreinfo="none">$JAVA_HOME/bin</property>
+ </emphasis> to the system path to be able to run java from the command line. You can do this
+ by adding the following lines to the .bashrc file in your home directory.</para>
+ <programlisting format="linespecific"><![CDATA[#In this example /usr/java/jdk1.5.0_11 is the JDK installation directory.
+export JAVA_HOME=/usr/java/jdk1.5.0_11
+export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
+ </listitem>
+ </itemizedlist>
+
+ <note>
+ <title>Note:</title>
+
+ <para>If you have JDK already installed and added in your system path, you should add
+ <emphasis>$JAVA_HOME/bin</emphasis> before the old <emphasis>$PATH</emphasis> (not after it)
+ so that the new version of JDK can be found first, i. e. <emphasis>
+ <emphasis>export PATH=$JAVA_HOME/bin:$PATH</emphasis>
+ </emphasis> This way, the machine will pick up the new JVM first. You only need to run
+ "alternative" as a safe guard for the right JVM. </para>
+ </note>
+
+ <para>Set this variable for your account doing the installation and also for the user account
+ that will run the server.</para>
+ <itemizedlist>
+ <listitem>
+ <para>If you have more than one version of JVM installed on your machine, make sure you are
+ using the JDK 1.5 installation as the default java and javac. You can do this using the
+ alternatives system. The alternatives system allows different versions of Java from different
+ sources to co-exist on your system.</para>
+ </listitem>
+ </itemizedlist>
+ <section id="SelectAlternativesforJava">
+ <title>Select alternatives for java, javac and java_sdk_1.5.0</title>
+ <itemizedlist>
+ <listitem>
+ <para>As a root user, type the following command at the shell prompt and you should see
+ something like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config java
+There are 2 programs that provide 'java'.
+Selection Command
+-----------------------------------------------
+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java
+Enter to keep the current selection[+], or type selection number:]]></programlisting>
+ <para>Make sure the Sun version [jre-1.5.0-sun in this case] is selected (marked with a
+ '+' in the output), or select it by entering its number as prompted.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Repeat the same for javac and java_sdk_1.5.0.</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config javac
+There is 1 program that provides 'javac'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
+Enter to keep the current selection[+], or type selection number:
+
+[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
+There is 1 program that provide 'java_sdk_1.5.0'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun
+Enter to keep the current selection[+], or type selection number:]]></programlisting>
+ <para>You should verify that java, javac and java_sdk_1.5.0 all point to the same manufacturer
+ and version.</para>
+ <note>
+ <title>Note:</title>
+ <para>You can always override this step by setting the JAVA_HOME environment variable as
+ explained in the previous step.</para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para>Make sure that the java executable is in your path and that you are using an appropriate
+ version. To verify your Java environment, type "java -version" at the shell
+ prompt and you should see something like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific"><![CDATA[[root@vsr ~]$ java -version
+java version "1.5.0_11"
+Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
+Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)]]></programlisting>
+ </section>
+
+ </section>
+ <section id="InstallJDK50onWindows">
+ <title>Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft Windows</title>
+
+ <para>To install and configure 32-bit Sun JDK 5.0 on Microsoft Windows, follow these steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
+ (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK 5.0 Update
+ <x>" (where "x" is the latest update number) for
+ download and then select your Windows Platform options to perform the installation.</para>
+ </listitem>
+ <listitem>
+ <para>Create an environment variable called JAVA_HOME that points to the JDK installation
+ directory, for example:
+ <literallayout class="normal" format="linespecific">
+ <emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis>
+ </literallayout></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>In order to run java from the command line, add the <emphasis>jre\bin</emphasis> directory
+ to your path, for example:</para>
+ <para>
+ <emphasis>C:\Program Files\Java\jdk1.5.0_11\jre\bin</emphasis>
+ </para>
+ <para>To do this, open the <emphasis>
+ <property moreinfo="none">Control Panel</property>
+ </emphasis> from the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> menu, switch to Classic View if necessary, open the System Control Panel applet (<emphasis>
+ <property moreinfo="none">System</property>
+ </emphasis>), select the <emphasis>
+ <property moreinfo="none">Advanced</property>
+ </emphasis> Tab, and click on the <emphasis>
+ <property moreinfo="none">Environment Variables</property>
+ </emphasis> button.</para>
+ <para>Now, when 32-bit Sun JDK 5.0 has been successfully installed, we can pass on to the next
+ step.</para>
+ </section>
+
+ </section>
+
+ <section id="InstallingJBDS">
+ <?dbhtml filename="InstallingRHDS.html"?>
+ <title>JBoss Developer Studio Installation</title>
+
+ <para>This chapter will provide you with detailed information on how to install <property moreinfo="none">JBoss
+ Developer Studio</property>.</para>
+
+ <para>JBDS comes with a simple installer, bundled with tested/pre-configured versions of Eclipse,
+ WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>First of all you need the appropriate installation file for your platform from
+ <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat
+ website</ulink>.</para>
+ </listitem>
+ <listitem>
+ <para>Then run in console:</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-2.0.0.Cr2.jar
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">Follow the instructions presented by the installation wizard:</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JBoss Developer Studio Installation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Provide the installation path</para>
+ </listitem>
+ <listitem>
+ <para>Select Java VM</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Select Java VM</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>By selecting <emphasis>
+ <property moreinfo="none">Default Java VM</property>
+ </emphasis> you set default Java VM of your system (to verify your Java environment, type
+ "java -version" in console).</para>
+ </tip>
+
+ <para>Selecting <emphasis>
+ <property moreinfo="none">Specific Java VM</property>
+ </emphasis> you can provide the path to non-default Java VM.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>JBoss Developer Studio needs Java 5 and "gij" isn't available on
+ every platform.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>Installation process includes <ulink url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application
+ Platform</ulink>. Select <emphasis>
+ <property moreinfo="none">Yes</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> to use it in JBoss Developer Studio. This step lets you configure locally available JBoss Application Servers: </diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JBoss Enterprise Application Platform Installing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+<itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can fill the list automatically using the </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Find</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> button: click </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Find</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">, select a folder where search of available JBoss Application Servers should be started and click on </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Ok</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">: </diffmk:wrapper></para> </listitem>
+</itemizedlist>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Finding Servers in the Selected Directory</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/getting_started/getting_started_3_3_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para></para>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added"> All available servers in the selected directory will be added to the list with the following information specified: Name, Type, Version and Location.
+ </diffmk:wrapper></para></listitem>
+ </itemizedlist>
+
+
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="added">List of Servers Added</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/getting_started/getting_started_3_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"></para>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added"> <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can also add servers one by one using the </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Add</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> button:</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Add Server to be Configured</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/getting_started/getting_started_3_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"></para>
+
+<para><diffmk:wrapper diffmk:change="added">Click on </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Browse</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> and select the server location. Fields Name, Type and Version will be filled in automatically:</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Specify Server Location</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/getting_started/getting_started_3_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"></para>
+
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click on </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Ok</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">. The server is added to the list with the details on its type, version and location.</diffmk:wrapper></para>
+
+
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Remove</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> button will the remove the selected server from the list. If necessary, you can edit the server details clicking on the </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Edit</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> button:</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Edit Server</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/getting_started/getting_started_3_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"></para>
+
+
+
+ <!-- <note>
+ <title>Note:</title>
+ <para>The installer installs JBoss Enterprise Application Platform for running your applications
+ if you select this option during the installation process. If you want to use a different server
+ than ours, you can change the setting in JBoss Developer Studio.</para>
+ </note>-->
+
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="added">Click </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Next</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">. Check your installation paths and see the components to install. If you'd like to change
+ something, press the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Previous</property>
+ </emphasis> button. Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to start installation. </para>
+ </listitem>
+ </itemizedlist>
+
+ <para></para>
+
+ <figure float="0">
+ <title>Summary Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="jbds_jbosstools">
+
+ <title>JBoss Developer Studio and JBoss Tools</title>
+
+ <para>This section uncovers the points on the differences between <property moreinfo="none">JBoss Developer
+ Studio</property> and <property moreinfo="none">JBoss Tools</property> and provides the steps on <property moreinfo="none">JBoss
+ Tools</property> installation as well.</para>
+
+ <section id="WhatDifferenceBetweenJBDSAndJBossTools">
+ <title>What is the difference?</title>
+
+ <para><property moreinfo="none">JBoss Tools</property> is what went into our <property moreinfo="none">JBoss Developer
+ Studio</property> which comes as an easy-to-install Eclipse based IDE fully configured and ready
+ to run with the bundled <property moreinfo="none">JBoss Enterprise Application Platform</property>.</para>
+
+ <para>In short <property moreinfo="none">JBoss Tools</property> are just a set of Eclipse plugins and
+ <property moreinfo="none">JBoss Developer Studio</property> adds:</para>
+ <itemizedlist>
+ <listitem>
+ <para>An installer</para>
+ </listitem>
+ <listitem>
+ <para>Eclipse and Web Tools preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>JBoss EAP with JBoss AS and Seam preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>3rd party plugins bundled and configured</para>
+ </listitem>
+ <listitem>
+ <para>Access to RHEL and Red Hat Network</para>
+ </listitem>
+ <listitem>
+ <para>Access to the JBoss/Red Hat supported software</para>
+ </listitem>
+ </itemizedlist>
+ <para> For additional information see <ulink url="http://www.jboss.com/products/devstudio">JBoss.com</ulink></para>
+ </section>
+
+ <section id="JBossToolsInstall">
+ <title>JBoss Tools Installation</title>
+ <para>Here, let's consider the installation of the <property moreinfo="none">JBoss Tools</property>
+ modules.</para>
+ <para><property moreinfo="none">JBoss Tools</property> is an umbrella project for the JBoss developed plugins
+ that will make it into <property moreinfo="none">JBoss Developer Studio</property>. The JBoss Tools modules are:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JBoss AS Tools</para>
+ </listitem>
+ <listitem>
+ <para>Seam Tools</para>
+ </listitem>
+ <listitem>
+ <para>Hibernate Tools</para>
+ </listitem>
+ <listitem>
+ <para>Visual Page Editor</para>
+ </listitem>
+ <listitem>
+ <para>JST Tools</para>
+ </listitem>
+ <listitem>
+ <para>JBPM Tools</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>To install the JBoss Tools plugins for Eclipse, you need the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Get Eclipse and Web Tools</para>
+ </listitem>
+ </itemizedlist>
+ <para>The currant version of JBoss Tools (3.0.0.CR1) targets at Eclipse 3.4/Ganymede and WTP
+ 3.0.</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>We recommend you do not use Eclipse.org update site to go from Eclipse 3.3 to Eclipse 3.4.
+ Instead we suggest that you download the full binary from <ulink url="http://www.eclipse.org/downloads/">here</ulink>.</para>
+ </tip>
+
+ <para>If you can only use Eclipse 3.3 use <ulink url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
+ JBoss Tools 2.x will not have any of the new features.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Remember to choose the download that matches your OS and use Java 5 when you run
+ it.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>Get the <ulink url="http://download.jboss.org/jbosstools/builds/nightly/latestBuild.html">latest JBoss Tools build</ulink></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Some of our newer plugins, like TPTP and BIRT, need additional drivers. On the left side of
+ the download page you can find all of the required drivers for chosen build and their versions.</para>
+ <para>Instead of downloading the nightly build version manually, it's also possible to
+ get the latest release of <property moreinfo="none">JBoss Tools</property> from one of our update sites: <itemizedlist>
+ <listitem>
+ <para>Stable Updates: <ulink url="http://download.jboss.org/jbosstools/updates/stable">http://download.jboss.org/jbosstools/updates/stable</ulink></para>
+ </listitem>
+ <listitem>
+ <para> Development Updates: <ulink url="http://download.jboss.org/jbosstools/updates/development">http://download.jboss.org/jbosstools/updates/development</ulink></para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Finally, install the build</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Unzip the file(s) directly into your Eclipse <emphasis>
+ <property moreinfo="none">plugins/features</property>
+ </emphasis> directory and it will be readily available. It might be necessary to start Eclipse
+ with eclipse -clean to make sure it starts clean and rereads the new list of plugins.</para>
+
+ <para>If you need to install any standalone plug-in from JBoss Tools visit a <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools Wiki</ulink> page to read
+ about dependencies between standalone plug-ins.</para>
+ </section>
+
+ </section>
+
+ <section id="Welcome">
+ <title>Welcome to JBoss Developer Studio</title>
+ <para>In this section we'll show you how to work with the welcome page of the <property moreinfo="none">JBoss
+ Developer Studio</property>.</para>
+ <para>The welcome page is the first page you see when you first launch <property moreinfo="none">JBoss Developer
+ Studio</property>. </para>
+
+ <figure float="0">
+ <title>Welcome to JBoss Developer Studio</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>With the help of its page you will be able:</para>
+ <itemizedlist>
+ <listitem>
+ <para>to get quick access to Getting Started Documentation (guides, tutorials and
+ viewlets)</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Getting Started Documentation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to create new Seam projects, jBPM Process, JSF or Struts projects using JBDS
+ wizards</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Create New...</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to get short description of perspectives that JBDS offers for more productive
+ development</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Perspectives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to visit JBoss Developer Studio web resources.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Web Resources</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_9.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Start work with <property moreinfo="none">JBoss Developer Studio</property> by clicking on <emphasis>
+ <property moreinfo="none">Workbench</property>
+ </emphasis> button or simply close the Welcome page.</para>
+
+ </section>
+
+ <section id="Upgrading">
+ <?dbhtml filename="Upgrading.html"?>
+ <title>Upgrading</title>
+ <para>To upgrade, just uninstall your current version and install the new one.</para>
+ </section>
+
+ <section id="Uninstalling">
+ <?dbhtml filename="Uninstalling.html"?>
+ <title>Uninstalling</title>
+ <itemizedlist>
+ <listitem>
+ <para>Make sure <property moreinfo="none">JBoss Developer Studio</property> is not running</para>
+ </listitem>
+ <listitem>
+ <para>Uninstall your current version of <property moreinfo="none">JBoss Developer Studio</property> by running
+ Uninstaller</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="Support">
+ <?dbhtml filename="Support.html"?>
+ <title>Support</title>
+ <para>If you have comments or questions, you can discuss them at our <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ Developer Studio Forum</ulink>.</para>
+ <para>When writing to the forum for questions, please include the following information:</para>
+ <orderedlist continuation="restarts" inheritnum="ignore">
+ <listitem>
+ <para>JBoss Developer Studio version</para>
+ </listitem>
+ <listitem>
+ <para>Exact error message</para>
+ </listitem>
+ <listitem>
+ <para>Steps to reproduce the issue</para>
+ </listitem>
+ </orderedlist>
+
+ <para><property moreinfo="none">JBDS</property> subscribers can get necessary support on our <ulink url="https://network.jboss.com/jbossnetwork/login.html">Support Portal</ulink>.</para>
+ </section>
+
+
+ <section id="OtherRelevantResourcesOnTheTopic33">
+ <?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
+ <title>Other relevant resources on the topic</title>
+ <para>JBDS on JBoss: <ulink url="http://labs.jboss.com/rhdevstudio/">JBoss Developer
+ Studio</ulink></para>
+ <para>Forum: <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ Forum</ulink></para>
+ <para>Subscription: <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">JBDS
+ Subscription</ulink></para>
+
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="manage" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml" xreflabel="manage">
+ <?dbhtml filename="manage.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Manage JBoss AS from JBoss Developer Studio</title>
+
+ <para>In this chapter we'll focus more on how to operate the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss
+ AS</diffmk:wrapper></property> from <property moreinfo="none">JBoss Developer Studio</property>.</para>
+ <para><property moreinfo="none">JBoss Developer Studio</property> ships with <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss EAP
+ v.4.2</diffmk:wrapper></property> bundled. When you followed the default installation of <property moreinfo="none">JBoss
+ Developer Studio</property>, you should already have a JBoss 4.2 Server installed and
+ defined. To run JBoss AS 4.2 you need JDK 1.5, JDK 6 is not formally supported yet, although
+ you may be able to start the server with it.</para>
+
+ <section id="JBossbundled">
+ <?dbhtml filename="JBossbundled.html"?>
+ <title>How to Manage the JBoss AS Bundled in JBDS</title>
+ <para>This section covers the basics of working with the <property moreinfo="none">JBoss Server</property>
+ supported directly by <property moreinfo="none">JBDS</property> via bundled AS plug-in. To read more
+ about AS plug-in, refer to the <ulink url="../../as/html_single/index.html"><diffmk:wrapper diffmk:change="changed">Server Manager
+ guide</diffmk:wrapper></ulink>.</para>
+
+ <section id="StartingServer">
+ <?dbhtml filename="StartingServer.html"?>
+ <title>Starting JBoss Server</title>
+ <para>Starting <property moreinfo="none">JBoss Server</property> is quite simple. <property moreinfo="none">JBoss
+ Developer Studio</property> allows you to control its behaviour with the help of
+ a special toolbar: where you could start it in a regular or debug mode, stop it or
+ restart it.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>To launch the server click the green-with-white-arrow icon on the
+ <property moreinfo="none">JBoss Server View </property>or right click server name in
+ this view and select <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis>. If this view is not open, select <emphasis>
+ <property moreinfo="none">Window > Show View > Other > Server
+ > JBoss Server View</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Starting from Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Starting from JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>While launching, server output is written to the <property moreinfo="none">Console
+ view</property>:</para>
+
+ <figure float="0">
+ <title>Console Output</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is started you should see <emphasis>
+ <property moreinfo="none">Started</property>
+ </emphasis> right to its name in <property moreinfo="none">JBoss Server View</property> (column
+ "Status").</para>
+ <figure float="0">
+ <title>Server is Started</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To see event log after the server is started, expand <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Event
+ Log</diffmk:wrapper></property> branch beneath <property moreinfo="none">JBoss Server View</property>:</para>
+ <figure float="0">
+ <title>Event Log</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StoppingJBoss">
+ <?dbhtml filename="StoppingJBoss.html"?>
+ <title>Stopping JBoss Server</title>
+ <para>To stop the server, click the <emphasis>
+ <property moreinfo="none">Stop</property>
+ </emphasis> icon in <property moreinfo="none">JBoss Server view</property> or right click the server
+ name and press <emphasis>
+ <property moreinfo="none">Stop</property>
+ </emphasis>.</para>
+ <figure float="0">
+ <title>Stopping Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is stopped you will see <emphasis>
+ <property moreinfo="none">Stopped</property>
+ </emphasis> next to its name in the Status column.</para>
+ </section>
+ <section id="ServerPreferences">
+ <?dbhtml filename="ServerPreferences.html"?>
+ <title>Server Container Preferences</title>
+ <para>You can control how <property moreinfo="none">JBoss Developer Studio</property><diffmk:wrapper diffmk:change="changed"> interacts with
+ server containers in the </diffmk:wrapper><property moreinfo="none">Server editor</property><diffmk:wrapper diffmk:change="changed">. Double-click the server
+ to open it in the editor.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Server Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">Here you can specify some common settings: host name, server name, runtime as well
+ as settings related to the publishing, timeouts and server ports.</diffmk:wrapper></para>
+
+ </section>
+ </section>
+
+ <section id="JBossInstances">
+ <?dbhtml filename="JBossInstances.html"?>
+ <title>How to Use Your Own JBoss AS Instance with JBDS</title>
+ <para>Although <property moreinfo="none">JBoss Developer Studio</property><diffmk:wrapper diffmk:change="changed"> works closely with
+ </diffmk:wrapper><property moreinfo="none">JBoss EAP 4.2</property><diffmk:wrapper diffmk:change="changed"> we do not ultimately tie you to any particular
+ server for deployment. There are some servers that Studio supports directly (via the
+ bundled Eclipse WTP plug-ins). In this section we discuss how to manage self-installed
+ JBoss AS. Suppose you want to deploy the application to </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss 4.2.1
+ server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">. First of all you need to install it.</diffmk:wrapper></para>
+ <section id="JBossInstalling">
+ <?dbhtml filename="JBossInstalling.html"?>
+ <title>JBoss AS Installation</title>
+ <itemizedlist>
+ <listitem>
+ <para>Download the binary package of <property moreinfo="none">JBoss 4.2.1</property> and save
+ it on your computer: <ulink url="http://labs.jboss.com/jbossas/downloads">http://labs.jboss.com/jbossas/downloads</ulink></para>
+ </listitem>
+ </itemizedlist>
+ <para>It does not matter where on your system you install JBoss server.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The installation of JBoss server into a directory that has a name containing
+ spaces provokes problems in some situations with Sun-based VMs. Try to avoid
+ using installation folders that have spaces in their names.</para>
+ </note>
+
+ <para><diffmk:wrapper diffmk:change="changed">There is no requirement for root access to run JBoss Server on UNIX/Linux systems
+ because none of the default ports are within the 0-1023 privileged port
+ range.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>After you have the binary archive you want to install, use the JDK jar
+ tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip
+ archive contents into a location of your choice. The jboss-4.2.1.tgz archive
+ is a gzipped tar file that requires a gnutar compatible tar which can handle
+ the long pathnames in the archive. The extraction process will create a
+ jboss-4.2.1 directory. </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="AddingJBossServer">
+ <?dbhtml filename="AddingJBossServer.html"?>
+ <title>Adding and configuring JBoss Server</title>
+ <para>Now we should add just installed server into server manager in <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss
+ Developer Studio</diffmk:wrapper></property>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the JBoss Server View by selecting <emphasis>
+ <property moreinfo="none">Window > Show View > Other > Server
+ > JBoss Server View</property>
+ </emphasis>. You will see JBoss Server view.</para>
+ </listitem>
+ <listitem>
+ <para>Right click anywhere in this view and select <emphasis>
+ <property moreinfo="none">New Server</property>
+ </emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss, a division of Red Hat > JBoss AS 4.2</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">.
+ </diffmk:wrapper></emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Selecting Server Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Configure Runtime environments</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> to observe all
+ configured runtimes.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Installed Runtimes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="added">To add a new runtime, which Jboss AS 4.2 matches to, click </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Add</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> next to </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server runtime environment</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ section.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="added">In the next step make </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> to know
+ where you have installed the Server and define JRE.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Defining JBoss Runtime</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note diffmk:change="added">
+ <title><diffmk:wrapper diffmk:change="changed">Note:</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">When adding a new server you will need to specify what JRE to use. It is
+ important to set this value to a full JDK, not JRE. Again, you need a full JDK
+ to run Web applications, JRE will not be enough.</diffmk:wrapper></para>
+ </note>
+
+ <!--para>A new runtime will now appear in the <emphasis>
+ <property>Preferences > Server > Runtime Environments</property>
+ </emphasis> dialog.</para>
+ <figure>
+ <title>Runtime is Added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_13.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure-->
+
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Finish</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed">. Then select a new added runtime in Server runtime drop down
+ list and click the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> button.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Choosing Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the next dialog verify a <property moreinfo="none">JBoss</property> runtime information
+ and if something is unfair go back and correct it.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the last wizard's dialog modify the projects that are
+ configured on the server and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">A new </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> should now appear in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss
+ Server view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>New JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, we are ready to create the first web application.</para>
+ </section>
+
+ </section>
+</chapter>
+
+
+<chapter id="first_seam" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/first_seam.xml" xreflabel="first_seam">
+ <?dbhtml filename="first_seam.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Seam</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Write Your First Project with JBoss Developer Studio</title>
+
+ <para>This chapter is a set of hands-on labs. You get step-by-step information about how the JBoss
+ Developer Studio can be used during the development process.</para>
+
+ <section id="create_seam_application">
+ <title>Create a Seam Application</title>
+
+ <para>In this section you get to know how to create a Seam project in JBDS, how to start the
+ server and what a structure your project has after creating.</para>
+
+ <section id="start_dev_db">
+ <title>Start Development Database</title>
+
+ <para>Before opening the JBoss Developer studio you need to <ulink url="http://anonsvn.jboss.org/repos/jbosstools/trunk/documentation/guides/Gett...">download</ulink> and start a Workshop Database.</para>
+ <para>To start the database just run <property moreinfo="none">./runDBServer.sh</property> or
+ <property moreinfo="none">runDBServer.bat</property> from the database directory.</para>
+ <para>The end result should be a console window that looks like:</para>
+
+ <figure float="0">
+ <title>Starting DataBase</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="create_deploy_seam">
+ <title>Create and deploy Seam Web Project</title>
+
+ <para>Minimize the terminal window and run the <property moreinfo="none">JBoss Developer Studio</property>
+ from Applications Menu or from the desktop icon.</para>
+ <para>First of all you get the Workspace Launcher. Change the default workspace location if
+ it's needed. Click on <property moreinfo="none">Ok</property>. </para>
+
+ <figure float="0">
+ <title>Workspace Launcher Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After startup, you see the welcome page. You could read how to work with welcome pages
+ in <link linkend="Welcome">previous</link> chapter. Now select <property moreinfo="none">Create
+ New...</property> icon and then press on <property moreinfo="none">Create Seam Project</property>
+ link.</para>
+
+ <para>The <property moreinfo="none">New Seam Project wizard</property> is started. You need to enter a name
+ (e.g., "workshop") and a location directory for your new project. The
+ wizard has an option for selecting the actual Server (and not just WTP runtime) that will be
+ used for the project. This allows the wizard to correctly identify where the needed
+ datasource and driver libraries need to go.</para>
+
+ <figure float="0">
+ <title>New Seam Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>All settings are already specified here, you can just modify the Configuration. Click on
+ the <emphasis>
+ <property moreinfo="none">Modify...</property>
+ </emphasis> button to configure your custom facets pattern:</para>
+
+
+ <figure float="0" id="ProjectFacetsSpecifyingScreen">
+ <title>Project Facets Specifying</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the whole the dialog allows to select the "features" you want to use in your project.
+ Doing this <property moreinfo="none">JBoss Developer Studio</property> setups the appropriate tooling for
+ your project. Since JBoss Seam integrates all popular Java EE frameworks, you can select any
+ combination of technologies from the list. Here, for the default configuration, Dynamic Web
+ Module, Java, JavaServer Faces (JSF), and Seam Facet are already selected for a typical
+ database-driven web application. The default project facets should suffice.</para>
+
+ <para>In the <property moreinfo="none">Project Facets</property> form you can also bring up server runtimes
+ panel by clicking <property moreinfo="none"> Runtimes</property> tab on the right corner. This panel shows
+ available server runtimes.</para>
+
+ <figure float="0">
+ <title>Runtimes Selecting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to proceed further.</para>
+
+ <para>A dynamic web application contains both web pages and Java code. The wizard will ask you
+ where you want to put those files. You can just leave the default values or choose another
+ folder.</para>
+
+ <figure float="0">
+ <title>Web Module Settings</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next form, you will be able to select where those library JARs come from. The
+ easiest is just to select the JARs provided by the JBoss AS runtime associated with this
+ project. That is why it is important to chose the right JBoss AS 4.2 runtime in the project
+ setup window.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Check <emphasis>
+ <property moreinfo="none">Server Supplied JSF Implementation</property>
+ </emphasis>. We will use <ulink url="../../seam/html_single/index.html#addJSFCapab">JSF
+ implementation</ulink> that comes with JBoss server</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>JSF Capabilities Adding</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Next wizard step needs more settings that previous. Let's start with
+ <property moreinfo="none">General</property> section.</para>
+ <para>Leave the default Seam runtime and check a WAR deployment.</para>
+
+ <figure float="0">
+ <title>Seam Facet Setting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Next <property moreinfo="none">Database</property> section is a little tricky. The <property moreinfo="none">Connection
+ Profile</property> needs to be edited so that the new project works properly with the
+ external HSQLDB server. By default the project wizard tries to use the JBoss embedded
+ HSQLDB, but the tutorial uses an external database to replicate a more real world
+ development scenario. Click on <property moreinfo="none">Edit</property> to modify the Connection
+ Profile.</para>
+
+ <figure float="0">
+ <title>DataBase Setting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam8_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select <property moreinfo="none">JDBC Connection Properties</property>. Make sure the URL is set to <emphasis>
+ <property moreinfo="none">jdbc:hsqldb:hsql://localhost:1701</property>
+ </emphasis></para>
+
+ <figure float="0">
+ <title>JDBC Connection Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Try click on <property moreinfo="none">Test Connection</property> button. It probably won’t work. This
+ happens if the hsql jdbc driver is not exactly the same. This can be worked around by
+ modifying the HSQLDB database driver settings. To modify the settings, click the
+ <property moreinfo="none">“...”</property> next to the drop-down box.</para>
+
+ <para>The proper Driver JAR File should be listed under <property moreinfo="none">Driver File(s)</property>.
+ Select the hsqldb.jar file found in the database/lib directory and click on
+ <property moreinfo="none">Ok</property>.</para>
+
+ <figure float="0">
+ <title>Driver Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Select <property moreinfo="none">Hypersonic DB</property> and click on <property moreinfo="none">Ok</property>. Again,
+ this only happens if the selected hsqldb.jar is different from the running database.</para>
+
+ <figure float="0">
+ <title>Hypersonic DB Selecting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, the <property moreinfo="none">Test Connection</property> should succeed. After testing the
+ connection, click on Ok.</para>
+
+ <figure float="0">
+ <title>Connection Testing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can leave the <property moreinfo="none">Code Generation</property> section as is. It refers to Java
+ packages in which the generated code will be placed.</para>
+
+ <figure float="0">
+ <title>Code Generation Setting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on <property moreinfo="none">Finish</property> button. Now, there should be a new Seam project
+ called “workshop” listed in Package Explorer view.</para>
+
+ <figure float="0">
+ <title>"worskhop" Project in the Package Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="start_JBossAS">
+ <title>Start JBoss Application Server</title>
+
+ <para>The complete information on how to manage JBoss AS from JBoss Developer Studio you can
+ read in a <link linkend="manage">corresponding chapter</link>.</para>
+ <para>Now you just need to start the server by clicking on green circle/triangle icon in the
+ JBoss Server View.</para>
+
+ <figure float="0">
+ <title>Starting the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Then run the project by selecting the project and use <emphasis><property moreinfo="none">Run As... >
+ Run on Server</property>.</emphasis></para>
+
+ <note>
+ <title>Note:</title>
+ <para>If the project does not show up, then you can use a normal browser and use <emphasis>
+ <property moreinfo="none">http://localhost:8080/workshop/home.seam</property>
+ </emphasis> as the url.</para>
+ </note>
+
+ <para>Your project looks like this:</para>
+
+ <figure float="0">
+ <title>"workshop" Project Started</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="workshop_code_overview">
+ <title>Workshop Project Code Overview</title>
+
+ <para>Now let's examine the project and its structure. Go back to the Package Explorer view in
+ JBoss Developer Studio.</para>
+
+ <para>It seems like it's not much for project but this shell application contains a login
+ screen with default login logic, a menu template that can be further modified, and other
+ layout templates.</para>
+
+ <para>It's important to note that the business logic will reside in the <emphasis>
+ <property moreinfo="none">src/hot</property>
+ </emphasis> folder, by default. And, the package naming conventions that were used in <property moreinfo="none">New Seam
+ project wizard</property> could have been changed to something different from <emphasis>
+ <property moreinfo="none">org.domain.workshop.session</property>.
+ </emphasis> Also, notice that there is a default <property moreinfo="none">Authenticator. java</property>
+ file. This is where custom security logic can be added. Seam has a nice declarative security
+ model that we will explore in a bit more detail later on. The <emphasis>
+ <property moreinfo="none">src/main</property>
+ </emphasis> folder is a model directory. It stores the project's JPA entity beans.</para>
+
+ <figure float="0">
+ <title>Project Structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The view tier of the
+ application is also important. Seam uses facelets and there is a built-in facelets GUI
+ editor that has some nice WYSIWYG and component drag/drop functionality. Try this out by
+ opening <property moreinfo="none">home.xhtml</property> from <property moreinfo="none">WebContent</property> folder.</para>
+
+ <figure float="0">
+ <title>Facelets GUI Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam18.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Notice that the templates reside in the <emphasis>
+ <property moreinfo="none">WebContent/layout</property>
+ </emphasis> folder. There is a stylesheet in the <emphasis>
+ <property moreinfo="none">WebContent/stylesheet</property>
+ </emphasis> folder. There is also a login and default error page. The Facelet editor will be
+ explored in more detail later in the lab.</para>
+
+ <para>The project already has a datasource that was created per the Seam project wizard
+ database settings. And, obviously all of the Seam specific configuration files and JAR
+ dependencies are included and placed in the proper locations. On last noteworthy line item
+ is related to the build script. There isn’t a build script because the Eclipse WTP(Web Tools
+ Project) plugin is used to publish web application changes. As you can see, JBoss Developer
+ Studio is removing a great deal of complexity from the enterprise Java project
+ setup/deployment process. The end result is a developer that is writing code, not spending
+ days/weeks trying to figure out how to get a decent development environment and project
+ build process.</para>
+
+ </section>
+
+ </section>
+
+
+ <section id="seam_action_dev">
+ <title>Seam Action Development</title>
+
+ <para>Now, it’s time to write some code. The good news is that JBoss Developer Studio can also
+ help out in this respect. In this section, we will create a new Seam Action POJO and facelet
+ with some custom business logic and some GUI changes.</para>
+
+ <section id="create_seam_action">
+ <title>Create a New Seam Action</title>
+
+ <para>Go to main menu bar and click on <emphasis>
+ <property moreinfo="none">File > New > New Seam Action</property>
+ </emphasis> to start the New Seam Action wizard.</para>
+
+ <para>Specify a <property moreinfo="none">Seam component name</property> (e.g., "myAction").
+ The other properties will be auto-completed for you so there is no need to change them.
+ Click on <property moreinfo="none">Finish</property>.</para>
+
+ <figure float="0">
+ <title>New Seam Action Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, open the <property moreinfo="none">MyAction.java</property> file and replace the
+ "myAction" method with this logic:</para>
+
+ <programlisting format="linespecific"><![CDATA[public void myAction() {
+Calendar cal = Calendar.getInstance();
+log.info("myAction.myAction() action called");
+facesMessages.add("MyAction Executed on:" + cal.getTime());
+}]]></programlisting>
+
+ <para>You also need to import the <property moreinfo="none">java.util.Calendar</property> class by clicking
+ <emphasis><property moreinfo="none">CTRL + Shift + O</property>.</emphasis></para>
+
+ </section>
+
+ <section id="test_seam_action">
+ <title>Test Seam Action</title>
+
+ <para>The new action can be tested by browsing the workshop-test project. JBoss Developer
+ Studio has already created a TestNG test case for you.</para>
+
+ <figure float="0">
+ <title>"workshop-test" Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam20.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The test case simulates a Seam component/method execution for the
+ <property moreinfo="none">MyAction.myAction()</property> logic.</para>
+ <para>To run the test case, right click on <property moreinfo="none">MyActionTest.xml</property> and click <emphasis>
+ <property moreinfo="none">Run As > TestNG Suite</property>
+ </emphasis> or use the <property moreinfo="none">Run As...</property> toolbar shortcut as shown
+ below.</para>
+
+ <figure float="0">
+ <title>TestNG Running</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>With any luck, the test case will pass. Look at the TestNG view.</para>
+
+ <figure float="0">
+ <title>TestNG Results</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, it’s safe to test the new Seam Action in a web browser. The fastest way to do that
+ is to right click on <property moreinfo="none">myAction.xhtml</property> and use <emphasis>
+ <property moreinfo="none">Run As... > Run On Server</property>
+ </emphasis> which will show the appropriate url in the browser. Alternatively you can
+ manually enter <emphasis>
+ <property moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> into a browser.</para>
+
+ <figure float="0">
+ <title>Seam Action in a Web Browser</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam23.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="modify_seam_action">
+ <title>Modify Seam Action User Interface</title>
+
+ <para>Browse to <emphasis>
+ <property moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> and click on <property moreinfo="none">myAction</property>. This executes the “myAction” method.
+ This looks pretty good, but we could make this page look a little better.</para>
+
+ <para>Open <emphasis>
+ <property moreinfo="none">WebContent/myAction.xhtml</property>
+ </emphasis> in JBoss Developer Studio to use the nice facelets editor.</para>
+
+ <figure float="0">
+ <title>Open Seam Action with Editor </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Right click on the "myAction!" button in the visual part of editor and
+ select <property moreinfo="none"><h:commandButton> Attributes</property>.</para>
+
+ <figure float="0">
+ <title>Seam Action Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Change the <property moreinfo="none">value</property> of the button to something different. If desired,
+ you can change any other text on the page. Then, type <emphasis>
+ <property moreinfo="none">CTRL + S</property>
+ </emphasis> to save the facelet.</para>
+
+ <figure float="0">
+ <title>Attributes Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Refresh <emphasis>
+ <property moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> and now you should see your changes.</para>
+
+ <para>Notice that you did not have to publish the application. JBoss Developer Studio
+ auto-published it for you.</para>
+
+ <figure float="0">
+ <title>Seam Action Is Modified</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam27.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+
+ </section>
+
+ <section id="declarative_security">
+ <title>Declarative Security</title>
+
+ <para>In this section you will see how it’s easy to secure the facelets and facelet components
+ in Seam. Let’s go ahead and secure the action button, then we will secure the entire
+ page.</para>
+
+ <section id="edit_login">
+ <title>Edit Login Authentication Logic</title>
+
+ <para>There is a class called <property moreinfo="none">Authenticator.java</property>. The login page will
+ execute the <property moreinfo="none">Authenticator.authenticate()</property> method by default, so we’ll
+ start by adding some custom login logic.</para>
+ <para>Open <property moreinfo="none">Authenticator.java</property> in JBoss Developer Studio and replace the
+ <property moreinfo="none">authenticate()</property> method with this code:</para>
+
+ <programlisting format="linespecific"><![CDATA[public boolean authenticate() {
+if (identity.getUsername().equals("admin")
+&& identity.getPassword().equals("password")) {
+identity.addRole("admin");
+return true;
+}
+else
+return true;
+}]]></programlisting>
+
+ </section>
+ <section id="secure_seam_page">
+ <title>Secure Seam Page Component</title>
+
+ <para>Open <property moreinfo="none">myAction.xhtml</property> and add a new secured command button:</para>
+ <programlisting format="linespecific"><![CDATA[<h:commandButton id="myActionSecured"
+value="Secured Action Button"
+action="#{myAction.myAction}"
+rendered="#{s:hasRole('admin')}"/>]]></programlisting>
+
+ <para>Refresh <emphasis>
+ <property moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> If you are not logged in you will only see one button. If you are logged in,
+ there will be two buttons.</para>
+
+
+ <figure float="0">
+ <title>One Button on a Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam28.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The secured button is not visible because the user isn’t logged in as
+ <property moreinfo="none">"admin"</property>.</para>
+
+ <figure float="0">
+ <title>Secured Button is Visible</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam29.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The user is logged in as <property moreinfo="none">"admin"</property>. Securing
+ components is easy but securing pages is pretty simple as well. </para>
+ <para>Open <emphasis>
+ <property moreinfo="none">WebContent/WEB-INF/pages.xml</property>
+ </emphasis>. Then add this markup directly underneath the <pages>
+ element:</para>
+
+ <programlisting format="linespecific"><![CDATA[<page view-id="/myAction.xhtml" login-required="true"/>]]></programlisting>
+
+ <para>Refresh <emphasis>
+ <property moreinfo="none">http://localhost:8080/workshop/myAction.seam</property>
+ </emphasis> If you are not logged in you will get bounced back to the login page.</para>
+
+ <figure float="0">
+ <title>Login Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam30.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Thus, if you enter login credentials for the
+ <property moreinfo="none">"admin"</property> user, you will be re-directed to the
+ secured page and secured component. If you enter different login credentials, page access
+ will be granted, but the secured component will not be displayed.</para>
+
+ <para>Congratulations! You have secured your new action both at the facelet component and page
+ level. You also added custom authentication logic to the login action.</para>
+
+ </section>
+
+ </section>
+
+ <section id="browsing_workshop_db">
+ <title>Browsing Workshop Database</title>
+
+ <para>In this section you get to know how to use the workshop database that was started at the
+ beginning of the lab.</para>
+
+ <section id="database_connectivity">
+ <title>Database Connectivity Setup</title>
+
+ <para>The workshop data can be browsed inside of JBoss Developer Studio.</para>
+
+ <para>To open the Data Source Explorer, click on <emphasis><property moreinfo="none">Window > Open Perspective
+ > Other > Database Development</property>.</emphasis></para>
+ <para>In the Data Source Explorer, expand a <property moreinfo="none">Databases</property> node and select a
+ <property moreinfo="none">Default</property> database. Right click on it, select
+ <property moreinfo="none">Connect</property> from the context menu.</para>
+
+ <figure float="0">
+ <title>Data Source Explorer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam31.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="browsing_workshop_db2">
+ <title>Browse Workshop Database</title>
+
+ <para>Then in the current view, drill down to the <property moreinfo="none">CUSTOMERS</property> table.</para>
+
+ <figure float="0">
+ <title>"CUSTOMERS" Table</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam32.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Right click on <property moreinfo="none">CUSTOMERS</property>, select <emphasis>
+ <property moreinfo="none">Data > Sample Contents</property>
+ </emphasis> to view the data in the table.</para>
+
+ <para>There should be a SQL Results view on the workbench, but it could be hidden. Click on
+ the <property moreinfo="none">"Result1"</property> tab in the right side and you should
+ see the data in the CUSTOMERS table.</para>
+
+
+ <figure float="0">
+ <title>SQL Results View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam33.png" scale="92"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>If you can’t find the SQL Results view tab, click on <emphasis><property moreinfo="none">Window > Show
+ View > Other > SQL Development > SQL Results</property>.</emphasis></para>
+ </note>
+
+ <para>Congratulations! You just connected to the workshop database and queried the content
+ using Database Explorer tools.</para>
+
+ </section>
+
+ </section>
+
+ <section id="db_programming">
+ <title>Database Programming</title>
+
+ <para>Now, it’s time to reverse engineer the workshop database into a fully functioning Seam
+ CRUD(Create Read Update Delete) application.</para>
+
+ <section id="reverse_engineer_crud">
+ <title>Reverse Engineer CRUD from a Running Database</title>
+
+ <para>In <property moreinfo="none">JBoss Developer Studio</property>, switch to <property moreinfo="none">Seam
+ perspective</property>, and then right-click the project and select
+ <emphasis><property moreinfo="none">New > Seam Generate Entities</property>.</emphasis></para>
+
+ <para>"workshop" project in the <property moreinfo="none">Seam Generate Entities
+ wizard</property> will be selected automatically. There is no need to change something
+ more, click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to proceed further.</para>
+
+ <figure float="0">
+ <title>Generate Seam Entities</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam34.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the next page use the <emphasis>
+ <property moreinfo="none">Include</property>
+ </emphasis> button to include all the tables from the database and click <emphasis>
+ <property moreinfo="none">Finish</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Selecting Tables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam34a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After running the Generate Entities action, you will see new <emphasis>
+ <property moreinfo="none">org.domain.workshop.entity</property>
+ </emphasis> classes. These classes represent insert/update/delete/query logic.</para>
+
+ <figure float="0">
+ <title>org.domain.workshop.entity Classes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam35.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>There are also <emphasis>
+ <property moreinfo="none">org.domain.workshop.entity</property>
+ </emphasis> package that contains the JPA classes. These are the entity beans that are
+ mapped to database tables.</para>
+
+ <para>Last, but not least, there are facelets for all of the CRUD screens. The best way to get
+ a feel for the generated code is to open a browser and play around with the application. Go
+ to <emphasis>
+ <property moreinfo="none">http://localhost:8080/workshop</property>
+ </emphasis> and insert/update/delete/query a few records. There is quite a bit of AJAX in
+ this application, but which we will explore further later on in the lab. For now, take note
+ of the page tabs, required field logic and data table sorting in the list pages. </para>
+
+ <figure float="0">
+ <title>CustomersList.xhtml in the Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam36.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Congratulations! You now have a fully functioning CRUD application that is already AJAX
+ enabled.</para>
+
+ </section>
+
+ <section id="use_hibernate_tools">
+ <title>Use Hibernate Tools to Query Data via JPA</title>
+
+ <para>Now, it's time to write some JPA queries using the Hibernate perspective in
+ <property moreinfo="none">JBoss Developer Studio</property>.</para>
+ <para>In the upper right corner of the workbench there is a small icon (see the figure below),
+ click on it and choose <property moreinfo="none">Hibernate</property>.</para>
+
+ <figure float="0">
+ <title>Hibernate Perspective</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam37.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Look at the Hibernate Configurations view. In the "workshop" project,
+ drill down on the <property moreinfo="none">Session Factory</property> and notice that the JPA
+ entities/attributes are listed in a nice tree view.</para>
+
+ <figure float="0">
+ <title>Hibernate Configurations View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam38.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Right click on the <property moreinfo="none">Session Factory</property> and select <property moreinfo="none">HQL
+ Editor</property>. This will open a JPA query scratch pad window.</para>
+
+ <para>Write your query and click on the "Hibernate Dynamic SQL Preview" tab.
+ You should see the SQL that will be executed if this JPA query is run.</para>
+
+ <figure float="0">
+ <title>JPA Query Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam39.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Run the query by clicking on the green run icon.</para>
+
+ <para>The results are listed in the "Hibernate Query Result" tab. There is a
+ "Properties" tab in the workbench that can be used to see a specific JPA
+ result. These results represent the JPA objects because our query did not specify column
+ names.</para>
+
+ <figure float="0">
+ <title>Hibernate Query Result View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam40.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The query can be refined, and take note that there is nice code completion in the JPA
+ query editor.</para>
+
+ <figure float="0">
+ <title>Code Completion</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam41.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>A refined query will return results that are more ResultSet oriented. Notice the join
+ logic that JPA supports.</para>
+
+ <figure float="0">
+ <title>The Results</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam42.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>There was no need to specify an <property moreinfo="none">Employees</property> table in the
+ <property moreinfo="none">from</property> part of the JPA query because JPA supports reference traversal
+ via Java class attribute references. Not only are JPA and HQL queries fully supported, but
+ Criteria based queries can also be written in the Criteria Editor. You should spend some
+ time tinkering with different queries and possibly Criteria based queries, even though the
+ instructions are not provided in this lab.</para>
+
+ <figure float="0">
+ <title>Criteria Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam43.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="use_hibernate_to_vizualize">
+ <title>Use Hibernate Tools to visualize the Data Model</title>
+
+ <para>Now, it’s time to view the data model for the workshop database.</para>
+
+ <para>In the Hibernate Configurations view, select "workshop" project and
+ expand the <property moreinfo="none">Configuration</property> node. Select the
+ <property moreinfo="none">Customers</property> entity, right click on it, choose <property moreinfo="none">Open Mapping
+ Diagram</property>.</para>
+
+ <figure float="0">
+ <title>Mapping Diagram Opening</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam44.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You see a Diagram tab for the CUSTOMERS table and any tables that have FK references.
+ This is a handy way to view the data model and JPA mappings. Now, you’ve got access to
+ something that the Erwin Data Modeler can’t do.</para>
+
+
+ <figure float="0">
+ <title>Diagram Tab</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam45.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+
+ <section id="rich_components">
+ <title>Rich Components</title>
+
+ <para>This lab will conclude with one last AJAX twist. In this section we add a RichFaces
+ <property moreinfo="none">inputNumberSlider</property> to the Order Details edit screen.</para>
+
+ <section id="add_richfaces">
+ <title>Add a Richfaces component to the CRUD Application</title>
+
+ <para>Switch to Seam perspective, open <emphasis>
+ <property moreinfo="none">WebContent/OrderdetailsEdit.xhtml</property>
+ </emphasis> in JBoss Developer Studio.</para>
+ <para>Change the form field values using the visual editor. Seam has generated the form field
+ names that match the database column names. This is not ideal for business users.</para>
+
+ <figure float="0">
+ <title>Form Fields Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam46.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Also, replace the QTY Ordered input field with a <property moreinfo="none">inputNumberSlider</property>.
+ You can use the JBoss Developer Studio palette or right click on the form and insert the
+ RichFaces component.</para>
+
+ <figure float="0">
+ <title>RichFaces Component Inserting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam47.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>One the last option is to use the source view and manually copy the inputNumberSlider
+ markup listed below:</para>
+
+ <programlisting format="linespecific"><![CDATA[<rich:inputNumberSlider id="quantityOrdered" required="true"
+ value="#{orderdetailsHome.instance.quantityordered}"/>]]></programlisting>
+
+ <figure float="0">
+ <title>Adding the Source</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam48.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The end result is an edit page that has better form labels and a new RichFaces
+ control.</para>
+
+ <figure float="0">
+ <title>The Result Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/first_seam/first_seam49.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Congratulations! You have completed the JBoss Developer Studio lab.</para>
+
+ </section>
+
+ </section>
+</chapter>
+
+
+<chapter id="jsp_application" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml" xreflabel="jsp_application">
+ <?dbhtml filename="jsp_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSP</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Developing a simple JSP web application</title>
+
+ <note>
+ <title>Note:</title>
+ <para>We highly recommend developing in <property moreinfo="none">Seam</property>. This chapter is for users
+ who for some reason cannot use Seam.</para>
+ </note>
+
+ <para>In this chapter you'll find out how to create a simple <ulink url="http://java.sun.com/products/jsp/">JSP</ulink> application using the
+ <property moreinfo="none">JBoss Developer Studio</property>. The application will show a classic
+ "Hello World!" on the page.</para>
+ <para>We'll assume that you have already launched <property moreinfo="none">JBoss Developer
+ Studio</property> and also that the <property moreinfo="none">Web Development</property> perspective is the
+ current perspective. If not, make it active by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Web Development</property>
+ </emphasis> from the menu bar or by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Other...</property>
+ </emphasis> from the menu bar and then selecting Web Development from the Select Perspective
+ dialog box.</para>
+
+ <section id="SettingUpTheProject">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para>We are going to start with the creating a Dynamic Web Project with a minimal
+ structure, i.e. with just required facets. Thus this section will perform you all
+ necessary steps on how to do this.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Go to the menu bar and select <emphasis>
+ <property moreinfo="none">File > New > Other...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Web > Dynamic Web Project</property>
+ </emphasis> in the New Project dialog box</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Enter "jspHello" as a project name</para>
+ </listitem>
+ <listitem>
+ <para>Then select <emphasis>
+ <property moreinfo="none">Minimal Configuration</property>
+ </emphasis> from the list of possible configurations and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">jspHello</property>
+ </emphasis> node should appear in the upper-left <property moreinfo="none">Package Explorer</property>
+ view.</para>
+ <figure float="0">
+ <title>New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="CreatingJSPPage">
+ <?dbhtml filename="CreatingJSPPage.html"?>
+ <title>Creating JSP Page</title>
+ <para>This section covers all the points how to create, edit and then preview JSP page.</para>
+ <para>In our simple application we need to create only one JSP page which displays a
+ <emphasis>"Hello World!"</emphasis> message.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis><property moreinfo="none">WebContent > New >
+ JSP</property>. </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type "hello.jsp" for a file name and click the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>In the next window you can choose a template for your jsp page and see its preview.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">New JSP File (xhtml)</property>
+ </emphasis> template and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Our <emphasis><property moreinfo="none">hello.jsp</property></emphasis> page will now appear in
+ <property moreinfo="none">Project Explorer</property>.
+ </para>
+ <section id="EditingJSPPage">
+ <?dbhtml filename="EditingJSPPage.html"?>
+ <title>Editing a JSP Page</title>
+ <para>Let's now make a little change so that a jsp page displays
+ <emphasis>"Hello World!"</emphasis> message.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Insert this line inside the <emphasis role="bold">
+ <property moreinfo="none"><body></property>
+ </emphasis><emphasis role="bold">
+ <property moreinfo="none"></body></property>
+ </emphasis> tag: </para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<% System.out.println("Hello World!"); %>]]>
+</programlisting>
+
+ <para>Notice that content assist functionality is always available when you are typing:</para>
+ <figure float="0">
+ <title>Content Assist in JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After changes made your <emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page should look like this:</para>
+ <figure float="0">
+ <title>Hello.jsp Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>This line will actually output <emphasis>"Hello
+ World!"</emphasis> message in the <property moreinfo="none">Console</property>. To make the
+ message displayed in the Browser, just replace this line with the simple
+ <emphasis>Hello World!</emphasis>.</para>
+ </section>
+
+ <section id="WebXML">
+ <?dbhtml filename="WebXML.html"?>
+ <title>web.xml file</title>
+ <para>When you are creating web project the wizard creates the <emphasis>
+ <property moreinfo="none">web.xml</property>
+ </emphasis> for you automatically. The <property moreinfo="none">web.xml file editor</property>
+ provided by <property moreinfo="none">JBoss Developer Studio</property> is available in two modes:
+ <property moreinfo="none">Tree</property> and <property moreinfo="none">Source</property>.</para>
+ <figure float="0">
+ <title>Web.xml in Design and Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_6.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Both modes are fully synchronized. Let's add mapping to our <emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page in <emphasis>
+ <property moreinfo="none">web.xml</property>
+ </emphasis> file.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to <property moreinfo="none">Source</property> tab.</para>
+ </listitem>
+ <listitem>
+ <para>Add the next code into <emphasis role="bold">
+ <property moreinfo="none"><welcome-file-list></property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<welcome-file>hello.jsp</welcome-file>
+]]></programlisting>
+ <para>If you come back to <property moreinfo="none">Tree</property> mode you will see that the changes
+ made are automatically reflected in that mode.</para>
+ <para>Actually you don't really need to do any configurations right now.</para>
+ </section>
+
+ <section id="DeployTheProject">
+ <?dbhtml filename="DeployTheProject.html"?>
+ <title>Deploying the project</title>
+ <para>While creating any web project you could experience a pain writing ant scripts and
+ managing the packaging even when writing the most trivial web applications. With
+ <property moreinfo="none">JBoss Developer Studio</property> you are saved from such a pain. All
+ you need is to start <property moreinfo="none">JBoss Server</property> and launch your application
+ in your favorite browser.</para>
+ <para>You can also create a war archive with <ulink url="../../as/html_single/index.html#Project_archivesView">JBDS's Archive Tools</ulink>
+ and export it to any web server.</para>
+ <section id="WarConfig">
+ <?dbhtml filename="WarConfig.html"?>
+ <title>WAR Config</title>
+ <para>Project archives managing is available through <ulink url="../../as/html_single/index.html#Project_archivesView">Project Archives view</ulink>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Window > Show view > Other > JBoss
+ Tools > Project archives</property>
+ </emphasis> from menu bar</para>
+ </listitem>
+ <listitem>
+ <para>Select a project in Package Explorer you want to be archived</para>
+ </listitem>
+ </itemizedlist>
+ <para>In <property moreinfo="none">Project Archives</property> you will see available archive types
+ for the project:</para>
+ <figure float="0">
+ <title>Project Archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click, for example, <emphasis>
+ <property moreinfo="none">WAR</property>
+ </emphasis> option to create war archive</para>
+ </listitem>
+ </itemizedlist>
+ <para>In the <property moreinfo="none">New WAR</property> dialog you can see automatically selected
+ default values.</para>
+ <figure float="0">
+ <title>New WAR Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to see a stub archive configuration for your project: <figure float="0">
+ <title>Stub Archive Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>. </emphasis> The
+ <emphasis>.war</emphasis> file will appear in <property moreinfo="none">Package
+ Explorer</property> and also in <property moreinfo="none">Project Archives</property>
+ view as structure tree: <figure float="0">
+ <title>Archive is Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Archive in Project Archives View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>Via <property moreinfo="none">Project Archives</property> view you could now edit your
+ archive, add new folders, publish to server, and so on:</para>
+ <figure float="0">
+ <title>Configure Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="AutoRedeploy">
+ <?dbhtml filename="AutoRedeploy.html"?>
+ <title>Auto redeploy</title>
+ <para>When you are creating a web application and register it on <property moreinfo="none">JBoss
+ Server</property> it is automatically deployed into
+ <emphasis>/deploy</emphasis> directory of the server. JBDS comes with the
+ feature of auto-redeploy. It means that you don't need to restart
+ <property moreinfo="none">JBoss Server</property>. Any changes made in the application in
+ exploded format will trigger a redeployment on the server.</para>
+ </section>
+ </section>
+
+ <section id="Previewtab">
+ <?dbhtml filename="Previewtab.html"?>
+ <title>JSP Page Preview</title>
+ <para><property moreinfo="none">JBDS</property> comes with JSP design-time preview features. When
+ designing JSP pages you can easily preview how they will look during runtime. You
+ can even <ulink url="../../jsf/html_single/index.html#el_exp_para">attach your stylesheet to the
+ Preview</ulink>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Make a little change to <emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page, e.g. put this code snippet:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%= new java.util.Date() %>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>Switch to Preview page by clicking <property moreinfo="none">Preview</property> tab at the
+ bottom of the page. You will see how the page will look at runtime.</para>
+ </listitem>
+ </itemizedlist>
+ <!-- <figure>
+ <title>Preview Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+-->
+ </section>
+ <section id="LaunchingTheProject">
+ <?dbhtml filename="LaunchingTheProject.html"?>
+ <title>Launch JSP Project</title>
+ <para>Let's now launch our project on server. We'll use
+ <property moreinfo="none">JBoss Server</property> that is shipped with <property moreinfo="none">JBoss Developer
+ Studio</property>. You can do it by performing one of the following actions:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Start JBoss Server from <ulink url="../../as/html_single/index.html#JBossServerView">JBoss
+ Server view</ulink> by clicking the Start icon.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Starting Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click the Run icon or right click your project folder and select <emphasis>
+ <property moreinfo="none">Run As > Run on Server</property>. </emphasis> If you
+ haven't made any changes in <emphasis>
+ <property moreinfo="none">web.xml</property>
+ </emphasis> file or cleared it out you can launch the application by right
+ clicking the <emphasis>
+ <property moreinfo="none">hello.jsp</property>
+ </emphasis> page and selecting <emphasis>
+ <property moreinfo="none">Run on the Server</property>. </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Run Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You should see the next page in a Browser :</para>
+ <figure float="0">
+ <title>Running Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus with the help of this chapter you've learnt how to organize a Dynamic
+ Web Project with a minimal configuration, add any staff to it (in our case it's
+ just one jsp page) and deploy and run it on the <property moreinfo="none">JBoss Server</property>
+ shipped with <property moreinfo="none">JBDS</property>.
+ </para>
+ </section>
+
+ </section>
+</chapter>
+
+
+<chapter id="rad_jsf_application" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml" xreflabel="rad_jsf_application">
+ <?dbhtml filename="rad_jsf_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>RAD</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>RAD development of a simple JSF application</title>
+
+ <note>
+ <title>Note:</title>
+ <para>We highly recommend developing in <property moreinfo="none">Seam</property>. This chapter is for users
+ who for some reason cannot use <property moreinfo="none">Seam</property>.</para>
+ </note>
+
+ <para>In this chapter you will see how to create a simple JSF application being based on
+ <property moreinfo="none">"RAD"</property> philosophy. We will create the familiar
+ Guess Number application. The scenario is the following. You are asked to guess a number
+ between 0 and 100. If the guess is correct, a success page is displayed with a link to play
+ again. If the guess is incorrect, a message is printed notifying that a smaller or a larger
+ number should be entered and the game continues.</para>
+ <para>We'll show you how to create such an application from scratch, along the way
+ demonstrating powerful features of JBoss Developer Studio such as project templating, Visual
+ Page Editor, code completion and others. You will design the JSF application and then run
+ the application from inside JBoss Developer Studio using the bundled JBoss server.</para>
+
+ <section id="SettingUpTheProject12">
+ <?dbhtml filename="SettingUpTheProject12.html"?>
+ <title>Setting up the project</title>
+ <para>First, you should create a JSF 1.2 project using an integrated JBDS's new
+ project wizard and predefined templates. Follow the next steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In Web Projects View (if it is not open select <emphasis>
+ <property moreinfo="none">Window > Show View > Others > JBoss Tools Web
+ > Web Projects View</property>) </emphasis> click <emphasis>
+ <property moreinfo="none">Create New JSF Project</property>
+ </emphasis> button. <figure float="0">
+ <title>Create New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure></para>
+ </listitem>
+
+ <listitem>
+ <para>Put <property moreinfo="none">GuessNumber</property> as a project name, in JSF Environment
+ drop down list choose <property moreinfo="none">JSF 1.2</property></para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as it is and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>Our project will appear in Project Explorer and Web Projects Views. As you can see
+ JBoss Developer Studio has created for us the whole skeleton for the project with all
+ needed libraries, faces-config.xml and web.xml files.</para>
+ <figure float="0">
+ <title>New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As the project has been set up, new JSP pages should be created now.</para>
+ </section>
+ <section id="CreatingJSPPages">
+ <?dbhtml filename="CreatingJSPPages.html"?>
+ <title>Creating JSP Pages</title>
+
+ <para>Here, we are going to add two pages to our application. The first page is
+ inputnumber.jsp. It prompts you to enter a number. If the guess is incorrect, the same
+ page will be redisplayed with a message indicating whether a smaller or a larger number
+ should be tried. The second page is success.jsp. This page will be shown after you guess
+ the number correctly. From this page you also have the option to play the game again.</para>
+
+ <para>Now, we will guide you through the steps on how to do this.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open <emphasis>
+ <property moreinfo="none">faces-config.xml</property>
+ </emphasis> file</para>
+ </listitem>
+ <listitem>
+ <para>Right click anywhere on the diagram mode</para>
+ </listitem>
+ <listitem>
+ <para>From the context menu select <emphasis>
+ <property moreinfo="none">New View</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">pages/inputnumber</property>
+ </emphasis> as the value for <emphasis>
+ <property moreinfo="none">From-view-id</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In the same way create another jsf view. Type <emphasis>
+ <property moreinfo="none">pages/success</property>
+ </emphasis> as the value for <emphasis>
+ <property moreinfo="none">From-view-id</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>On the diagram you will see two created views.</para>
+ <figure float="0">
+ <title>New Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="CreatingTransition">
+ <?dbhtml filename="CreatingTransition.html"?>
+ <title>Creating Transition between two views</title>
+ <para>Then, we should create connection between jsp pages.</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the diagram, select the <emphasis>
+ <property moreinfo="none">Create New Connection</property>
+ </emphasis> icon third from the top along the upper left side of the diagram to
+ get an arrow cursor with a two-pronged plug at the arrow's bottom <figure float="0">
+ <title>Create Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">pages/inputnumber</property>
+ </emphasis> page icon and then click on the <emphasis>
+ <property moreinfo="none">pages/success</property>
+ </emphasis> page icon</para>
+ </listitem>
+ </itemizedlist>
+ <para>A transition should appear between the two icons of views.</para>
+ <figure float="0">
+ <title>Created Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="CreatingResourceFile">
+ <?dbhtml filename="CreatingResourceFile.html"?>
+ <title>Creating Resource File</title>
+ <para>A resource file is just a file with a <emphasis>.properties</emphasis> extension for
+ collecting text messages in one central place. JBoss Developer Studio allows you to
+ create quickly a resource file. The messages stored in resource file can be displayed to
+ you on a Web page during application execution. </para>
+ <para>With resource file first, you don't hard code anything into the JSP pages.
+ And second, it makes it easier to translate your application to other languages. All you
+ have to do is to translate all your messages to the other language and save them in a
+ new properties file with a name that ends with the appropriate ISO-639 language code.</para>
+ <para>It is a good idea to keep your resources inside the <emphasis>
+ <property moreinfo="none">JavaSource</property>
+ </emphasis> folder, where you keep your .java files. Every time you build the project,
+ all <emphasis>.properties</emphasis> files will then be copied to the
+ <emphasis>classes</emphasis> folder by default.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">JavaSource</property>
+ </emphasis> folder and select <emphasis>
+ <property moreinfo="none">New > Folder</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">game</property>
+ </emphasis> for Folder name and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>Your resource file and java bean will be stored in this folder.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click on <emphasis>
+ <property moreinfo="none">game folder</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">New > Properties File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">messages</property>
+ </emphasis> as the value for "name" attribute and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>JBoss Developer Studio will automatically open
+ <property moreinfo="none">messages.properties</property> file for editing.</para>
+ <figure float="0">
+ <title>Messages.properties File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button for adding new attribute to your resource file</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis role="italic">
+ <property moreinfo="none">how_to_play</property>
+ </emphasis> for "name" and <emphasis role="italic">
+ <property moreinfo="none">Please pick a number between 0 and 100.</property>
+ </emphasis> for value</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In such a way add the next properties:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[makeguess_button=Make Guess
+trayagain_button=Play Again?
+success_text=How cool.. You have guessed the number, {0} is correct!
+tryagain_smaller=Oops..incorrect guess. Please try a smaller number.
+tryagain_bigger=Oops..incorrect guess. Please try a bigger number.
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ <para>Your .properties file should now look like follows:</para>
+ <figure float="0">
+ <title>Properties are Added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><emphasis>
+ <property moreinfo="none">Up</property></emphasis>
+ and <emphasis>
+ <property moreinfo="none">Down</property>
+ </emphasis> buttons allow you to move you attribute on the list. For delete the attribute, choose it and press <emphasis>
+ <property moreinfo="none">Delete</property></emphasis> button.</para>
+ <para>If you want to change a value or a name of your attribute, click on it and than on <emphasis>
+ <property moreinfo="none">Edit</property></emphasis> button.</para>
+ </section>
+
+ <section id="CreatingJavaBean">
+ <?dbhtml filename="CreatingJavaBean.html"?>
+ <title>Creating Java Bean</title>
+ <para>In this section you'll see how to create a Java bean that will hold business
+ logic of our application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">game folder</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">New > Class</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">NumberBean</property>
+ </emphasis> for bean name</para>
+ </listitem>
+ </itemizedlist>
+ <para>A java bean is created.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Declare the variable of your entered number:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[Integer userNumber;
+]]></programlisting>
+ <para>JBDS allows to quickly generate getters and setters for java bean.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">NumberBean.java</property>
+ </emphasis> in Package Explorer</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Source > Generate Getters and Setters...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Check <emphasis>
+ <property moreinfo="none">userNumber</property>
+ </emphasis> box and click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis>
+ <figure float="0">
+ <title>Generate Getters and Setters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Add the declaration of the second variable</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[int randomNumber;
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>.. other bean methods:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[public NumberBean ()
+{
+ randomNumber = (int)(Math.random()*100);
+ System.out.println ( "Random number: "+randomNumber);
+ }
+ public String playagain ()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpSession session =
+ (HttpSession) context.getExternalContext().getSession(false);
+ session.invalidate();
+ return "playagain";
+ }
+ public String checkGuess ()
+ {
+
+ // if guessed, return 'success' for navigation
+ if ( userNumber.intValue() == randomNumber )
+ {
+ return "success";
+ }
+else
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResourceBundle bundle = ResourceBundle.getBundle("game.messages",
+ context.getViewRoot().getLocale());
+ String msg = "";
+ // if number bigger, get appropriate message
+ if ( userNumber.intValue() > randomNumber )
+ msg = bundle.getString("tryagain_smaller");
+ else // if number smaller, get appropriate message
+ msg = bundle.getString("tryagain_bigger");
+ // add message to be displayed on the page via <h:messages> tag
+ context.addMessage (null, new FacesMessage(msg));
+ // return 'tryagain' for navigation
+ return "tryagain";
+ }
+ }
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>And the import declarations:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+import javax.faces.application.FacesMessage;
+import java.util.Locale;
+import java.util.ResourceBundle;
+]]></programlisting>
+ <para>The whole java bean should look as follows:</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+import javax.faces.application.FacesMessage;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+public class NumberBean
+{
+ Integer userNumber;
+ int randomNumber; // random number generated by application
+public Integer getUserNumber ()
+ {
+ return userNumber;
+ }
+ public void setUserNumber (Integer value)
+ {
+ this.userNumber = value;
+ }
+
+ // constructor, generates random number
+ public NumberBean ()
+ {
+ randomNumber = (int)(Math.random()*100);
+ System.out.println (
+ "Random number: " + randomNumber);
+ }
+
+ public String playagain ()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpSession session =
+ (HttpSession) context.getExternalContext().getSession(false);
+ session.invalidate();
+ return "playagain";
+ }
+
+ // check if user guessed the number
+ public String checkGuess ()
+ {
+ // if guessed, return 'success' for navigation
+ if ( userNumber.intValue() == randomNumber )
+ {
+ return "success";
+ }
+ // incorrect guess
+ else
+ {
+ // get a reference to properties file to retrieve messages
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResourceBundle bundle =
+ ResourceBundle.getBundle("game.messages",
+ context.getViewRoot().getLocale());
+ String msg = "";
+ // if number is bigger, get appropriate message
+ if ( userNumber.intValue() > randomNumber )
+ msg = bundle.getString("tryagain_smaller");
+ else // if number smaller, get appropriate message
+ msg = bundle.getString("tryagain_bigger");
+
+ // add message to be displayed on the page via <h:messages> tag
+ context.addMessage (null, new FacesMessage(msg));
+ // return 'tryagain' for navigation
+ return "tryagain";
+ }
+ }
+}
+]]></programlisting>
+ </section>
+
+ <section id="EditingFacesConfig">
+ <?dbhtml filename="EditingFacesConfig.html"?>
+ <title>Editing faces-config.xml File</title>
+ <para>In this section you know about faces-config.xml file.</para>
+ <para>This file holds two navigation rules and defines the backing bean used.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open faces-config.xml file in a source mode</para>
+ </listitem>
+ <listitem>
+ <para>Add here one more navigation rule and a managed bean declarations that the
+ content of the file looks like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee
+xmlns:xi="http://www.w3.org/2001/XInclude"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2_.xsd">
+
+ <navigation-rule>
+ <from-view-id>*</from-view-id>
+ <navigation-case>
+ <from-outcome>playagain</from-outcome>
+ <to-view-id>/pages/inputnumber.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/pages/inputnumber.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/pages/success.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <managed-bean>
+ <managed-bean-name>NumberBean</managed-bean-name>
+ <managed-bean-class>game.NumberBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+</faces-config>
+]]></programlisting>
+ <para>The first navigation rule states that from any page (<property moreinfo="none">*</property> stands for
+ any page) an outcome of playagain will take you to <emphasis>
+ <property moreinfo="none">/pages/inputnumber.jsp</property>
+ </emphasis>. Outcome values are returned from backing bean methods in this example. The
+ second navigation rule states that if you are at the page <emphasis>
+ <property moreinfo="none">/pages/inputnumber.jsp</property>
+ </emphasis>, and the outcome is success, then navigate to the <emphasis>
+ <property moreinfo="none">/pages/success.jsp</property>
+ </emphasis> page. </para>
+ </section>
+ <section id="EditingTheJSPViewFiles2">
+ <?dbhtml filename="EditingTheJSPViewFiles2.html"?>
+ <title>Editing the JSP View Files</title>
+ <para>Now, we will continue editing the JSP files for our two "views" using
+ Visual Page Editor.</para>
+ <section id="EditingInputjsp">
+ <?dbhtml filename="EditingInputjsp.html"?>
+ <title>Editing inputnumber.jsp page</title>
+ <para>First, let's dwell on how to edit inputnumber.jsp.</para>
+ <para>On this page we will have an output text component displaying a message, a text
+ field for user's number entering and a button for input submission.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open inputnumber.jsp by double-clicking on the <emphasis>
+ <property moreinfo="none">/pages/inputnumber. jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ </itemizedlist>
+ <para>The Visual Page Editor will open in a screen split between source code along the
+ top and a WYSIWIG view along the bottom. You can see that some JSF code will be
+ already generated as we choose a template when creating the page.</para>
+ <para>At the beginning it's necessary to create a <emphasis role="bold">
+ <property moreinfo="none"><h:form></property>
+ </emphasis> component where all others components are put.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Place the mouse cursor inside <emphasis role="bold">
+ <property moreinfo="none"><f:view></property>
+ </emphasis><emphasis role="bold">
+ <property moreinfo="none"></f:view></property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Go to JBoss Tools Palette and expand JSF HTML folder by selecting
+ it</para>
+ </listitem>
+ <listitem>
+ <para>Click on <emphasis role="bold">
+ <property moreinfo="none"><h:form></property>
+ </emphasis> tag <figure float="0">
+ <title>Insert h:form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>In the dialog Insert Tag select <emphasis>
+ <property moreinfo="none">id</property>
+ </emphasis> and click on this line below the value header. A blinking cursor
+ will appear in a input text field inviting to enter a value of id <figure float="0">
+ <title>Define Id of Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">inputNumbers</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>In source view you can see the declaration of a form.</para>
+ <figure float="0">
+ <title>Created Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>First let's declare the properties file in inputnumber.jsp page using the
+ loadBundle JSF tag.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Put this declaration on the top of a page, right after the first two
+ lines:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<f:loadBundle basename="game.messages" var="msg"/>
+]]></programlisting>
+ <para>As always JBDS provides code assist:</para>
+ <figure float="0">
+ <title>Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Visual tab, so it could be possible to work with the editor
+ completely in its WYSIWYG mode</para>
+ </listitem>
+ <listitem>
+ <para>Click on <emphasis>
+ <property moreinfo="none">outputText</property>, </emphasis> drag the cursor over to the
+ editor, and drop it inside the blue box in the editor</para>
+ </listitem>
+
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ </itemizedlist>
+ <para>JBDS will nicely propose you to choose within available values:</para>
+ <figure float="0">
+ <title>Choose Value</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Resource Bundles > msg</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">how_to_play</property>
+ </emphasis> value and click <emphasis>
+ <property moreinfo="none">Ok</property>. </emphasis> Then click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis>
+ <figure float="0">
+ <title>Selecting Value</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>The text will appear on the page:</para>
+ <figure float="0">
+ <title>Created OutputText Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Source mode and insert <emphasis role="bold">
+ <property moreinfo="none"><br/></property>
+ </emphasis> tag after <emphasis role="bold">
+ <property moreinfo="none"><h:outputText></property>
+ </emphasis> component to make a new line.</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette click on <emphasis>
+ <property moreinfo="none">inputText</property>, </emphasis> drag the cursor over to the
+ editor, and drop it inside the editor after the text.</para>
+ </listitem>
+ <listitem>
+ <para>Switch to a Source mode and insert <emphasis role="bold">
+ <property moreinfo="none"><br/></property>
+ </emphasis> tag after <emphasis role="bold">
+ <property moreinfo="none"><h:outputText></property>
+ </emphasis> component to make a new line</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette click on <emphasis>
+ <property moreinfo="none">inputText</property>, </emphasis> drag the cursor over to the
+ editor, and drop it inside the editor after the text</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Managed Beans > NumberBean</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">userNumber</property>
+ </emphasis> value and click <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Switch <emphasis>
+ <property moreinfo="none">Advanced</property>
+ </emphasis> tab</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">id</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">userNumber</property>
+ </emphasis> in text field</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">required</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Enumeration</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">true</property>
+ </emphasis> as a value</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Add "required" Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Ok</property>, </emphasis> then click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Go to Source mode</para>
+ </listitem>
+ <listitem>
+ <para>Add the validation attribute to <emphasis role="bold">
+ <property moreinfo="none"><f:validateLongRange></property>
+ </emphasis> for user input validation</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
+ <f:validateLongRange minimum="0" maximum="100"/>
+</h:inputText>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Again select <emphasis>
+ <property moreinfo="none">Visual</property>
+ </emphasis> mode</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette, click on <emphasis>
+ <property moreinfo="none">commandButton</property>, </emphasis> drag the cursor over to
+ the editor, and drop it inside the editor after the inputText
+ component.</para>
+ </listitem>
+ <listitem>
+ <para>In the editing dialog select <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Resource Bundles > msg</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">makeguess_button</property>
+ </emphasis> as a value</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">action</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">NumberBean.checkGuess</property>
+ </emphasis> in text field</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In Source mode add <emphasis role="bold">
+ <property moreinfo="none"><br/></property>
+ </emphasis> tags between <emphasis role="bold">
+ <property moreinfo="none"><outputText></property>
+ </emphasis>, <emphasis role="bold">
+ <property moreinfo="none"><inputText></property>
+ </emphasis> and <emphasis role="bold">
+ <property moreinfo="none"><commandButton></property>
+ </emphasis> components to place them on different lines</para>
+ </listitem>
+ </itemizedlist>
+ <para>inputnumber.jsp page should look like this:</para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<f:loadBundle basename="game.messages" var="msg"/>
+
+<html>
+ <f:view>
+ <h:form id="inputNumbers">
+ <h:outputText value="#{msg.how_to_play}"/>
+ <br/>
+ <h:messages style="color: blue"/>
+ <br/>
+ <h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
+ <f:validateLongRange minimum="0" maximum="100"/>
+ </h:inputText>
+ <br/><br/>
+ <h:commandButton value=
+ "#{msg.makeguess_button}" action="#{NumberBean.checkGuess}"/>
+ </h:form>
+ </f:view>
+</html>
+]]></programlisting>
+ </section>
+ <section id="EditingSuccessJsp">
+ <?dbhtml filename="EditingSuccessJsp.html"?>
+ <title>Editing success.jsp page</title>
+ <para>In the same way like inputnumber.jsp, edit success.jsp page. Its whole source
+ should be the next:</para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<f:loadBundle basename="game.messages" var="msg"/>
+
+<html>
+ <f:view>
+ <h:form id="result">
+ <h:outputFormat value="#{msg.success_text}">
+ <f:param value="#{NumberBean.userNumber}"/>
+ </h:outputFormat>
+ <br/><br/>
+ <h:commandButton value=
+ "#{msg.trayagain_button}" action="#{NumberBean.playagain}"/>
+ </h:form>
+ </f:view>
+</html>
+]]></programlisting>
+ <para>Again you can use code assist provided by JBDS when editing jsp page:</para>
+ <figure float="0">
+ <title>Code Assist for <f:param></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_18.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This page, success.jsp, is shown if you correctly guessed the number. The
+ <emphasis role="bold">
+ <property moreinfo="none"><h:outputFormat></property>
+ </emphasis> tag will get the value of success_text from the properties file. The {0}
+ in success_text will be substituted for by the value of the value attribute within
+ the <emphasis role="bold">
+ <property moreinfo="none"><f:param></property>
+ </emphasis> tag during runtime.</para>
+ <para>At the end, you have a button which allows you to replay the game. The action
+ value references a backing bean method. In this case, the method only terminates the
+ current session so that when you are shown the first page, the input text box is
+ clear and a new random number is generated.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Preview mode to see how this page will look in a browser:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Success.jsp in Preview Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ <section id="CreatingIndexjsp">
+ <?dbhtml filename="CreatingIndexjsp.html"?>
+ <title>Creating index.jsp page</title>
+ <para>Now you know how to create index.jsp page.</para>
+ <para>The index.jsp page is the entry point of our application. It's just
+ forwarding to inputnumber.jsp page.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">WebContent > New > JSP File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">index</property>
+ </emphasis> for name field and choose <emphasis>
+ <property moreinfo="none">JSPRedirect</property>
+ </emphasis> as a template</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>The source for this page should be like the following:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+ <body>
+ <jsp:forward page="/pages/inputnumber.jsf" />
+ </body>
+</html>
+
+]]></programlisting>
+ <para>Note the <emphasis>.jsf</emphasis> extension of a page. It means that we trigger the
+ JSF controller servlet to handle the page according the servlet mapping in the
+ faces-config.xml file.</para>
+ </section>
+ <section id="RunningTheApplication33">
+ <?dbhtml filename="RunningTheApplication33.html"?>
+ <title>Running the Application</title>
+ <para>Finally, we have all the pieces needed to run the application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Start up JBoss server by clicking on the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> icon in JBoss Server view. (If JBoss is already running, stop it by
+ clicking on the red icon and then start it again. After the messages in the
+ Console tabbed view stop scrolling, JBoss is available)</para>
+ </listitem>
+ <listitem>
+ <para>Right-click on project <emphasis>
+ <property moreinfo="none">Run AS > Run on Server</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Play with the application by entering correct as well as incorrect
+ values</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>You are Asked to Enter a Number Between 0 and 100</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Your Input is Validated and an Error Message is Displayed if Invalid Input was
+ Entered</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_21.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>After You Enter a Guess, the Application Tells You Whether a Smaller or a Larger
+ Number Should be Tried</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_22.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Your Guess is Correct</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_23.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+
+
+<chapter diffmk:change="added" id="project_examples" role="new" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/project_examples.xml" xreflabel="project_examples">
+ <?dbhtml filename="project_examples.html"?>
+ <chapterinfo diffmk:change="added">
+ <keywordset diffmk:change="added">
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></keyword>
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">Eclipse</diffmk:wrapper></keyword>
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">Java</diffmk:wrapper></keyword>
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss</diffmk:wrapper></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Project Examples</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> provides an option to download and import a ready-made
+ project that you can explore and derive some useful technology implementation lessons. </diffmk:wrapper></para>
+
+
+ <section diffmk:change="added" id="DownloadingProjectExample">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Downloading a Project Example</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To download a project example and start working with it you need to take a few steps:</diffmk:wrapper></para>
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Go to the menu bar and select </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">File > New > Other...</diffmk:wrapper></property></emphasis>
+ </para></listitem>
+
+ <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Select </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Jboss Tools > Project Examples</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">(You can also call the </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Examples</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> from menu bar: </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Help > Project Examples...</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added">)</diffmk:wrapper></para></listitem>
+
+
+ </itemizedlist>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Project Examples</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/project_examples/pr_example_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Now in the New Project Example dialog you can select a project you would like to explore</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Project Examples Wizard provides a filter field to more easily locate the project examples you want, so you can type in the project you would like to explore in the field.</diffmk:wrapper></para></listitem>
+
+ </itemizedlist>
+
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Selecting a Project Example</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/project_examples/pr_example_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">
+ The </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Show the Quick Fix Dialog</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> option is described in the </diffmk:wrapper><link diffmk:change="added" linkend="QuickFixes"><diffmk:wrapper diffmk:change="added">Quick Fixes</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> section.
+ </diffmk:wrapper></para>
+ </note>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Press </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> to start downloading the project from the repository
+ </diffmk:wrapper></para></listitem>
+
+ </itemizedlist>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">When downloading is finished the project will be imported automatically and you will be able to see it in the Package Explorer.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Now you can run the application on the server.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Seam Demo Application run on the Server</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/project_examples/pr_example_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="QuickFixes">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Quick Fixes</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">
+ Project Examples Wizard has an option for making quick fixes
+ for the imported project to easily fix possible issues like missing servers, Seam runtimes etc.
+ </diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To enable quick fixing option you need to check the
+ </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Show the Quick Fix dialog</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> while choosing the </diffmk:wrapper><link diffmk:change="added" linkend="DownloadingProjectExample"><diffmk:wrapper diffmk:change="added">Project Example</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">When the project you selected is downloaded it will be checked for missing dependences and if there are some you will see a dialog listing the problems.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Quick Fix Dialog box</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/project_examples/pr_example_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To fix the problem you need to:</diffmk:wrapper></para>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Select the problem from the list</diffmk:wrapper></para></listitem>
+ <listitem diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Quick Fix</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> button</diffmk:wrapper></para></listitem>
+ </itemizedlist>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You will be offered a solution or a number of solutions to the problem.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Quick Fix Dialog box: Selecting a Fix</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/project_examples/pr_example_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">In this case(see the image above), when the </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> button is pressed, Seam Settings dialog box will be displayed where you need to provide a path to the Seam environment to fix the issue.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">When the problem is fixed you will be returned to the Quick Fix dialog box with the remaining problems to be fixed.</diffmk:wrapper></para>
+
+ </section>
+
+
+</chapter>
+
+
+
+<chapter diffmk:change="added" id="gsg_faq" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml" xreflabel="gsg_faq">
+ <?dbhtml filename="gsg_faq.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>FAQ</title>
+
+ <para>For more information on <property moreinfo="none">JBoss Developer Studio</property> features, refer to the
+ following FAQ to get the answers on the most "popular" questions.</para>
+
+ <section id="question_1">
+ <title>What should I do if Visual Page Editor does not start under Linux</title>
+
+ <para>Linux users may need to do the following to get the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Visual Page
+ Editor</diffmk:wrapper></property> to work correctly on their machines.</para>
+
+ <orderedlist continuation="restarts" inheritnum="ignore">
+ <listitem>
+ <para>On Red Hat based Linux distributions install the xpLib.i386 package</para>
+ </listitem>
+ <listitem>
+ <para>Type</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>and/or use</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[yum install libXp
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>Open the JBDS perspective. If you see the Help view open, close it and restart
+ JBDS</para>
+ </listitem>
+ <listitem>
+ <para>If none of these work, do the following:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Clear the Eclipse log file,
+ <emphasis><workspace>\.metadata\.log</emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Start Eclipse with the -debug option:</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[eclipse -debug
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>Post the Eclipse log file
+ (<emphasis><workspace>\.metadata\.log</emphasis>) on
+ the forums.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section id="question_2">
+ <title>Do I need to have JBoss Server installed to run JBoss Developer Studio?</title>
+
+ <para>No. <property moreinfo="none">JBoss Developer Studio</property> already comes bundled with JBoss
+ Server. We bundle it together so that you don't need to download any additional
+ software and can test your application in a Web browser right away.</para>
+ <para>If you want to use a different JBoss server installation, after <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss
+ Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> is installed open Servers View (select
+ </diffmk:wrapper><emphasis><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Window > Show View > Others > Server
+ > Servers</diffmk:wrapper></property>),</emphasis><diffmk:wrapper diffmk:change="changed"> then right click on this </diffmk:wrapper><emphasis>
+ <property moreinfo="none">view > New > Server</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> and follow the wizards steps to point to another Jboss Server
+ installation.</diffmk:wrapper></para>
+ <para><property moreinfo="none">JBoss Developer Studio</property><diffmk:wrapper diffmk:change="changed"> works with any servlet container, not just
+ JBoss. For more information on deployment, please see the Deploying Your Application
+ section.</diffmk:wrapper></para>
+ </section>
+
+ <section id="question_3">
+ <title><diffmk:wrapper diffmk:change="changed">I have an existing Seam 1.2.1 project. Can I migrate/import the project to a JBDS
+ Seam project?</diffmk:wrapper></title>
+
+ <para><diffmk:wrapper diffmk:change="changed">We highly recommend you to create Seam 1.2.1 project using the
+ </diffmk:wrapper><property moreinfo="none">JBDS</property><diffmk:wrapper diffmk:change="changed">. In other case try to do manually:</diffmk:wrapper></para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Create a Seam Web project to get the JBoss tools structure</para>
+ </listitem>
+ </itemizedlist>
+ <para>Then from your Seam 1.2.1 seam-gen project start doing the following:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Copy <property moreinfo="none">src</property> to <property moreinfo="none">src</property></para>
+ </listitem>
+ <listitem>
+ <para>Copy <property moreinfo="none">view</property> to <property moreinfo="none">Web content</property></para>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">Copy resources individual files to where they are in the seam web project
+ etc.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section id="questio_4">
+ <title><diffmk:wrapper diffmk:change="changed">I have an existing Struts or JSF project. Can I open the project in JBDS?</diffmk:wrapper></title>
+
+ <para>Yes. From main menu select <emphasis>
+ <property moreinfo="none">File > Import > Other > JSF Project (or Struts
+ Project)</property>
+ </emphasis> and follow wizards steps.</para>
+
+ </section>
+
+ <section id="question_5">
+ <title>Can I import a .war file?</title>
+
+ <para>Yes. Select <emphasis><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">File > Import > Web > WAR
+ file</diffmk:wrapper></property>, </emphasis> then follow importing steps.</para>
+ </section>
+
+ <section id="question_6">
+ <title><diffmk:wrapper diffmk:change="changed">Is it possible to increase the performance of Eclipse after installing your
+ product?</diffmk:wrapper></title>
+
+ <para><property moreinfo="none">JBoss Developer Studio</property><diffmk:wrapper diffmk:change="changed"> preconfigures eclipse via the eclipse.ini
+ file to allocate extra memory, but if you for some reason need more memory then by
+ default, you can manually make adjustments in this file. For example:</diffmk:wrapper></para>
+ <programlisting format="linespecific" role="XML">
+ <![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
+]]></programlisting>
+ </section>
+
+ <section id="question_7">
+ <title><diffmk:wrapper diffmk:change="changed">How can I add my own tag library to the JBoss Tools Palette?</diffmk:wrapper></title>
+
+ <para>See <ulink url="../../jsf/html_single/index.html#AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag
+ Libraries</ulink> in Visual Web Tools Guide.</para>
+ </section>
+
+ <section id="question_8">
+ <title>How to get Code Assist for Seam specific resources in an externally generated
+ project?</title>
+
+ <para>To get Code Assist for Seam specific resources in an externally generated project, you
+ should enable Seam features in Project Preferences. Right click an imported project and
+ navigate <emphasis>
+ <property moreinfo="none">Properties > Seam Settings</property>.</emphasis> Check <emphasis>
+ <property moreinfo="none">Seam support</property>
+ </emphasis> box to enable all available <ulink url="../../seam/html_single/index.html#project_pref">Seam
+ Settings</ulink>.</para>
+ </section>
+
+ <section id="question_9">
+ <title>How to import an example Seam project from jboss-eap directory?</title>
+
+ <para>To import an example Seam project from <emphasis>
+ <property moreinfo="none">jboss-eap</property>
+ </emphasis> into your working directory, you should perform the following steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Go to <emphasis>
+ <property moreinfo="none">New > Other > Java Project from Existing Buildfile</property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem>
+ <para>Point to the <emphasis>
+ <property moreinfo="none">build.xml</property>
+ </emphasis> of any chosen project by pressing <emphasis>
+ <property moreinfo="none">Browse</property>
+ </emphasis> button</para>
+ </listitem>
+
+ <listitem>
+ <para>Hit <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to open the project</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>As these seam examples are non WTP projects, next you should enable Seam support for
+ them. To do that, right click the project and go to <emphasis>
+ <property moreinfo="none">Properties > Seam Settings</property>.</emphasis></para>
+ </section>
+
+ <section diffmk:change="added" id="question_10">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Is a cross-platform project import possible for JBDS?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Yes. You can easily import created in Linux JSF, Struts or Seam project to Windows and
+ vice versa.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To do the transferring JSF, Struts or Seam project, go to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Menu > Import > General > Existing Projects into Workspace</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">,</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added">
+ select the folder where your project stored and press </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis></para>
+ </section>
+</chapter>
+
+
+<chapter id="further_reading" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml" xreflabel="further_reading">
+ <?dbhtml filename="further_reading.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Further Reading</title>
+
+ <para>
+ <emphasis role="bold">JSF Tools Reference Guide</emphasis>
+ <ulink url="../../jsf_tools_ref_guide/html_single/index.html">(html)</ulink>
+
+ </para>
+ <para> From this guide you'll discover all peculiarities of work at a JSF project. You'll
+ learn all shades that cover the process of project creation and take a closer look at the JSF
+ configuration file. Also you'll get to know managed beans and how to work with them and
+ find out, how to create and register a custom converter, custom validator and referenced beans
+ in a JSF project. </para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">JSF Tools Tutorial</emphasis>
+ <ulink url="../../jsf_tools_tutorial/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This tutorial will describe how to deal with classic/old style of JSF development and how
+ to create a simple JSF application using the JBoss Developer Studio. </para>
+ </listitem>
+
+ <listitem> <para>
+ <emphasis role="bold">Struts Tools Reference Guide</emphasis>
+ <ulink url="../../struts_tools_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para> In Struts Tools Reference Guide you will learn how to create and work with a new struts
+ project. This guide also provides information about graphical editor for struts configuration
+ files, tiles files, and struts validation files. </para>
+ </listitem>
+
+<listitem>
+ <para>
+ <emphasis role="bold">Struts Tools Tutorial</emphasis>
+ <ulink url="../../struts_tools_tutorial/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This tutorial will describe the classical style of Struts development, and will
+ step-by-step show you how to create a simple Struts application in JBoss Developer Studio.</para>
+</listitem>
+
+<listitem>
+ <para>
+ <emphasis role="bold">Seam Dev Tools Reference Guide</emphasis>
+ <ulink url="../../seam/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This guide helps you to understand what Seam is and how to install Seam plug-in into
+ Eclipse. It tells you the necessary steps to start working with Seam Framework and assists in a
+ simple Seam Project creation. Also you will learn how to create and run the CRUD Database
+ Application with Seam as well as find out what Seam Editors Features and Seam Components are. </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">Visual Web Tools Reference Guide</emphasis>
+ <ulink url="../../jsf/html_single/index.html">(html)</ulink>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">JBoss Server Manager Reference Guide</emphasis>
+ <ulink url="../../as/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This guide covers the basics of working with the JBoss server manager. You will read how to
+ install runtimes and servers and quickly learn how to configure, start, stop the server and know
+ how deployment and archiving process. You will find out how to manage installed JBoss Servers
+ via JBoss AS Perspective. You will also read how to deploy modules onto the server. </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">jBPM Tools Reference Guide</emphasis>
+ <ulink url="../../jbpm/html_single/index.html">(html)</ulink>
+ </para>
+ <para>With jBPM Tools Reference Guide we'll help you to facilitate a cross-product
+ learning and know how you can speed your development using special editors and visual designers.
+ We'll also guide you through the steps on how to create a simple process and test it
+ within jBPM jPDL perspective.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">Hibernate Tools Reference Guide</emphasis>
+ <ulink url="../../hibernatetools/html_single/index.html">(html)</ulink>
+ </para>
+ <para>Throughout this guide you will learn how to install and use Hibernate Tools bath via Ant and
+ through Eclipse. We'll supply you with the information on how to create mapping files,
+ configuration file as well as a file for controlling reverse engineering by using specific
+ wizards that Hibernate tooling provides. Also you will know about Code Generation and
+ peculiarities of work within Hibernate Console Perspective.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">ESB Editor Reference Guide</emphasis>
+ <ulink url="../../esb_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para>This guide provides you with the information on ESB Editor which allows you to develop ESB
+ file.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">JBoss Portal Tools Reference Guide</emphasis>
+ <ulink url="../../jboss_portal_tools_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para>The guide gives a detail look at how you can easily build a Portlet Web Application with
+ JBoss Tools and deploy it onto JBoss Portal.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">JBoss WS User Guide</emphasis>
+ <ulink url="../../ws_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para>This guide gives you practical help on JBossWS usage.</para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <emphasis role="bold">Exadel Studio Migration Guide</emphasis>
+ <ulink url="../../Exadel-migration/html_single/index.html">(html)</ulink>
+ </para>
+ <para>This document is intended to help you to migrate an existing Exadel JSF or Struts projects
+ from Exadel Studio into JBoss Developer Studio. </para>
+ </listitem>
+
+</itemizedlist>
+</chapter>
+
+
+</book>
15 years, 11 months
JBoss Tools SVN: r13333 - branches/jbosstools-3.0.0.CR2/documentation/guides/Exadel-migration/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 12:32:35 -0500 (Thu, 29 Jan 2009)
New Revision: 13333
Added:
branches/jbosstools-3.0.0.CR2/documentation/guides/Exadel-migration/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571- adding the master_output.xml;
Added: branches/jbosstools-3.0.0.CR2/documentation/guides/Exadel-migration/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.CR2/documentation/guides/Exadel-migration/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.CR2/documentation/guides/Exadel-migration/en/master_output.xml 2009-01-29 17:32:35 UTC (rev 13333)
@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY jsf_struts SYSTEM "modules/jsf_struts.xml">
+<!ENTITY jsf_struts_war SYSTEM "modules/jsf_struts_war.xml">
+<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY workspace SYSTEM "modules/workspace.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Exadel Studio Migration Guide</title>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+Version: 2.0.0.CR2
+</diffmk:wrapper></releaseinfo>
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/Exadel-migration/pdf...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/introduction.xml" xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Exadel Studio Pro</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction </title>
+ <para>This document is intended to help you to migrate an existing Exadel JSF or Struts projects
+ into <property moreinfo="none">JBoss Developer Studio</property>. Preferences can be exported from Eclipse 3.2.0 (3.2.1 or 3.2.2) and imported in Eclipse 3.3 by the standard Eclipse means.
+ </para>
+<section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+</section>
+
+ </chapter>
+
+
+<chapter id="workspace" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/workspace.xml" xreflabel="workspace">
+ <?dbhtml filename="workspace.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Exadel Studio Pro</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Migrate workspace</title>
+ <para>You will not be able to run projects in JBoss Developer Studio
+ using <property moreinfo="none">Exadel Studio workspace</property>. In this case, project capabilities and settings specified in Exadel Studio will be lost. The simplest way to avoid this, is to copy your projects in <property moreinfo="none">JBoss Developer Studio workspace</property> and make an import as it is described in the following chapters.</para>
+</chapter>
+
+
+<chapter id="jsf_struts" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml" xreflabel="jsf_struts">
+ <?dbhtml filename="jsf_struts.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Exadel Studio Pro</keyword>
+ <keyword>Migration</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Migration of JSF and Struts Projects</title>
+ <para>In this chapter you can find concise description of migration of JSF and Struts Projects.</para>
+ <section id="import_jsf">
+ <title>JSF</title>
+ <para>JBoss Developer Studio includes an Import <property moreinfo="none">JSF Project</property> Wizard that radically simplifies the process of bringing your existing JSF applications
+ into your JBoss Developer Studio workspace as JSF projects. You just need to follow these four steps:</para>
+ <itemizedlist>
+ <listitem><para><emphasis><property moreinfo="none">Select File > Import...</property></emphasis> from the menu bar, and then select <emphasis><property moreinfo="none">Other > JSF Project </property></emphasis>from the Import dialog box that appears.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the Import JSF Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the first screen of the wizard, select the <emphasis><property moreinfo="none">Change...</property></emphasis> button next to the <emphasis><property moreinfo="none">web.xml Location</property></emphasis> field. Browse to the location of the web.xml file for the application you
+ want to import as a <property moreinfo="none">JSF project</property>. Once you select it, you'll be returned to the dialog box to see a project name derived from the web.xml file you selected.
+ You can edit this project name, if you wish.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Web.xml File in the Project Location Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist id="import_jsf_screen">
+ <listitem><para>In the <emphasis><property moreinfo="none">Project Folders</property></emphasis> screen, you can configure the rest of your project. Afterwards click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para></listitem>
+ </itemizedlist>
+ <para>On this step JBoss Developer Studio will try to determine your project
+ structure and set the values for: <emphasis><property moreinfo="none">Web Root</property></emphasis>, <emphasis><property moreinfo="none">Source Folder</property></emphasis>, <emphasis><property moreinfo="none">Classes Folder</property></emphasis>, <emphasis><property moreinfo="none">Lib Folder</property></emphasis>. If your project has a custom structure, some values might not be
+ set. If this is the case, you can manually set those values by clicking the <emphasis><property moreinfo="none">Change...</property></emphasis> button.</para>
+ <para>After dealing with these settings, you have to work through a few more configuration settings. These settings deal primarily with how the project will be deployed within JBoss Developer Studio.</para>
+ <para>First, if the project you are importing is not already a JSF project, select the <emphasis><property moreinfo="none">Add Libraries</property></emphasis> check box to add all the JSF-related libraries to your project. </para>
+ <para>Then, you may select the JavaServer Faces implementation (<emphasis><property moreinfo="none">Environment</property></emphasis>) and <emphasis><property moreinfo="none">Servlet Version</property></emphasis>.</para>
+ <para>The <emphasis><property moreinfo="none">Context Path</property></emphasis> is the name under which the application will be deployed. </para>
+ <para>The <emphasis><property moreinfo="none">Runtime</property></emphasis> value tells Eclipse where to find Web libraries in order to build the project. It is not possible to finish the importing of a project without selecting a Runtime. If you don't have any choices displayed for this, select <emphasis><property moreinfo="none">New...</property></emphasis> to add a new Runtime.</para>
+ <para>Finally, <emphasis><property moreinfo="none">Target Server</property></emphasis> sets the server to deploy the application under. The Target Server corresponds to the Runtime value selected above. If you don't want to deploy the application, uncheck this value.</para>
+
+
+ <figure float="0">
+ <title>The Project Folders Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Once the project is imported, it will appear in the Package Explorer view.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Imported Project in the Package Explorer View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section>
+ <title>Struts</title>
+ <itemizedlist>
+ <listitem><para><emphasis><property moreinfo="none">Select File > Import...</property></emphasis> from the menu bar, and then select <emphasis><property moreinfo="none">Other > Struts Project</property></emphasis> from the Import dialog box that appears.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the Import Struts Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the Project Location screen of the wizard, select the <emphasis><property moreinfo="none">Change... </property></emphasis>button next to the <emphasis><property moreinfo="none">web.xml Location</property></emphasis> field. Browse the location of the web.xml file for the application you
+ want to import as a <property moreinfo="none">Struts project</property>. Once you select it, you'll be returned to the dialog box to see a project name derived from the web.xml file you selected.
+ You can edit this project name, if you wish.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The Project Location Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the next screen, JBoss Developer Studio will try to determine your project structure. The upper pane shows the modules in this project.
+ The lower pane allows you to edit the details of the select module. If the project structure is non-standard, some values might be left blank.
+ You can edit any values by hand or by using the <emphasis><property moreinfo="none">Change...</property></emphasis> button.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The Project Modules Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the <emphasis><property moreinfo="none">Project Folders</property></emphasis> screen, you can configure the rest of your project. Afterwards click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>On this step JBoss Developer Studio will try to determine your project structure and set the values for: <emphasis><property moreinfo="none">Classes Folder</property></emphasis>, <emphasis><property moreinfo="none">Lib Folder</property></emphasis>, and <emphasis><property moreinfo="none">Ant Build File</property></emphasis>. If your project has a custom structure, some values might not be set. If this is the case, you can manually set those values by clicking <emphasis><property moreinfo="none">Change</property></emphasis>.</para>
+ <para>After dealing with these settings, you have to work through a few more configuration settings. These settings deal primarily with how the project will be deployed within JBoss Developer Studio.</para>
+ <para>First, if the project you are importing is not already a Struts project, select the <emphasis><property moreinfo="none">Add Libraries</property></emphasis> check box to add all the Struts-related libraries to your project. </para>
+ <para>Then, you may select the Struts <emphasis><property moreinfo="none">Environment</property></emphasis> and <emphasis><property moreinfo="none">Servlet Version</property></emphasis>.</para>
+ <para>The <emphasis><property moreinfo="none">Context Path</property></emphasis> is the name under which the application will be deployed. </para>
+ <para>The <emphasis><property moreinfo="none">Runtime</property></emphasis> value tells Eclipse where to find Web libraries in order to build the project. It is not possible to finish the importing of a project without selecting a Runtime. If you don't have any choices displayed for this, select<emphasis><property moreinfo="none"> New...</property></emphasis> to add a new Runtime.</para>
+ <para>Finally, <emphasis><property moreinfo="none">Target Server</property></emphasis> sets the server to deploy the application under. The Target Server corresponds to the Runtime value selected above. If you don't want to deploy the application, uncheck this value.</para>
+
+
+ <figure float="0">
+ <title>The Project Folders Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Once the project is imported, it will appear in the Package Explorer view.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Imported Project in the Package Explorer View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+</chapter>
+
+
+<chapter id="jsf_struts_war" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts_war.xml" xreflabel="jsf_struts_war">
+ <?dbhtml filename="jsf_struts_war.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+
+ <keyword>JBDS</keyword>
+
+ <keyword>Exadel Studio Pro</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Migrate JSF and Struts projects from *.war file</title>
+ <para>After you familiarized oneself with last chapter you can read this chapter. It looks as if you read in last chapter.</para>
+ <section>
+ <title>JSF</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis><property moreinfo="none">File > Import...</property></emphasis> from the menu bar, and then select
+ <emphasis><property moreinfo="none">Other > JSF Project From *.war</property></emphasis> from the Import dialog box that
+ appears.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the JSF Project From *.war Import Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the wizard screen, select the <emphasis><property moreinfo="none">Change...</property></emphasis> button next to
+ the <emphasis><property moreinfo="none">*.war Location</property></emphasis> field. Browse to the location of the *.war file for
+ the application you want to import as a JSF project. Once you select
+ it, you'll be returned to the dialog box to see a project name
+ derived from the *.war file you selected. You can edit this name, if
+ you wish.</para>
+
+ <para>Uncheck the <emphasis><property moreinfo="none">Use Default Path</property></emphasis> check box if you want to import
+ your project outside of the Eclipse workspace. In this case, you would
+ use <emphasis><property moreinfo="none"> Change... </property></emphasis> button next to the <emphasis><property moreinfo="none">Location</property></emphasis> field to choose a
+ location.</para>
+
+ <para><emphasis><property moreinfo="none">Context Path</property></emphasis> is the name under which the application will be
+ deployed.</para>
+
+ <para>The <emphasis><property moreinfo="none">Runtime</property></emphasis> value tells Eclipse where to find Web libraries in
+ order to build the project. It is not possible to finish project
+ import without selecting Runtime. If you don't have any options
+ here, select <emphasis><property moreinfo="none">New...</property></emphasis> to add a new Runtime.</para>
+
+ <para>Finally, <emphasis><property moreinfo="none">Target Server</property></emphasis> sets the server to deploy the application
+ under. The Target Server corresponds to the Runtime value selected
+ above. If you don't want to deploy the application, uncheck this
+ value.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The JSF Project From *.war Import Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Struts</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis><property moreinfo="none">File > Import...</property></emphasis> from the menu bar, and then select
+ <emphasis><property moreinfo="none">Other > Struts Project From *.war</property></emphasis> from the Import dialog box that
+ appears.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the Struts Project From *.war Import Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Follow the same steps as with the JSF Project From <property moreinfo="none">*.war</property> import
+ wizard.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The Struts Project From *.war Import Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The migration process is completed</para>
+ </section>
+</chapter>
+
+
+</book>
15 years, 11 months
JBoss Tools SVN: r13332 - branches/jbosstools-3.0.0.CR2/birt/docs/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 12:31:49 -0500 (Thu, 29 Jan 2009)
New Revision: 13332
Added:
branches/jbosstools-3.0.0.CR2/birt/docs/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571- adding the master_output.xml;
Added: branches/jbosstools-3.0.0.CR2/birt/docs/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.CR2/birt/docs/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.CR2/birt/docs/en/master_output.xml 2009-01-29 17:31:49 UTC (rev 13332)
@@ -0,0 +1,538 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[
+<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY birt_support SYSTEM "modules/birt_support.xml">
+<!ENTITY birt_designer SYSTEM "modules/birt_designer.xml">
+
+
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Birt Plugin Reference Guide</title>
+
+ <author><firstname>Anastasiya</firstname><surname>Bogachuk</surname><email>abogachuk(a)exadel.com</email></author>
+
+
+ <pubdate>August 2008</pubdate>
+ <copyright>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 1.0.0.CR1
+ </diffmk:wrapper></releaseinfo>
+
+
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/jboss_birt_plugin_re...">PDF version</ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+ <toc></toc>
+
+
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/birt/docs/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>BIRT</keyword>
+ <keyword>BIRT Plugin</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <section>
+
+ <title>What is BIRT?</title>
+ <para>BIRT plugin for JBoss Developer Studio is an Eclipse-based open source reporting
+ system for web applications based on Java and J2EE. BIRT consists of two main
+ components: a report designer based on Eclipse, and a runtime component that can be
+ added to your app server. BIRT also offers a charting engine that lets you add charts to
+ your own Web application.</para>
+ <para>With the help of BIRT you can generate a great number of reports to be used in your
+ application:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Lists</para>
+ </listitem>
+ <listitem>
+ <para>Charts</para>
+ </listitem>
+ <listitem>
+ <para>Crosstabs, or cross-tabulation, or matrix</para>
+ </listitem>
+ <listitem>
+ <para>Letters and Documents</para>
+ </listitem>
+ <listitem>
+ <para>Compound Reports</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>In this guide we provide you with the information on BIRT Designer which allows you to
+ create a report much faster and with far fewer errors so sparing your time.</para>
+
+ <literallayout class="normal" format="linespecific"> </literallayout>
+ <para>You can find detailed information on the BIRT report types and anatomy here: <ulink url="http://www.eclipse.org/birt/phoenix/intro/">JBoss BIRT</ulink></para>
+
+
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="esb_support" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/birt/docs/en/modules/birt_support.xml">
+ <?dbhtml filename="esb_support.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>BIRT</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>BIRT Support</title>
+
+ <para>In this section we will focus more on all concepts that JBoss Tools integrates for
+ working with BIRT.</para>
+
+ <section>
+ <title>BIRT Plugin Installation</title>
+
+ <para>This chapter will provide you with detailed information on how to install BIRT plugin into JBoss Developer Studio.</para>
+
+ <para>Since BIRT plugin is one of the modules of JBoss Tools project it has a dependence on other modules and will require their pre-installation. </para>
+
+ <para>These are the prerequisites to create a web project including Seam and BIRT capabilities:</para>
+ <itemizedlist>
+ <listitem><para>Eclipse Version 3.4 SDK</para></listitem>
+ <listitem><para>DTP Version 1.6 Release</para></listitem>
+ <listitem><para>EMF Version 2.4 Release EMF+XSD</para></listitem>
+ <listitem><para>GEF Version 3.4 Release runtime</para></listitem>
+ <listitem><para>WTP Version 3.0 Release</para></listitem>
+ <listitem><para><ulink url="http://repository.jboss.org/eclipse/birt/2.3.0/birt-report-framework-2_3_...">BIRT Report Designer SDK 2.3.0 Release</ulink> or BIRT Report Designer 2.3.0 Release</para></listitem>
+ <listitem><para>JBoss Application Server 4.2.2 GA</para></listitem>
+ <listitem><para>JBoss Seam 2.0.1 GA</para></listitem>
+ <listitem><para><ulink url="http://repository.jboss.org/eclipse/birt/2.3.0/birt-wtp-integration-sdk-2...">BIRT Web Tools Integration</ulink></para></listitem>
+ <listitem><para>JBoss Tools nightly build</para></listitem>
+
+ </itemizedlist>
+
+
+
+ </section>
+
+<section>
+
+ <title>JBoss BIRT Integration</title>
+ <para>To understand Hibernate configuration, integration with Seam, and deployment see <ulink url="http://docs.jboss.org/tools/whatsnew/birt/birt-news-1.0.0.Alpha1.html">JBoss BIRT Integration 1.0.0.alpha1 - New and Noteworthy</ulink>.</para>
+
+</section>
+
+ <section>
+ <title>Creating a BIRT Report</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating your own BIRT report.</para>
+
+ <section><title>Create a Report Project</title>
+
+ <para>First create a Report project. Select <emphasis><property moreinfo="none">File > New > Project...</property>
+ </emphasis> in the main menu bar or context menu. The new project dialog appears. Choose <emphasis><property moreinfo="none">Business Intelligence and Reporting Tools > Report Project</property></emphasis>:
+
+ <figure float="0">
+ <title>New Report Project Creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/01ReportProjectWizard.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ Click on the <emphasis><property moreinfo="none">Next</property></emphasis> button. Specify a name for the project and change location if necessary:</para>
+
+ <figure float="0">
+ <title>Specify a Name for the Report Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/02ProjectName.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button. Click <emphasis><property moreinfo="none">Ok</property></emphasis> to switch to the Report Design perspective. Your Report Project is now created:</para>
+
+
+ <figure float="0">
+ <title>New Report Project Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/03NewProjectCreated.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section> <title>Create a Report</title>
+ <para>Now you can create a Report. Go to <emphasis><property moreinfo="none">File > New > Report...</property></emphasis>:</para>
+
+ <figure float="0">
+ <title>Create a New Report</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/04NewReport.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The new report dialog appears. Select the created project as a parent folder in the tree view:</para>
+
+ <figure float="0">
+ <title>Select a Parent Folder</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/05SelectingParentFolder.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis><property moreinfo="none">Next</property></emphasis> button. Then select the type of the template to use for your report. Each template is shown in the Preview window and is described below. Tick off the "Show Report Creation Cheat Sheet" checkbox if you don't need the Cheat Sheets view to be displayed. The Cheat Sheets view can walk you though the process of creating a report based on the template you selected.
+
+ <figure float="0">
+ <title>Choose a Report Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/06ReportTemplate.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button to open the newly created report in the workspace:</para>
+
+ <figure float="0">
+ <title>Report Opened in the Workspace</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/07SimpleListingReport.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section>
+ <title>Build a Data Source</title>
+
+ <para>Data source is used to connect to the database. In order to create a data source for your report follow these steps:</para>
+ <para>Open the Data Explorer View. Select Data Sources, right-click on it and choose New Data Source:</para>
+
+
+ <figure float="0">
+ <title>Create a Data Source</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/08DataSource.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The New Data Source dialog appears. Choose the "Create from a data source type in the following list" radiobutton and then "Classic Models Inc. Sample Database". Click on the <emphasis><property moreinfo="none">Next</property></emphasis> button:</para>
+
+
+ <figure float="0">
+ <title>New Data Source</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/09NewDataSource.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The newly created data source details wll be displayed: Driver Class, Database URL and Database User:</para>
+
+ <figure float="0">
+ <title>New Data Source Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/10NewSampleDateSource.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button to add the data source to the data source for your report.</para>
+
+ <para>If you need to edit the data source right-click on it and select the corresponding option.</para>
+ </section>
+
+
+ <section><title>Build a Data Set</title>
+
+ <para>Data Set is a query to get and represent necessary column data from the data source specified. Select Data Sets in the tree view, right-click on it and select New Data Set:</para>
+
+ <figure float="0">
+ <title>Create a Data Set</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/11DataSet.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The New Data Set dialog will appear. Enter a name for the Data Set Name field and ensure that the Data Source field shows the data source already created and that the Data Set Type field is set to "SQL Select Query".
+ Then click on the <emphasis><property moreinfo="none">Next</property></emphasis> button:</para>
+
+
+ <figure float="0">
+ <title>New Data Set Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/12NewDataSet.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Enter the following details into the query:</para>
+ <programlisting format="linespecific"><![CDATA[
+SELECT *
+FROM CUSTOMERS
+WHERE COUNTRY = 'USA']]></programlisting>
+
+
+ <figure float="0">
+ <title>Query Details</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/13SQLQuery.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button. The Edit Data Set window opens where you can change Data Source, Settings, Parameters and other details for the Data Set created. If switched to the Query page you can check the schemas within this database, you can expand them to see the list of tables with their columns:</para>
+
+
+ <figure float="0">
+ <title>Edit the Data Set</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/14EditDataSet.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Switch to the Preview page to test your query and verify whether the list of customers appears:</para>
+
+ <figure float="0">
+ <title>Test the Query</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/BirtSupport/15TestQuery.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis><property moreinfo="none">Ok</property></emphasis> button.</para>
+ </section>
+
+ <section><title>Create Report Layout</title>
+
+ <para>After the Data source and Data set are specified you can continue with the report layout. Please see the <xref linkend="Birt_Designer"></xref> chapter to learn more about BIRT Report Designer.</para>
+
+ </section>
+
+
+ </section>
+
+</chapter>
+
+
+<chapter id="Birt_Designer" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/birt/docs/en/modules/birt_designer.xml" xreflabel="Birt_Designer">
+ <?dbhtml filename="birtDesigner.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss</keyword>
+ <keyword>BIRT</keyword>
+ <keyword>BIRT Designer</keyword>
+ <keyword>BIRT Report Designer</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>BIRT Report Designer</title>
+
+ <para>BIRT Designer is an intuitive and quite easy Eclipse-based set of plugins to make reports.
+ In this chapter we will describe its interface and its features to you.</para>
+
+ <section id="birt_designer_UI" xreflabel="birt_designer_UI">
+ <title>BIRT User Interface</title>
+
+ <para>The central part of the user interface is the <property moreinfo="none">Layout Editor</property>. It
+ displays the whole process of building a report and contains the following tabs:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">Layout</emphasis> - this is an area where you can edit
+ your report design;</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Preview</emphasis> - runs your report created and shows
+ the output;</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Script</emphasis> - on this page you can add JavaScript
+ to your report to customize its behavior;</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">XML Source</emphasis> - this is an area where you can
+ view and modify the XML source of your report;</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Master Page</emphasis> - use it to format page
+ data.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>The next part of user interface is different <property moreinfo="none">Views</property> that can be
+ arranged around the Layout Editor area the way you like:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">Palette</emphasis> - shows the standard report items you
+ can add to your report using drag and drop.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Outline</emphasis> - shows the structure of your report
+ as a tree view.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Navigator</emphasis> - shows your projects and reports
+ within the projects.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Data Explorer</emphasis> - shows your data sources, data
+ sets and report parameters. You also can use this view to add data set columns
+ to your report layout.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Property Editor</emphasis> - displays properties for
+ many report items.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Properties View</emphasis> - shows all properties for a
+ report item as a simple list.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Library Explorer View</emphasis> - allows the reuse of
+ report objects, such as tables, data sources and styles. Objects created for
+ reuse are stored in a library file. The Library Explorer will display Libraries
+ that exist in the Resource folder. Developed libraries can be added to the
+ resource folder by selecting <emphasis>File→Publish Library in Resource
+ Folder</emphasis>. The resource folder location can be configured. </para>
+ </listitem>
+
+
+
+ </itemizedlist>
+
+
+
+
+
+ </section>
+
+ <section id="birt_designer_features">
+
+ <title>BIRT Report Designer Features</title>
+ <para>Here are the main BIRT Report Designer features:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis role="bold">Palette</emphasis> - contains tables, labels, and
+ charts. It is used in conjunction with the Layout View to design reports.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Data Explorer</emphasis> - organizes your data sources
+ and data sets. The Data Sets editor enables testing your data set to check
+ whether the report receives the correct data. You can also create cubes using
+ your data sets (when building any dynamic cross tables) and design necessary
+ report parameters.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Resource Explorer</emphasis> - BIRT allows the reuse of
+ report objects, such as tables, data sources and styles. Objects created for
+ reuse are stored in a library file. To browse the contents of report libraries
+ BIRT supplies the Resource Explorer view. This view lists all libraries within
+ the resource folder, in addition to other shared content such as images and
+ JavaScript files.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Property Editor</emphasis> - shows the most commonly
+ used properties. BIRT also integrates with the standard Eclipse property view to
+ display a detailed listing of all properties for an item.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Layout View</emphasis> - WYSIWYG editor. You can select
+ any element from the Palette, drag and drop it to the report and then edit the
+ way you like.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Script Editor</emphasis> - scripting adds business logic
+ to reports during data access, report generation, or viewing. The code editor
+ provides standard features for editing scripts: syntax coloring, auto-complete
+ etc. You also can debug scripts when the report is running.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Report Preview</emphasis> - Report Preview is used to
+ test your newly created report with some real data.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Chart Builder</emphasis> - using the Chart Builder you
+ can add any charts to the design of your report. Just select a chart type, then
+ data and, finally, format the chart.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Expression Builder </emphasis> - expressions are simple
+ scripts that return a value. They are used to assign data values to report
+ elements, build image locations, hyperlinks, parameter default values
+ etc.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Cheat Sheets</emphasis> - Cheat sheets are small pices
+ of useful documentation that lead you through a report creation process. Just
+ select what you need and then follow the instructions.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="bold">Outline</emphasis> - this view provides a compact
+ overview of the entire report structure.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>In this guide we made a simple overview of the BIRT plugin: its installation, support,
+ features etc. that will help you to make your first steps with it.</para>
+
+ </section>
+
+</chapter>
+
+
+
+</book>
15 years, 11 months
JBoss Tools SVN: r13331 - branches/jbosstools-3.0.0.CR2/as/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-01-29 12:30:57 -0500 (Thu, 29 Jan 2009)
New Revision: 13331
Added:
branches/jbosstools-3.0.0.CR2/as/docs/reference/en/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-571 - adding the master_output.xml;
Added: branches/jbosstools-3.0.0.CR2/as/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.CR2/as/docs/reference/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.CR2/as/docs/reference/en/master_output.xml 2009-01-29 17:30:57 UTC (rev 13331)
@@ -0,0 +1,1917 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY quick_start SYSTEM "modules/quick_start.xml">
+<!ENTITY runtimes_servers SYSTEM "modules/runtimes_servers.xml">
+<!ENTITY perspective SYSTEM "modules/perspective.xml">
+<!ENTITY webtools SYSTEM "modules/webtools.xml">
+<!ENTITY modules SYSTEM "modules/modules.xml">
+<!ENTITY tptp_support SYSTEM "modules/tptp_support.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JBoss Server Manager Reference Guide</title>
+
+ <author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Rob</firstname><surname>Stryker</surname><email>rob.stryker(a)jboss.com</email></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 2.0.0.CR1
+ </diffmk:wrapper></releaseinfo>
+<abstract>
+ <title></title>
+ <para>
+ <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/as/pdf/AS_Reference_...">PDF version</ulink>
+ </para>
+</abstract>
+
+ </bookinfo>
+
+
+ <toc></toc>
+
+<chapter id="quick_start" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/quick_start.xml">
+ <title>Quick Start with JBoss Server</title>
+
+ <para><diffmk:wrapper diffmk:change="added">This chapter covers the basics of working with the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. If you
+ already have installed JBoss server and runtime you can quickly learn how to configure, start,
+ stop the server, to know deployment and archiving processes. How to install runtimes and servers
+ read in the </diffmk:wrapper><link linkend="runtimes_servers">Runtimes and Servers in the JBoss AS plugin</link><diffmk:wrapper diffmk:change="changed">
+ chapter.</diffmk:wrapper></para>
+
+ <para>To start working with JBoss AS, select a <property moreinfo="none">JBoss AS Perspective</property> via
+ <emphasis><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Window > Open Perspective > Other > JBoss
+ AS</diffmk:wrapper></property>.</emphasis></para>
+
+ <section id="starting">
+ <title><diffmk:wrapper diffmk:change="changed">Starting JBoss Server</diffmk:wrapper></title>
+
+ <para><diffmk:wrapper diffmk:change="added">Starting </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> is quite simple. You can control the server
+ behaviour with the help of a special toolbar in the </diffmk:wrapper><property moreinfo="none">JBoss Server View</property><diffmk:wrapper diffmk:change="added">
+ where you could </diffmk:wrapper><emphasis diffmk:change="added">
+ <property moreinfo="none">start</property>
+ </emphasis> it in a regular or debug mode, <emphasis diffmk:change="added">
+ <property moreinfo="none">stop</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> it or </diffmk:wrapper><emphasis diffmk:change="added">
+ <property moreinfo="none">restart</property>
+ </emphasis> it, <emphasis diffmk:change="added">
+ <property moreinfo="none">publish</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> to the server, </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">clean</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> the server.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>JBoss Server Toolbar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To launch the server click the green-with-white-arrow icon on the <property moreinfo="none">JBoss Server
+ View </property>or right click server name in this view and select <emphasis>
+ <property moreinfo="none">Start</property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="changed"> If this view is not open, select
+ </diffmk:wrapper><emphasis><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Window > Show View > Other > Server >
+ JBoss Server View</diffmk:wrapper></property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Start JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="stopping">
+ <title>Stopping JBoss Server</title>
+
+ <para>To stop the server, click the <emphasis diffmk:change="added">
+ <property moreinfo="none">Stop</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> icon in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server View</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> or right click the server name
+ and press </diffmk:wrapper><emphasis diffmk:change="added"><property moreinfo="none">Stop</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Stop JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When the server is stopped you will see <emphasis diffmk:change="added">
+ <property moreinfo="none">Stopped</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> state next to its name in the square brackets.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="added">Learn more about the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server View</diffmk:wrapper></property>
+ <link linkend="JBossServerView">here</link>.</para>
+ </section>
+
+ <section id="archiving">
+
+ <title>Project Archiving</title>
+
+ <para><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> comes with our own archives tool. The Project Archives
+ plugin consists primarily of a view to set up each packaging configuration </diffmk:wrapper><emphasis><diffmk:wrapper diffmk:change="changed">(
+ </diffmk:wrapper><property moreinfo="none">Window > Show View > Other > JBoss Tools > Project archives</property><diffmk:wrapper diffmk:change="changed">).
+ </diffmk:wrapper></emphasis></para>
+ <para>Right clicking in the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Project archives view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> you can create War,
+ EJB War, EAR or JAR archive.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Archive Creating</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">Using the context menu on the item you can initiate a </diffmk:wrapper><emphasis diffmk:change="added"><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">full build</diffmk:wrapper></property></emphasis> on
+ archive, <emphasis diffmk:change="added"><property moreinfo="none">edit</property><diffmk:wrapper diffmk:change="added">,</diffmk:wrapper></emphasis> <emphasis diffmk:change="added"><property moreinfo="none">delete</property></emphasis> or
+ <emphasis diffmk:change="added"><property moreinfo="none">publish</property></emphasis> it.</para>
+
+ <figure float="0">
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Learn more about the <property moreinfo="none">Project Archives View</property>
+ <link linkend="Project_archivesView">here</link>.</para>
+
+ </section>
+ <section id="deployment">
+ <title>Deploying an Application to a Server</title>
+
+ <para>There are two times to deploy your application:</para>
+ <itemizedlist>
+ <listitem>
+ <para>While creating it</para>
+ </listitem>
+ <listitem>
+ <para>After it already exists</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>When you create a new project (Seam, JSF or Struts) with the New Project or Import Project
+ wizards, the one of wizards steps has a <emphasis>
+ <property moreinfo="none">Target Runtime</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Target Server</property>
+ </emphasis> sections. You can deploy the application through the appropriate selection in
+ these sections.</para>
+
+ <figure float="0">
+ <title>Runtime and Server Sections in the New Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_4a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Runtime and Server Sections in the Import Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_4b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can deploy an existing application to a server by right-clicking the target defined
+ server in the <property moreinfo="none">JBoss Servers View</property> and then selecting <emphasis diffmk:change="added"><property moreinfo="none">Add and
+ Remove Projects</property></emphasis> from the context menu.</para>
+
+ <figure float="0">
+ <title>Add and Remove Projects From the Context Menu.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If this application is not assigned to a server, it will be in the left-hand available
+ projects list. Clicking on the <property moreinfo="none">Add ></property> button will add it to the right-hand
+ configured projects list and deploy the application to this server.</para>
+
+ <figure float="0">
+ <title>Modifying The Projects that are Configured on the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">Here, we have just performed the basic steps you should know to quick start with JBoss
+ server. In fact, there are more functionalities which you can make use of. Further we will
+ talk about them in detail.</diffmk:wrapper></para>
+ </section>
+
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/2.1.0.GA">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="runtimes_servers" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/runtimes_servers.xml" xreflabel="runtimes_servers">
+ <?dbhtml filename="runtimes_servers.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Runtimes and Servers in the JBoss AS plugin</title>
+
+ <para>In this chapter we will discuss how to install runtimes and servers.</para>
+
+ <para>First of all it's necessary to mention that the JBoss AS plugin makes use of WTP.
+ This includes starting and stopping servers in run or debug mode. It also includes targeting WTP
+ projects, such as Dynamic Web Projects, to certain server runtimes in order to ensure that the
+ proper jars from a specific server are added to the project's classpath properly.</para>
+ <para>In order to get started creating, running, and debugging J2EE applications, we should create
+ our <property moreinfo="none">runtime</property> and <property moreinfo="none">server</property> instances.</para>
+
+ <section>
+ <title>Runtimes</title>
+ <para>In JBoss Tools, the main purpose of Server Runtimes is to point to a server installation
+ somewhere on disk. In our case, this will be a JBoss installation, and it can then be used for
+ two primary purposes:</para>
+ <itemizedlist>
+ <listitem>
+ <para>it provides classpath additions to WTP projects that require them.</para>
+ </listitem>
+ <listitem>
+ <para>for <property moreinfo="none">JBoss server</property> at least, it provides information necessary for
+ the starting and stopping of the server, it tells which jars to run and which
+ configuration to use.</para>
+ </listitem>
+ </itemizedlist>
+
+ <section id="InstNewRuntime">
+ <title>Installing a new Runtime</title>
+ <para>You can install runtimes into eclipse from the <emphasis>
+ <property moreinfo="none">Window > Preferences... </property>
+ </emphasis> menu, and then select <emphasis>
+ <property moreinfo="none">Server > Installed Runtimes</property>
+ </emphasis> from the categories available.</para>
+ <figure float="0">
+ <title>Installed Runtimes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>From this preference page you can see all declared runtimes and their types as well.
+ Figure above shows two declared runtimes that include a JBoss 4.2 instance. Here,
+ it's possible to edit or remove existing runtimes as well as add a new one.</para>
+
+ <para>To create a JBoss runtime click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button and choose a necessary type of runtime from the appeared dialog. </para>
+
+ <figure float="0">
+ <title>Adding a Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see, <property moreinfo="none">JBoss Tools</property> provide its own adapters such as JBoss
+ 3.2, 4.0, 4.2 and 5.0 as well. The last one comes with its own new feature, that is a safer
+ incremental deployment, which prevents partial deployments to be picked up by the server. It
+ means that scanning for auto-deployment is suspended while files are being copied to the
+ deployment location and resumed when the copy is completed.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Currently we recommend you to use a fully supported JBoss 4.2 server adapter.</para>
+ </note>
+
+ <para>You'll also note a Deploy-Only Runtime type. This type provides no classpath
+ for WTP projects. It is used solely by its server type for the purpose of setting up a
+ deploy directory for users who don't wish to make use of starting, stopping, or
+ debugging their projects inside eclipse.</para>
+
+ <figure float="0" id="add_runtime_figure">
+ <title>Adding a JBoss 4.2 Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The following table describes all the available options of the wizard.</para>
+ <table>
+ <title>Server Runtime Wizard Parameters</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Name</para>
+ </entry>
+ <entry>
+ <para>The name of a new Runtime for a chosen server. We suggest that you
+ don't leave a default value. It's better to give descriptive
+ names that will help to distinguish one runtime from another.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Home directory</para>
+ </entry>
+ <entry>
+ <para>The path to a directory where the runtime is installed.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>jRE</para>
+ </entry>
+ <entry>
+ <para>The proper Java Runtime Environment. Because of the open-source nature of
+ JBoss, a user is likely to want to modify and repackage some of the
+ configuration-specific jboss jars and create their own configuration. Thus, rather
+ than forcing you to copy his entire JBoss installation, the structure of the
+ wizard allows to create only a new configuration instead.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Configuration</para>
+ </entry>
+ <entry>
+ <para>The list of configurations (all, default, minimal) that is updated as soon as
+ you browse to a valid runtime installation folder. After the runtime is created
+ the configuration becomes an unchanging property of that runtime. To compile
+ against a different configuration's jars, you will need to create a new runtime
+ from that configuration.</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>As a result of having each runtime represent a specific configuration rather than the
+ server installation as a whole, it is very likely you'll create several different
+ runtimes to test each of your configurations. It becomes important to ensure your runtimes,
+ and later your servers, are given descriptive names that help you remember which is which.</para>
+
+ <para>Press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to see your new runtime in the list.</para>
+ </section>
+
+ </section>
+
+ <section>
+ <title>Servers</title>
+ <para>WTP servers are eclipse-representations of a backing server installation. They are used to
+ start or stop servers, deploy to servers, or debug code that will run on the server. They keep
+ track of the modules (jars, wars, etc) you deploy to the server and also allow you to undeploy
+ those modules (see <link linkend="run_on_server_wizard">Deploying with Run On Server
+ Wizard</link> section). </para>
+ <para>Servers can be started or stopped with different <link linkend="com_line_arg">command-line
+ arguments</link>. They are often backed by a runtime object representing that server's
+ location.</para>
+
+ <section>
+ <title>Creating a New Server</title>
+
+ <para>There are many ways to get to the new server wizard. One way is to use the old standard <emphasis>
+ <property moreinfo="none">File > New > Other... </property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">Server</property>
+ </emphasis>. This should show the wizard like below.</para>
+ <figure float="0">
+ <title>Adding a JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>A server object is that keeps track of things like command line arguments when starting
+ or stopping, and runtimes keep track of the location of the installation. Thus, each server
+ instance must be backed by an appropriate runtime. </para>
+
+ <para>From the list of already declared runtimes in the combo box below the view it's
+ possible to select which runtime you want your server to be backed by. If there is no
+ runtime that matches your needs just press <emphasis>
+ <property moreinfo="none">Installed Runtimes... </property>
+ </emphasis> to bring up the familiar preference page like in <link linkend="InstNewRuntime">
+ the previous section</link>. Here, it becomes possible to edit already existing runtime or
+ add a new one with necessary configuration.</para>
+
+ <figure float="0">
+ <title>Installed Server Runtime Environments</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If the server you want to create doesn't have any installed runtime yet, the combo box
+ and button will disappear.</para>
+
+ <figure float="0">
+ <title>Installed Server Runtime Environments</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In this case the next page in the wizard which has the same form as in <link linkend="add_runtime_figure">the previous section</link> will ask you to create the
+ associated runtime.</para>
+ <para>Either way, after targeting your server to a runtime, the final screen in this wizard is
+ largely confirmational, giving you a chance to verify that you've selected the
+ appropriate runtime. It also allows to name the server appropriately. </para>
+
+ <figure float="0">
+ <title>Installed Server Runtime Environments</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to complete the process of the server creation.</para>
+ <para>Now that we've created our runtimes and servers, we can dwell on all services
+ and tools that JBoss Server Manager provides.</para>
+ </section>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="perspective" role="updated" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/perspective.xml" xreflabel="perspective">
+ <?dbhtml filename="perspective.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>JBoss AS Perspective</title>
+
+ <para><diffmk:wrapper diffmk:change="added">This chapter tells how to manage installed </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> via
+ </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss AS perspective</diffmk:wrapper></property>.</para>
+
+ <para>The <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss AS perspective</diffmk:wrapper></property> is similar to the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Java
+ perspective</diffmk:wrapper></property>, but it contains a few additional views. Two of the additional
+ views are standard views, specifically the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Console view</diffmk:wrapper></property> and the
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Properties view</diffmk:wrapper></property>. The other two views that are added are the
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Project archives view</diffmk:wrapper></property> and the <property moreinfo="none">JBoss Server
+ View</property>.</para>
+
+ <section id="JBossServerView" role="updated">
+ <?dbhtml filename="JBossServerView.html"?>
+ <title>The JBoss Server View</title>
+
+ <para><diffmk:wrapper diffmk:change="changed">The </diffmk:wrapper><property moreinfo="none">JBoss Server View</property><diffmk:wrapper diffmk:change="changed"> is built on Common Navigator Framework
+ allowing extensions and is using label decorators what makes the UI enough compact
+ without loosing the vital information.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">Let's have a look at the </diffmk:wrapper><property moreinfo="none">JBoss Server View</property><diffmk:wrapper diffmk:change="added"> and inspect
+ in detail all parts it consists of. </diffmk:wrapper></para>
+ <figure float="0">
+ <title>The JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section diffmk:change="added" id="jbossserver_view_toolbar">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss Server View Toolbar</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="added">In the right top corner of the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server View</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> there is a
+ special toolbar which provides a quick access to starting a server (in debug mode,
+ run mode, or profile mode), restarting a server, stopping a server, publishing to a
+ server and a possibility to clean a server.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>The JBoss Server View Toolbar</title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata fileref="images/perspective/perspective_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">In order to debug your applications or EJB's that are deployed to the server, you
+ must start the server in debug mode. By starting the server in debug mode, eclipse
+ will allow you to set breakpoints on code in your workspace and step through the
+ code.</diffmk:wrapper></para>
+
+ <para><emphasis>
+ <property moreinfo="none">Start the server in profiling mode</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> button allows to enable profiling actions for your application. For more
+ details on how to start using TPTP profiling with </diffmk:wrapper><property moreinfo="none">JBoss Tools</property><diffmk:wrapper diffmk:change="changed">
+ refer to </diffmk:wrapper><link linkend="tptp_support">TPTP Support</link> chapter.</para>
+
+ <para><emphasis>
+ <property moreinfo="none">Publish to the server</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> button will republish any modules where it has determined the workspace
+ is out of sync with the server. It will attempt to do an incremental publish if it
+ turns out that the module in question is capable of doing one.</diffmk:wrapper></para>
+
+
+ <para><diffmk:wrapper diffmk:change="added">Press </diffmk:wrapper><emphasis diffmk:change="added">
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Clean</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> if you need to clean projects published on the server, i.e. remove
+ invalid resources from the server.</diffmk:wrapper></para>
+ </section>
+
+ <section id="jbossserver_view_structure">
+ <title><diffmk:wrapper diffmk:change="changed">JBoss Server View Structure</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">The </diffmk:wrapper><property moreinfo="none">JBoss Server View</property><diffmk:wrapper diffmk:change="changed"> displays all declared servers as well
+ as their current states (that is whether they are started or stopped) and statuses
+ in the square brackets next to a server name.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">The JBoss Server View</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">The following table lists possible server statuses.</diffmk:wrapper></para>
+
+ <table>
+ <title>Server Publish Status</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">Status</entry>
+
+ <entry align="center">Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry align="center">
+ <para>Republish</para>
+ </entry>
+
+ <entry align="center">
+ <para>The status which allows you to see if changes are
+ awaiting</para>
+ </entry>
+ </row>
+ <row>
+ <entry align="center">
+ <para>Publishing...</para>
+ </entry>
+
+ <entry align="center">
+ <para>The status which shows if changes are being updated</para>
+ </entry>
+ </row>
+ <row>
+ <entry align="center">
+ <para>Synchronized</para>
+ </entry>
+
+ <entry align="center">
+ <para>The status which allows you to see if changes are
+ in-sync</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para><diffmk:wrapper diffmk:change="added">You can control a server behavior as well as adjust some server preferences with
+ the help of the context menu commands.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Twiddle Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">All available context menu commands are described in the following table.</diffmk:wrapper></para>
+ <table>
+ <title>Server Properties through the Context Menu</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>New Server</para>
+ </entry>
+ <entry>
+ <para>The option allows to define a new server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="added">Open</diffmk:wrapper></para>
+ </entry>
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The option opens the Server editor</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show in</diffmk:wrapper></para>
+ </entry>
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can monitor the currant server behavior with the help of
+ the other views: Console, Debug view, Server Log or MBean
+ Explorer</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added">Delete</para>
+ </entry>
+ <entry>
+ <para>Standard option that allows to delete the chosen server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Start</para>
+ </entry>
+ <entry>
+ <para>The action for stating a server in a run mode</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Debug</para>
+ </entry>
+ <entry>
+ <para>The action for stating a server in a debug mode</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Stop</para>
+ </entry>
+ <entry>
+ <para>The action for stopping a declared server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Publish</para>
+ </entry>
+ <entry>
+ <para>The action for synching the publish information between the
+ server and workspace</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Clean</para>
+ </entry>
+ <entry>
+ <para>The option for complete redeploying the resources</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">Add and Remove Projects</diffmk:wrapper></para>
+ </entry>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">The option allows to publish a new project to the server (if
+ its type is supported)</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">Monitoring</diffmk:wrapper></para>
+ </entry>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">Possibility to add ports to be monitored on the currant
+ server</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">Properties</diffmk:wrapper></para>
+ </entry>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">Opens the window to adjust the currant server
+ preferences</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para><diffmk:wrapper diffmk:change="added">Under the server element in the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Server View</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, you can
+ see currently deployed to the server modules and some server extensions which
+ provide the additional information on the server.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="added">The context menu for any module allows you to remove it from the server, force a
+ full or incremental republish upon it.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Modules Action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="added">XML Configuration</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> category allows you to quickly browse to descriptor files in your
+ server's deploy directory and check or change the values. Basically, </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">XML Configuration</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> includes XML XPaths where a xpath is a path used to access some specific
+ part of an xml document. </diffmk:wrapper></para>
+
+ <note diffmk:change="added">
+ <title><diffmk:wrapper diffmk:change="changed">Note:</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You are assumed to be familiar with XPath. If not, we highly suggested that
+ you look through an appropriate manual or tutorial on the topic.</diffmk:wrapper></para>
+ </note>
+
+ <para>The <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> category itself contains only a list of categories. </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Ports</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> are provided by default and is filled with many of the most commonly
+ used ports in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">XML Configuration</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <!--para>In the <property>Properties
+ view</property> you can see an identifier and nested files underneath in which
+ that xpath can be found as well as its current value. The details of the xpath are
+ hidden as all you need to see is only which file you're referring to and
+ what its current value is.</para-->
+
+ <para><diffmk:wrapper diffmk:change="changed">By right-clicking on </diffmk:wrapper><emphasis>
+ <property moreinfo="none">XML Configuration</property>, </emphasis> you can create a new
+ category. Besides, context menu for <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis> category makes possible to disable it. You can disable any category in
+ the bottom part of the <emphasis>
+ <property moreinfo="none">JBoss Server View</property>.</emphasis> Look for them in the <emphasis>
+ <property moreinfo="none">Inactive Categories</property>
+ </emphasis> afterwards to re-enable.</para>
+
+ <figure float="0">
+ <title>Adding New Category</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>By right-clicking on <emphasis>
+ <property moreinfo="none">Ports</property>
+ </emphasis> or any other category in <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis>, you can create a new xpath.</para>
+
+ <figure float="0">
+ <title>Adding New XPath</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After that, the dialog shown below will appear.</para>
+
+ <figure float="0">
+ <title>Adding New XPath</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The goal here is to get an end result where the XPath matches up with a necessary
+ property. With that in mind, let's look how it works. If the property you
+ want to reach is the value of the <emphasis>name</emphasis> attribute in the element
+ <emphasis><mbean></emphasis>, then your <emphasis>
+ <property moreinfo="none">XPath Patten</property>
+ </emphasis>should end with <emphasis>mbean</emphasis> and your <emphasis>
+ <property moreinfo="none">Attribute Name</property>
+ </emphasis> should be <emphasis>name</emphasis> like on the next figure.</para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[...
+<server>
+...
+ <mbean code="org.jboss.ejb.EJBDeployer"
+ name="jboss.ejb:service=EJBDeployer" xmbean-dd="">
+
+ <!-- Inline XMBean Descriptor BEGIN -->
+ <xmbean>
+ <description>
+ The EJBDeployer responsible for ejb jar deployment</description>
+ ...
+ </xmbean>
+ </mbean>
+</server>
+]]></programlisting>
+
+ <figure float="0">
+ <title>XPath Preview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>Notice, when you type the fields autocomplete to help you locate exactly what
+ xpath you're looking for.</para>
+ </tip>
+
+ <para>Then, on the other hand, if your desired field is the text of an element
+ <emphasis><description></emphasis>, your <emphasis>
+ <property moreinfo="none">XPath Patten</property>
+ </emphasis> should end with <emphasis>description</emphasis> and <emphasis>
+ <property moreinfo="none">Attribute Name</property>
+ </emphasis> field should be left blank. When finished, click <emphasis>
+ <property moreinfo="none">Preview</property>
+ </emphasis> to see how many matches you have for that particular XPath.</para>
+
+ <figure float="0">
+ <title>XPath Preview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section diffmk:change="added" id="server_log">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Server Log View</diffmk:wrapper></title>
+
+ <para><diffmk:wrapper diffmk:change="changed">You can monitor the currant server behavior with the help of the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="added">Server
+ Log</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. To open a server in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server Log
+ view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you should right-click on the server and follow to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Open in > Server Log</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server Log</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> shows relevant information to your server's startup,
+ shutdown, and publish processes. This allows you to keep an eye on what's
+ going on (such as automatic incremental deployment if you have it enabled).</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Event Log Actions</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server Log</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> toolbar contains several icons that perform the following actions:</diffmk:wrapper></para>
+
+ <table diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Server Log Toolbar Icons</diffmk:wrapper></title>
+ <tgroup cols="2" diffmk:change="added">
+ <colspec align="left" colnum="1" colwidth="1*" diffmk:change="added"></colspec>
+ <colspec colnum="2" colwidth="3*" diffmk:change="added"></colspec>
+
+ <thead diffmk:change="added">
+ <row diffmk:change="added">
+ <entry align="center" diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Name</diffmk:wrapper></para>
+ </entry>
+
+ <entry align="center" diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Description</diffmk:wrapper></para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody diffmk:change="added">
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Export Log</diffmk:wrapper></para>
+ </entry>
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Possibility to export the log into a text file</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Clear Log Viewer</diffmk:wrapper></para>
+ </entry>
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The option clears the currant server log</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Delete Log</diffmk:wrapper></para>
+ </entry>
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click to delete the server log</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Open Log</diffmk:wrapper></para>
+ </entry>
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click to open the server log text file</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Restore Log</diffmk:wrapper></para>
+ </entry>
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click to restore the server log</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section diffmk:change="added" id="server_editor">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Server Editor</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">By double-clicking on any server, an editor window will appear allowing you to
+ edit parts of that server.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Preferences Page for the Chosen Server</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Tip:</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">On the figure you can see that a username/password is available in the UI when
+ configuring the server. If you get an SecurityException when trying to launch
+ the server, it is most likely because your server is protected and hence you
+ need to fill the username/password fields with appropriate values.</diffmk:wrapper></para>
+ </tip>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">It should be pointed out that our server adapter by default tries to automatically
+ detect the ports it needs for integrating with a </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.
+ Sometimes it can though be relevant to override this automatic detection if you are
+ using some custom configuration. For this purposes the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server Ports</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> section in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> is provided where the
+ port settings are configurable. Click the </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Configure...</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> link to bring up the wizard for adjusting the settings for the
+ ports.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Server Ports Preferences</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Press </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Edit XPath</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button for the chosen port to configure its XPath's values.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">XPath Pattern for a Server Port</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The settings related to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Publishing</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Timeouts</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> or </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server Polling</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> can be also adjusted in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <para diffmk:change="added" id="com_line_arg"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> makes it also possible to
+ modify the server's launch configuration. It's just after clicking </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Open launch configuration</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> link. In the open window there are the tabs for setting command line
+ arguments and other things that are relevant to launching the server.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Launch Configuration Properties</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Look up </diffmk:wrapper><ulink diffmk:change="added" url="http://docs.jboss.org/jbossas/guides/installguide/r1/en/html/start-stop.html"><diffmk:wrapper diffmk:change="added">here</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> to find parameters which can be specified for </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss
+ Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ </section>
+
+ <section diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Relevant Resources Links</diffmk:wrapper></title>
+ <para>Find more about XPath in the <ulink url="http://www.w3.org/TR/xpath20/"><diffmk:wrapper diffmk:change="changed">XPath
+ Documentation</diffmk:wrapper></ulink>.</para>
+ </section>
+ </section>
+
+ <section id="Project_archivesView" role="updated">
+ <title>Project Archives View</title>
+ <para><diffmk:wrapper diffmk:change="added">Every application, whether Plain Old Java, J2EE, or some other language altogether,
+ needs to be packaged in some way. In Java-related projects, many people use ANT. </diffmk:wrapper></para>
+ <note diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Those who use ANT will appreciate how the Project Archives Ant task is now
+ improved: it supports variables and gives more informative error/logging messages
+ when something goes wrong.</diffmk:wrapper></para>
+ </note>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">But </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> come with our own Archives tool with a bit easier
+ and less-verbose XML and a handy user interface. The Project Archives plugin consists
+ primarily of a view, that is </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Archives view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">, to set up each
+ packaging configuration.</diffmk:wrapper></para>
+ <para>So far, let's look through all functionality that the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Project
+ Archives view</diffmk:wrapper></property> provides.</para>
+
+ <section id="archives_overview">
+ <title>Overview</title>
+
+ <para>The packaging configuration for each project is stored in the project's root
+ folder, and is in a file named <emphasis>
+ <property moreinfo="none">.packages</property>
+ </emphasis>, which has a fairly simple XML structure. Modifying the file by hand is
+ neither required nor recommended, and using the UI is the official way of modifying
+ your packaging structure.</para>
+
+ <figure float="0">
+ <title>Archives View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">A project's configuration contains archives. As you can see on the image
+ above a project can contain more than one archive. Internal archives and filesets
+ can be directly inside of an archive, or in some sub-folder of that archive.</diffmk:wrapper></para>
+
+ <para>In the upper right corner of the view you can see an icon which, when clicked,
+ will build the selected top-level archive. Additionally, you can select <emphasis>
+ <property moreinfo="none">Project > Build Packages</property>
+ </emphasis> when a project is selected in the <property moreinfo="none">Packages View</property> to
+ build all declared packages in that project's <emphasis>
+ <property moreinfo="none">.packages</property>
+ </emphasis> file. This will execute a full build on all declared archives.</para>
+ </section>
+
+ <section id="Creating_Archive">
+ <title>Creating an Archive</title>
+
+ <para><diffmk:wrapper diffmk:change="added">When you open the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Project archives view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> for the first time,
+ it asks you to select the project for what you want to create an archive.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Archives View</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_21a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">When creating a new archive for selected project, you have some different options
+ at your disposal. You need right-click inside the view and select </diffmk:wrapper><emphasis>
+ <property moreinfo="none">New Archive</property>
+ </emphasis> to see your archive type options.</para>
+
+ <figure float="0">
+ <title>Create an Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>If you see only JAR from the list of available archive types, you should
+ verify whether AS Tools plugins/features are in place. EAR, EJB JAR and WAR
+ options are contributed by the AS Tools independently from webtools and the
+ virtual project model. Thus, without them only JAR will show up.</para>
+ </note>
+
+ <para><property moreinfo="none">JAR</property> is the standard archive type, and does very little
+ configuration, leaving most of the work up to you. You can customize the name, add
+ folders, filesets, and inner jars to it.</para>
+
+ <para>The other types, for the most part, simply start off with a default setting,
+ usually the jar with some specific children based on an expected structure of the
+ project. For example, if the project is a Dynamic Web Project, and you create a
+ <property moreinfo="none">WAR</property> archive, the archive will be created with a few
+ filesets relevant to the known structure of the project.</para>
+
+ <para>Here is the first page of all New archive wizards. It is the same for any archive
+ type and the only page in the <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">New Jar wizard</diffmk:wrapper></property>.</para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">New WAR Wizard</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">The page is pretty simple. First it asks to set the name of your new archive and a
+ destination.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="added">The destination of an archive can be anywhere on the file system, anywhere in the
+ workspace, inside some other archive, or inside a folder declared inside an archive.
+ Select the necessary checkbox (either </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">workspace</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> or </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added"> file system</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added">) for marking the destination as related to either workspace or file
+ system. You can browse to workspace or filesystem destinations by clicking on their
+ respective buttons. To select a destination inside some other archive, you'll need
+ to press the </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Workspace</diffmk:wrapper></property>
+ </emphasis> button. At the bottom of the list, you'll see archives that
+ have been declared in the workspace.</para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Selecting the destination in the workspace</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_23a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Also in the wizard for creating a new archive you can choose whether an archive to
+ be compressed or exploded into a folder (without compression). You need just select
+ proper chechbox in the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Archive type</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> section.</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If a build or incremental update fails Project Archives will show an error
+ dialog:</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Selecting the destination in the workspace</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/projectarchives_error.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Click in </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Details</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> to see detailed information about what caused the error.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">In the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Package Explorer</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you can observe the created
+ archive.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">The Archive in the Package Explorer</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_23b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you use the exploded type of archiving, instead of a single file archive the
+ result put into a folder is displayed in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Package
+ Explorer</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">The Exploded Archive in the Package Explorer</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_23c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="CreatingaFolder">
+ <title>Creating a Folder</title>
+ <para>Creating a folder is much easier. You simply right-click on an archive or
+ folder you want your new folder to be a child under. The only piece of required
+ information is naming the file.</para>
+ </section>
+ <section id="CreatingaFileSet">
+ <title>Creating a FileSet</title>
+ <para>To create a new fileset, you click on an available target location such as an
+ archive, a nested archive, or a folder within an archive, and select <emphasis>
+ <property moreinfo="none">New Fileset</property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></emphasis></para>
+ <para>The <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">New Fileset wizard</diffmk:wrapper></property> requires a destination (where the
+ files will go), and a root directory (or where the files are coming from). The
+ source can be anywhere in the workspace or from the filesystem at large.</para>
+
+ <figure float="0">
+ <title>Adding a New FileSet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Below that, the fileset requires only an includes pattern and an excludes
+ pattern. As you type in either of these fields, the preview viewer should update
+ itself with which files are matched.</para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can create a Fileset with flattenning or without it. Look at the
+ difference on the figure below.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">The FileSet with flattenning and without it</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/perspective/perspective_24a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+ <section id="View_Actions">
+ <title>Archive Actions</title>
+ <figure float="0">
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The context menu on the items in the view is extendable, but there are several
+ that come standard.</para>
+
+ <table>
+ <title>Context Menu on the Item</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>Build Archive (Full)</para>
+ </entry>
+
+ <entry>
+ <para>The action enabled only on top-level archives, which initiates
+ a full build on that archive</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Edit Archive</para>
+ </entry>
+
+ <entry>
+ <para>Standard action that brings up the wizard associated with that
+ particular node type and allows the details to be changed</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Delete Archive</para>
+ </entry>
+
+ <entry>
+ <para>Deleting node is standard action with deletion not needing an
+ explanation</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Publish To Server</para>
+ </entry>
+
+ <entry>
+ <para>The action means the ability to publish to a declared
+ server</para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Edit publish settings</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Gives possibility to edit an archive publish settings</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section id="PublishToServer">
+ <title>Publishing to Server</title>
+ <para>Finally, you'll need to publish your application to a server. Here, we
+ show you how to do it with the help of <emphasis>
+ <property moreinfo="none">Archives View</property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></emphasis></para>
+
+ <figure float="0">
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The dialog above appears after selecting <emphasis>
+ <property moreinfo="none">Publish To Server</property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="changed"> To simply publish once, you
+ just select the server(s) that you want, and finish. If you want the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Publish to Server</property>
+ </emphasis> action on that particular Archive to publish always to that set of
+ servers, then check the appropriate checkbox. And finally, to enable automatic
+ publishing upon build events, check the last checkbox.</para>
+ <para>The automatic publishing feature is nice if, for example, your package's
+ destination (where it is built) is a temporary folder and you want the archive
+ published to several servers. If you only really want your archive published to one
+ server, it might be easier to have the archive's destination folder be the deploy
+ folder of the server.</para>
+ </section>
+ <section id="rel_res_links_archiving">
+ <title>Relevant Resources Links</title>
+ <para>Refer to <ulink url="http://ant.apache.org/manual/index.html">Ant manual</ulink>
+ to find more on how to build your applications with help of Ant.</para>
+
+ <para><diffmk:wrapper diffmk:change="added">We also recommend you to watch the </diffmk:wrapper><ulink diffmk:change="added" url="http://docs.jboss.org/tools/movies/demos/archiving/archiving.htm"><diffmk:wrapper diffmk:change="added">movie</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> which demonstrates a powerful archiving functionality in
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <para diffmk:change="added">At this point, you are guessed to be familiar with <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss AS
+ perspective</diffmk:wrapper></property> and your next step now is to explore how to work with
+ different kinds of projects.</para>
+ </section>
+
+ </section>
+
+
+</chapter>
+
+
+<chapter id="webtools" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/webtools.xml">
+ <title>Projects</title>
+ <para>The most popular of the projects we deal with are the J2EE ones, such as Dynamic Web
+ Project, EJB Project, or EAR project. Web projects of <property moreinfo="none">JBoss Tools</property> are
+ Struts, JSF and Seam projects. All of them are called faceted projects. Thus, in this
+ chapter we are going to tell you about facets the main benefit of which to provide proper
+ structuring and packaging for any type of project.</para>
+
+ <section>
+ <title>Faceted Projects Overview</title>
+ <para>The idea behind faceted projects is that each project can accept units of
+ functionality, or facets, which can be added or removed by the user. Most often, these
+ facets either add to the project's classpath, enable a builder, or watch the project in
+ some other fashion. Generally, every project concerned has at least one facet when
+ it's created. As an example, a Web project has a WebDoclet facet, or an EJB
+ Project has an EJB Module facet as prerequisites.</para>
+
+ <para> WTP projects have undergone some criticism as being
+ <emphasis>over-engineered</emphasis> or too restrictive in their design. WTP projects
+ are set up in a tree-relationship to each other, where one project can be a child of
+ another. For example, an EAR project may have a Web Project child, an EJB project child,
+ or other types.</para>
+
+ <para> However, the benefit of this is that the structure of your projects is then known,
+ and packaging it up *should* be trivial. Apparently, if your project is non-standard, or
+ you feel too confined by such rigid structural requirements, you can still choose to
+ package your project using the <link linkend="Project_archivesView">Archives
+ plugin</link>.</para>
+ </section>
+
+
+ <section>
+ <title>Adding Facets to a Project</title>
+
+ <para>In this section we're going to consider the facets added by <property moreinfo="none">JBoss
+ Tools</property> and show how you can configure them in a project: add new ones or
+ modify already existing configuration of the facets.</para>
+
+ <para>One way to configure the facets is doing it while organizing a new project. To
+ demonstrate this let's create a new <property moreinfo="none">Dynamic Web Project</property> by
+ selecting <emphasis>
+ <property moreinfo="none">File > New > Other...</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">Web > Dynamic Web Project</property>. </emphasis></para>
+ <figure float="0">
+ <title>New Dynamic Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> and you will see Dynamic Web Project page like on the figure below.</para>
+
+ <para> The first page of most WTP projects allows you to target a specific runtime,
+ representing a server's library location. It will also provide you the ability to add
+ this project to an EAR project, and select a pre-selected default set of facets, called
+ a configuration, rather than manually select each facet you might want.</para>
+ <para> Selecting the runtime, again, allows the project to install the proper classpaths to
+ the project so it knows what code to compile against.</para>
+
+ <figure float="0" id="dyn_web_project">
+ <title>New Dynamic Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">Modify</property>
+ </emphasis> button next to <property moreinfo="none">Configuration</property> section in order to open
+ the wizard which allows you to modify a chosen configuration. The wizard looks as
+ follows.</para>
+
+ <figure float="0" id="project_facets">
+ <title>Project Facets Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here part of the listed facets are those which are provided by WTP. Some of them are
+ added by <property moreinfo="none">JBoss Tools</property>. They are:</para>
+ <itemizedlist>
+ <listitem>
+ <para>BIRT Charting Runtime Component</para>
+ </listitem>
+ <listitem>
+ <para>BIRT Reporting Runtime Component</para>
+ </listitem>
+ <listitem>
+ <para>JBoss ESB</para>
+ </listitem>
+ <listitem>
+ <para>JBoss Portlets</para>
+ </listitem>
+ <listitem>
+ <para>JBoss Web Services</para>
+ </listitem>
+ <listitem>
+ <para>Seam</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>On this wizard page you can enable or disable any facet as well as change it version.
+ What you should note here is that some facets or facets versions may conflict with each
+ other. In case of incompatibility you'll be prompted about this in the combo
+ box underneath.</para>
+ <figure float="0">
+ <title>Facet Constraints</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When switching on the <emphasis>
+ <property moreinfo="none">Runtimes</property>
+ </emphasis> tab on the right you'll see the currant Server Runtime.</para>
+ <figure float="0">
+ <title>Runtimes on the Project Facets Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On this tab you can also create a new Server Runtime and make it primary by pressing <emphasis>
+ <property moreinfo="none">Make Primary</property>
+ </emphasis> button after enabling it.</para>
+
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> will save the chosen configuration of the facets and return you to the <link linkend="dyn_web_project">Dynamic Web Project wizard</link>. Further pages in the
+ wizard are specific to either the project type or the facets selected.</para>
+
+
+ <para>If you need to configure the facets for the existing project, you should bring up the
+ context menu for selected project and click <emphasis>
+ <property moreinfo="none">Properties</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">Project Facets</property>. </emphasis> This will bring up the familiar
+ <link linkend="project_facets">Project Facets wizard</link>, where you can create
+ your own custom facets configuration.</para>
+
+ <para></para>
+
+ </section>
+ <section id="rel_resources_links">
+ <title>Relevant Resources Links</title>
+
+ <para>More on the WTP facets you can read in the <ulink url="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.jst.j2ee.do...">eclipse help</ulink>.</para>
+ </section>
+</chapter>
+
+
+<chapter id="modules" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/modules.xml">
+ <title>Deploying Modules</title>
+
+ <para>In this chapter it will be described how to deploy modules onto the server.</para>
+ <para> First of all it is necessary to say that deploying to a server is mostly painless. There
+ are several ways to do it provided by WTP, and some additional methods provided by JBoss
+ Tools. These methods are described further in this chapter.</para>
+
+ <section>
+ <title>Deploying on the Package Explorer</title>
+
+ <para>On the package explorer it is possible to publish either a project to a server or just
+ a signal file. Let's look at how to do this.</para>
+ <section id="run_on_server_wizard">
+ <title>Deploying with Run On Server Wizard</title>
+ <para> The first WTP method is to right-click on a project, such as a Dynamic Web
+ project, EJB project, or EAR project and then select <emphasis>
+ <property moreinfo="none">Run As > Run on Server</property>
+ </emphasis>. The resulting dialog allows you to select which supporting server the
+ project can be published to.</para>
+ <figure float="0">
+ <title>Define a New Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button to see add or remove projects page where you can choose projects
+ to configure them on server.</para>
+ <figure float="0" id="add_rem_proj">
+ <title>Add or Remove Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This page of the wizard also allows to undeploy modules from the server. For that
+ choose proper module(s) from the right and click <emphasis>
+ <property moreinfo="none"> < Remove</property>
+ </emphasis>. The modules will be completely undeployed after restarting your server
+ or republishing.</para>
+ <para>Generally, for the JBoss AS Server Adapters, publishing using this method will
+ force a default, best-guess, packaging configuration for your project. This
+ best-guess does not publish incrementally, but instead repackages your entire
+ project into a <emphasis>
+ <property moreinfo="none">.war</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">.jar</property>
+ </emphasis>, or <emphasis>
+ <property moreinfo="none">.ear</property>
+ </emphasis> as appropriate, and then copies that file into the proper deploy
+ directory. For quicker smarter deployment, you will need to create archives using
+ the <link linkend="Project_archivesView">Project Archives view</link> and customize
+ packaging yourself.</para>
+ </section>
+
+ <section id="single_file_deployment">
+ <?dbhtml filename="DeployToServer.html"?>
+ <title>Deploying single files</title>
+
+ <para>Sometimes it becomes necessary to deploy one or more files to a server. For
+ that in order not to do a full republish in the context menu of files a <emphasis><property moreinfo="none">Deploy To Server</property></emphasis>
+ option is provided that allows a single file deployment. To deploy these non-WTP files/projects
+ right click on the file (<emphasis>
+ <property moreinfo="none">-ds.xml</property></emphasis>, <emphasis>
+ <property moreinfo="none">.ear</property></emphasis>, <emphasis>
+ <property moreinfo="none">.jar</property></emphasis> etc.) and select <emphasis>
+ <property moreinfo="none">Deploy To Server</property>
+ </emphasis> and it will be automatically deployed.</para>
+ <figure float="0">
+ <title>Deploy to Sever</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The deployed files are listed side-by-side with other modules that are deployed to
+ the server.</para>
+
+ <figure float="0">
+ <title>Deployed files on the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ </section>
+ <section>
+ <title>Deploying with JBoss Server View</title>
+ <para>As it has been already mentioned <property moreinfo="none">JBoss Server View</property> contains two
+ parts: the top part that displays all defined servers and the bottom part which provides
+ categories with additional information. Thus, in this section we suggest two more ways
+ to deploy resources onto the server.</para>
+ <section>
+ <title>Top part of JBoss Server View</title>
+ <para>In the top part of the <property moreinfo="none">JBoss Servers View</property> like in the Servers
+ View you should right click on a server and select the <emphasis>
+ <property moreinfo="none">Add and Remove Projects</property>
+ </emphasis> menu item.</para>
+ <figure float="0">
+ <title>Add and Remove Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>This will bring up a <link linkend="add_rem_proj">familiar dialog</link> allowing
+ you to either publish projects or modules to a server, or remove them from the
+ server. If the selected module is a project like a Dynamic Web project, EJB project,
+ or EAR project, it will be published as through <emphasis>
+ <property moreinfo="none">Run on Server</property>
+ </emphasis> wizard, with a best-guess full package. If, however, the selected
+ element is an archive from the <link linkend="Project_archivesView">Project Archives
+ view</link>, it will be published according to the rules of that module
+ type.</para>
+ </section>
+
+ <section>
+ <title>Bottom part of JBoss Server View</title>
+ <para>In the bottom part of <emphasis>
+ <property moreinfo="none">JBoss Server View</property>
+ </emphasis> there is a category called <emphasis>
+ <property moreinfo="none">Modules</property>
+ </emphasis> which should display all currently-published modules on the server.
+ Right-clicking on the desired module and selecting <emphasis>
+ <property moreinfo="none">Full Publish</property>
+ </emphasis> will force a full rebuild of the entire module.</para>
+ <figure float="0">
+ <title>Full Publish</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here, <emphasis>
+ <property moreinfo="none">Incremental Publish</property>
+ </emphasis> is meant to enable publishing of only those parts where changes have
+ been made.</para>
+ </section>
+ </section>
+ <section>
+ <title>Deploying with Project Archives View</title>
+ <para>In the <property moreinfo="none">Project Archives View</property> you can right-click on any declared
+ archive and select the <emphasis>
+ <property moreinfo="none">Publish To Server</property>
+ </emphasis> element. For more on this subject, see <link linkend="PublishToServer">Publishing to Server</link> in the Project Archives View section.</para>
+ <figure float="0">
+ <title>Publish to Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> The only way to ensure an <emphasis>
+ <property moreinfo="none">Incremental Build</property>
+ </emphasis>, such as changes to one <emphasis>
+ <property moreinfo="none">.jsp</property>, </emphasis>
+ <emphasis>
+ <property moreinfo="none">.html</property>, </emphasis> or <emphasis>
+ <property moreinfo="none">.class</property>
+ </emphasis> file, is to enable the builder for that project. This is done by either
+ changing the global preferences for the <property moreinfo="none">Archives View</property>, or by
+ enabling project-specific preferences and ensuring the builder is on.</para>
+ <para>The last chapter covers a variety of methods on how you can deploy needed modules onto a
+ server.</para>
+ </section>
+</chapter>
+
+
+<chapter id="tptp_support" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/tptp_support.xml">
+ <title>TPTP Support</title>
+ <para>This chapter provides an overview on how to enable TPTP Profiling for <property moreinfo="none">JBoss
+ AS</property> adapters in <property moreinfo="none">JBoss Tools</property>.</para>
+
+ <section>
+ <title>TPTP Profiling</title>
+
+ <para>To get TPTP profiling work on <property moreinfo="none">JBoss Application Server</property> you should
+ first download <ulink url="http://www.eclipse.org/downloads/download.php?file=/tptp/4.5.0/TPTP-4.5.0...">TPTP 4.5.0 Runtime</ulink> and install it, i. e. just add the content of <emphasis>
+ <property moreinfo="none">plugins/features</property>
+ </emphasis> folders from downloaded directory to the same folders in your eclipse
+ installation directory.</para>
+
+ <para>And now all profile actions should work for you. To start <property moreinfo="none">JBoss
+ AS</property> in profiling mode use <emphasis>
+ <property moreinfo="none">Start the server in profiling mode</property>
+ </emphasis> button or <emphasis>
+ <property moreinfo="none">Profile As > Profile on Server</property>
+ </emphasis> option in the context menu of the project.</para>
+
+ <figure float="0">
+ <title>Start the Server in Profiling mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tptp_support/tptp_support_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To enable TPTP features in your workbench use <property moreinfo="none">Profiling and Logging
+ Perspective</property> that you can find in the list of proposed perspectives: <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Other…</property>
+ </emphasis>
+ </para>
+
+ <figure float="0">
+ <title>Profiling and Logging Perspective</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tptp_support/tptp_support_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>All additional information on TPTP(Test and Performance Tools Platform) you can find
+ in <ulink url="http://www.eclipse.org/tptp/home/downloads/4.5.0/documents/quicktour/quic...">eclipse documentation</ulink>.</para>
+ <para>In summary, this reference should help you to start with <ulink url="http://www.jboss.org/jbossas">JBoss AS</ulink> and get to know with functionality
+ for work with it.</para>
+ </section>
+</chapter>
+
+
+</book>
15 years, 11 months
JBoss Tools SVN: r13330 - trunk/ws/docs/reference/en/images.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-01-29 12:05:02 -0500 (Thu, 29 Jan 2009)
New Revision: 13330
Added:
trunk/ws/docs/reference/en/images/jbossws_ws_creation1.png
Log:
Added: trunk/ws/docs/reference/en/images/jbossws_ws_creation1.png
===================================================================
(Binary files differ)
Property changes on: trunk/ws/docs/reference/en/images/jbossws_ws_creation1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months