Skip to content
Call4Papers app using Seam 3 modules.
Find file
New pull request
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
<meta name="generator" content="HTML::TextToHTML v2.51"/>
<h1><a name="section_1">call4all</a></h1>
<p> <strong>Source archetype:</strong> jboss-javaee6-webapp
</p><h2><a name="section_1_1">What is it?</a></h2>
<p> This is your project! It's a sample, deployable Maven 3 project to help you
 get your foot in the door developing with Java EE 6. This project is setup to
 allow you to create a compliant Java EE 6 application using JSF 2.0, CDI 1.0,
 EJB 3.1, JPA 2.0 and Bean Validation 1.0 that can run on a certified
 application server (Full or Web Profile). It includes a persistence unit and
 some sample persistence and transaction code to help you get your feet wet
 with database access in enterprise Java. 
</p><h2><a name="section_1_2">System requirements</a></h2>
<p> All you need to build this project is Java 5.0 (Java SDK 1.5) or better, Maven
 3.0 or better. We strongly recommend, however, that you use Java 6.0 (Java SDK
</p><p> The application this project produces is designed to be run on a Java EE 6
 application server. We recommend JBoss AS 6.0.0.Final or GlassFish 3.1, though
 it should work on any server that is Java EE 6 compliant. In order to use it
 on GlassFish 3.1, you'll need to update Weld. See instructions below.
<dd> This project retrieves artifacts from the JBoss Community Maven repository, a
 superset of the Maven central repository, because there are certain Java EE
 API JARs that are not published to Maven central (for details, see the JIRA
 <a href=""></a>). The integration testing
 framework used by the project, Arquillian, is also only available in the JBoss
 Community Maven repository.</dd></dl>
<p> With the prerequisites out of the way, you're ready to build and deploy.
</p><h2><a name="section_1_3">Deploying the application</a></h2>
<p> To deploy the application, you first need to produce the archive to deploy using
 the following Maven goal:
  mvn package</pre>
<p> If you want to deploy the application on JBoss AS (standalone), make sure that
 your JBOSS_HOME environment variable points to a JBoss AS 6 installation.
</p><p> Alternatively, you can set the location of JBoss AS using the following
 profile definition in the .m2/settings.xml file in your home directory:
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
     xmlns="<a href=""></a>"
     xmlns:xsi="<a href=""></a>"
     xsi:schemaLocation="<a href=""></a> <a href=""></a>"&gt;
<p> Once you've set either the JBOSS_HOME environment variable or the jboss.home
 Maven property, you can deploy to JBoss AS by executing the following command:
  mvn package jboss:hard-deploy</pre>
<p> This will deploy two artifacts, target/call4all.war and
<dd> Don't forget to deploy default-ds.xml!  </dd><dt>NOTE</dt>
<dd> The default-ds.xml file installs a data source named jdbc/__default, so that
 both JBoss AS and GlassFish have a data source with the same name.</dd></dl>
<p> You can also set jboss.home on the commandline:
  mvn package jboss:hard-deploy -Djboss.home=/path/to/jboss-as-6.0.0.Final</pre>
<p> In all, you have three options to set the path of your JBoss AS installation:
  <li>Set the JBOSS_HOME environment variable (e.g., export JBOSS_HOME=/path/to/jboss-as)
  </li><li>Define the jboss.home Maven property in $HOME/.m2/settings.xml
  </li><li>Override the jboss.home Maven property from the commandline using -Djboss.home=/path/to/jboss-as</li></ol>
<p> Now start JBoss AS. The application will be running at the following URL:
  <li><a href="http://localhost:8080/call4all/">http://localhost:8080/call4all/</a></li></ul>
<p> To undeploy from JBoss AS, run this command:
  mvn jboss:hard-undeploy</pre>
<p> There are several ways to deploy the archive to GlassFish. The recommended
 approach is to open the project in NetBeans 6.8, right-click on the project
 and select "Run" from the context menu. That starts JavaDB, GlassFish and
 deploys the application. NetBeans then provides incremental deployment of web
<dd> Don't forget to upgrade Weld. See Upgrading Weld in GlassFish 3.1 for details.</dd></dl>
<p> You can also start GlassFish from the commandline. Change to the glassfish/bin
 directory in the GlassFish install root and run these three commands (leading
 ./ not required on Windows):
  ./asadmin start-database
  ./asadmin start-domain domain1</pre>
<dd> Don't forget to start the JavaDB database!  </dd><dt>NOTE</dt>
<dd> NetBeans starts the database automatically when it starts up GlassFish. If you
 have the GlassFish Tools Eclipse plug-in, you have to enable this feature.
 Select Window &gt; Preferences &gt; GlassFish Server Preferences and check the
 option "Start JavaDB database process when &gt; Starting GlassFish Server"</dd></dl>
<p> Now you can either deploy the target/call4all.war through the
 web-based GlassFish admininstration console, or you can again use asadmin:
  ./asadmin deploy target/call4all.war</pre>
<p> To undeploy the application, run:
  ./asadmin undeploy call4all</pre>
<h2><a name="section_1_4">Upgrading Weld in GlassFish 3.1</a></h2>
<p> There are several known CDI visibility issues in the stock version of Weld
 that ships with GlassFish 3.1. One of these issues affects the sample code in
 this application. For more information, see <a href=""></a>.
</p><p> You can upgrade Weld by following these steps:
  <li>Stop GlassFish
  </li><li>Download the most recent Weld OSGi Bundle 1.1.0-SNAPSHOT (<a href=""></a>)
  </li><li>Copy that jar to $GLASSFISH_HOME/glassfish/modules/weld-osgi-bundle.jar
  </li><li>Start GlassFish</li></ol>
<p> You can now deploy the application successfully to GlassFish 3.1.
</p><h2><a name="section_1_5">Running the Arquillian tests</a></h2>
<p> By default, tests are configured to be skipped. The reason is that the sample
 test is an Arquillian test, which requires the use of a container. You can
 activate this test by selecting one of the two container configurations
 provided, JBoss AS 6 (remote) or GlassFish 3 (embedded).
</p><p> To run the test in Embedded GlassFish, first make sure that you don't have a
 GlassFish container running (to avoid port conflicts). Then run the test goal
 with the following profile activated:
  mvn clean test -Parq-glassfish-embedded</pre>
<p> (The clean goal is only required when you switch between containers)
</p><p> To run the test in JBoss AS 6, first start a JBoss AS 6 instance. Then, run the
 test goal with the following profile activated:
  mvn clean test -Parq-jbossas-remote</pre>
<p> Consult the Arquillian reference documentation to register profiles for any
 supported container.
  <li><a href=""></a></li></ul>
<h2><a name="section_1_6">Importing the project into an IDE</a></h2>
<p> If you created the project using the Maven archetype wizard in your IDE
 (Eclipse, NetBeans or IntelliJ IDEA), then there is nothing to do. You should
 already have an IDE project.
</p><p> If you created the project from the commandline using archetype:generate, then
 you need to import the project into your IDE. If you are using NetBeans 6.8 or
 IntelliJ IDEA 9, then all you have to do is open the project as an existing
 project. Both of these IDEs recognize Maven projects natively.
</p><p> To import the project into Eclipse, you need the m2eclipse plugins installed.
 Installation instructions are provided on the m2eclipse project site:
  <li><a href=""></a></li></ul>
<p> Here's the quick guide:
  <li>Select Help &gt; Install New Software...
  </li><li>Click the Add... button
  </li><li>Add the repository URL <a href=""></a>
  </li><li>Select and install the Maven Integration for Eclipse
  </li><li>Restart as suggested
  </li><li>Repeat the first two steps
  </li><li>Add the repository URL <a href=""></a>
  </li><li>Select and install the Maven Integration for WTP (Optional)
  </li><li>Restart as suggested</li></ul>
<p> Once the m2eclipse plugins are installed, you'll be ready to import the
 project into Eclipse and run the project on a Java EE server. We also
 recommend that you install the JBoss Tools plugins if you plan to deploy
 to JBoss AS - <a href=""></a>
<dd> If you are using Eclipse as your IDE, we we strongly recommend that you use
 Eclipse 3.6 (Helios) - <a href=""></a></dd></dl>
<p> Select File &gt; Import. . . and choose the Maven &gt; Existing Maven Projects option.
 Navigate to the root directory of your project. Eclipse should recognize the
 Maven project and preselect it in the Project box. Click Finish and m2eclipse
 will take it from there.
<dd> You cannot use the import option General &gt; Existing Projects into Workspace
 because Eclipse does not recognize Maven projects as Eclipse projects
 natively. You must use the importer provided by m2eclipse as just described.</dd></dl>
<p> Additional configuration is required to get Eclipse to generate the JPA
 metamodel. The archetype includes the necessary Eclipse config files in your
 project. To enable this feature, right click on the project and select:
  Properties &gt; Java Compiler &gt; Annotation Processing</pre>
<p> Check "Enable annotation processing" then click OK and OK again when your are
 prompted to run a project build.
</p><p> This configuration is described in further detail in the Hibernate JPA documentation:
  <li><a href=""></a></li></ul>
<p> Once the project is imported into the IDE, you can execute the Maven commands
 through the IDE controls to deploy the application to a container.
</p><p> To deploy to GlassFish from Eclipse, you'll need the GlassFish Tools Bundle,
 available at the update site <a href=""></a>
 or from the Help &gt; Eclipse Marketplace. . .
</p><h2><a name="section_1_7">Downloading the sources and Javadocs</a></h2>
<p> If you want to be able to debug into the source code or look at the Javadocs
 of any library in the project, you can run either of the following two
 commands to pull them into your local repository. The IDE should then detect
  mvn dependency:sources
  mvn dependency:resolve -Dclassifier=javadoc</pre>
<h2><a name="section_1_8">Resources</a></h2>
  <li>Weld archetypes
    <li>Quickstart:         <a href=""></a>
    </li><li>Issue tracker:      <a href=""></a>
    </li><li>Source code:        <a href=""></a>
    </li><li>Forums:             <a href=""></a>
  </li><li>JSR-299 overview:     <a href=""></a>
  </li><li>JSF community site:   <a href=""></a>
  </li><li>Download JBoss AS:    <a href=""></a>
  </li><li>Download GlassFish:   <a href=""></a>

Something went wrong with that request. Please try again.