[seam-commits] Seam SVN: r15137 - branches/community/Seam_2_3/seam-migration-guide.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Sep 13 14:04:04 EDT 2012


Author: dhinojosa
Date: 2012-09-13 14:04:04 -0400 (Thu, 13 Sep 2012)
New Revision: 15137

Modified:
   branches/community/Seam_2_3/seam-migration-guide/
   branches/community/Seam_2_3/seam-migration-guide/seam_migration_guide.asc
Log:
added ear content to migration guide


Property changes on: branches/community/Seam_2_3/seam-migration-guide
___________________________________________________________________
Added: svn:ignore
   + seam_migration_guide.html
docbook-xsl.css
.*.swp
.*.swo


Modified: branches/community/Seam_2_3/seam-migration-guide/seam_migration_guide.asc
===================================================================
--- branches/community/Seam_2_3/seam-migration-guide/seam_migration_guide.asc	2012-09-13 15:09:34 UTC (rev 15136)
+++ branches/community/Seam_2_3/seam-migration-guide/seam_migration_guide.asc	2012-09-13 18:04:04 UTC (rev 15137)
@@ -27,25 +27,25 @@
 
 The folder organization of Seam 2.3 in Maven typically consists of one main project, the `pom` project.  The `pom` project in Maven, is the project that doesn't have any source files onto itself but contains the projects that are required for the build. In an ear based project.  Inside of the `pom` ear based project folder contains three subfolders one for the ear project, one for the war project, one for the arquillian (formerly seam test) project, and one for the ejb project.  Given a parent `pom` project called `myproject`, some ideas for the the subfolders would include `myproject-ear`, `myproject-web`, `myproject-test`, and `myproject-ejb`.  You can refer to the examples in the *examples-ee6* folder for some general ideas as to how to create the folder organization for your Seam 2.3 project.  
 
-Taking the folder structure of the *registration* module in the *examples-ee6* folder of the Seam 2.3. distribution.  The <<earprojectstructure,registration folder structure>> shown below shows the typical setup.
+Taking the folder structure of the *registration* module in the *examples-ee6* folder of the Seam 2.3. distribution.  The <<figure1,registration folder structure>> shown below shows the typical setup.
 
 .Typical ear project structure
-[[earprojectstructure]]
+[[figure1]]
 image::ear_structure.png[Seam 2.3 Ear Setup,scaledwidth="50%",scaledheight="50%"]
 
 The pom.xml in the bottom of the diagram is the parent pom that contains modules for `registration-ear`, `registration-web`, `registration-test`, and `registration-ejb`. It will also contain http://http://maven.apache.org/pom.html#Plugin_Management[plugin management] and http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html[dependency management] information for each of the submodules. Inside of each module, there is another child pom that has information on it's own dependencies and plugins. 
 
 ==== Ear Module
-The ear project submodule will typically contain all ear based configurations with no source files whatsoever.  The module is short, since not much needs to be held within it.  <<listing3, Listing 3>> contains the folder structure of what is contained inside of an ear module.  The `src/main/application/META-INF` will store the configuration files necessary to create an ear file.  Namely the `jboss-deployment-structure.xml` and any `*-ds.xml` iron-jacamar database descriptor file that is required for deployment.
+The ear project submodule will typically contain all ear based configurations with no source files whatsoever.  The module is short, since not much needs to be held within it.  <<figure2, Figure 2>> contains the folder structure of what is contained inside of an ear module.  The `src/main/application/META-INF` will store the configuration files necessary to create an ear file.  Namely the `jboss-deployment-structure.xml` and any `*-ds.xml` iron-jacamar database descriptor file that is required for deployment.
 
 .ear module
-[[listing3]]
+[[figure2]]
 image::ear_module.png[Ear Module Structure,scaledwidth="50%",scaledheight="50%"]
 
-The `jboss-deployment-structure.xml` file contains what resources will be made available by the Jboss 7.1.1 server modules.  In order to investigate what modules are available by your Jboss server navigate to the `modules` directory on whatever server type you will be running. If you are a running a `standalone` server then the modules directory will be located in the `$JBOSS_HOME/server/standalone/modules` directory. 
+The `jboss-deployment-structure.xml` file contains what resources will be made available by the Jboss 7.1.1 server modules.  In order to investigate what modules are available by your Jboss server navigate to the `modules` directory on whatever server type you will be running. If you are a running a `standalone` server then the modules directory will be located in the `$JBOSS_HOME/server/standalone/modules` directory. If you wish to call up the dependencies so that they are in use for your project, and so that you do not have to package those dependencies select which server libraries should be used in your project. `export` means that the dependencies will be exported, so any module that depends on this module will also get access to the dependency. See https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7[Classloading in AS7] for more information jboss-deployment-structure.  <<listing1, Listing1>> shows an example of the jboss-deployment-structure.xml that makes !
 use of system dependencies where export="true" will make them available to any dependency jar and war files within the ear file.
 
-.Sample jboss-deployment-structure.xml
-[[listing4]]
+.Listing 1: Sample jboss-deployment-structure.xml
+[[listing1]]
 ----
 <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
    <deployment>
@@ -60,6 +60,47 @@
    </deployment>
 </jboss-deployment-structure> 
 ----
+
+You can also include now any database descriptor (*-ds.xml) files into your project in the META-INF directory, and they the data source will be deployed automatically when deployed to a JBoss AS 7.1 Application Server.  The structure of the file though has changed. Before the ds.xml file was a simple xml based file, but now is an https://www.jboss.org/ironjacamar[Iron-Jacamar] based file.  Iron-Jacamar is the Jboss' JCA (Java Connector Architecture) project. Below on <<listing2,Listing 2>> is the former datasource in 2.2, and <<listing3,Listing 3>> shows the conversion to Iron Jacamar using the same driver, url, and credentials.  
+
+.Listing 2: Sample Seam 2.2 Datasource Descriptor File
+[[listing2]]
+----
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE datasources
+        PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+        "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+   <local-tx-datasource>
+      <jndi-name>seamdiscsDatasource</jndi-name>
+      <connection-url>jdbc:hsqldb:.</connection-url>
+      <driver-class>org.hsqldb.jdbcDriver</driver-class>
+      <user-name>sa</user-name>
+      <password></password>
+   </local-tx-datasource>
+</datasources>
+----
+
+.Listing 3: Sample Seam 2.3 Datasource Descriptor File
+[[listing3]]
+----
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
+    <datasource 
+        jndi-name="java:/jboss/seamdiscsDatasource" 
+        enabled="true" 
+        use-java-context="true" pool-name="seamdiscs">
+        <connection-url>jdbc:hsqldb:.</connection-url>
+        <driver>org.hsqldb.jdbcDriver</driver>
+        <security>
+            <user-name>sa</user-name>
+            <password></password>
+        </security>
+    </datasource>
+</datasources>
+----
+
 ==== Web Module
 Web stuff
 



More information about the seam-commits mailing list