This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
forked from mareknovotny/jboss-seam
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Examples: updated booking, groovybooking, hibernate
- Loading branch information
1 parent
6e573aa
commit fc3e880
Showing
18 changed files
with
601 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
Seam Booking Example | ||
================= | ||
|
||
This example demonstrates the use of Seam in a Java EE 6 environment. | ||
Transaction and persistence context management is handled by the EJB container. This example runs on JBoss AS as an EAR. | ||
|
||
Running the example | ||
------------------- | ||
|
||
### Using Maven | ||
|
||
To deploy the example to a running JBoss AS instance, follow these steps: | ||
|
||
1. In the example root directory run: | ||
|
||
mvn clean install | ||
|
||
2. Set JBOSS_HOME environment property. | ||
|
||
3. In the booking-ear directory run: | ||
|
||
mvn jboss-as:deploy | ||
|
||
4. Open this URL in a web browser: http://localhost:8080/seam-booking | ||
|
||
### Using Ant | ||
|
||
1. In the example root directory run: | ||
|
||
ant clean package | ||
|
||
2. Copy seam-booking.ear from directory booking-ear/target to the deployment directory of JBoss AS ($JBOSS_HOME/standalone/deployments by default) | ||
|
||
3. Open this URL in a web browser: http://localhost:8080/seam-booking | ||
|
||
|
||
Testing the example | ||
------------------- | ||
|
||
This example is covered by integration and functional tests. All tests use the following technologies: | ||
|
||
* __Arquillian__ - as the framework for EE testing, for managing of container lifecycle and deployment of test archive, | ||
* __ShrinkWrap__ - to create the test archive (WAR). | ||
|
||
|
||
### Integration tests | ||
|
||
Integration tests cover core application logic and reside in the EJB module. In addition to Arquillian and ShrinkWrap, the integration tests also use: | ||
|
||
* __JUnitSeamTest__ - to hook into the JSF lifecycle and assert server-side state, | ||
* __ShrinkWrap Resolver__ - to resolve dependencies of the project for packaging in the test archive. | ||
|
||
The tests are executed in Maven's test phase. By default they are skipped and can be executed on JBoss AS with: | ||
|
||
mvn clean test -Darquillian=jbossas-managed-7 | ||
|
||
The `JBOSS_HOME` environment variable must be set and point to a JBoss AS instance directory. | ||
|
||
To test on a running server, use | ||
|
||
mvn clean test -Darquillian=jbossas-remote-7 | ||
|
||
### Functional tests | ||
|
||
Functional tests are located in a separate project and are not run during the build of the example. They test the built archive in an application server through browser-testing. They use: | ||
|
||
* __Arquillian Graphene Extension__ - an advanced Ajax-capable type-safe Selenium-based browser testing tool, | ||
* __Arquillian Drone Extension__ - to automatically run and stop browser instances. | ||
|
||
Run the functional test on JBoss AS instance with | ||
|
||
mvn -f booking-ftest/pom.xml clean test | ||
|
||
The `JBOSS_HOME` environment variable must be set and point to a JBoss AS instance directory. | ||
|
||
To test on a running server, use | ||
|
||
mvn -f booking-ftest/pom.xml clean test -Dremote | ||
|
||
Testing in JBDS | ||
--------------- | ||
### Integration tests | ||
|
||
1. Open JBDS and start a configured instance of JBoss AS | ||
|
||
2. Import the example project and its submodules | ||
|
||
3. In the _Project Explorer_, select the EJB module project, then | ||
1. Type `Ctrl+Alt+P` (_Select Maven Profiles_) and check `integration-tests` and `arq-jbossas-7-remote` | ||
2. Right-click the module and select _Run As_ - _JUnit Test_ | ||
|
||
### Functional tests | ||
|
||
1. Open JBDS and start a configured instance of JBoss AS | ||
|
||
2. Import the `ftest` project of the example | ||
|
||
3. In the _Project Explorer_, select the ftest project, then | ||
1. Type `Ctrl+Alt+P` (_Select Maven Profiles_) and activate `arq-remote` profile and deactivate `arq-managed` profile | ||
2. Right-click the module and select _Run As_ - _JUnit Test_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Seam GroovyBooking Example | ||
================= | ||
|
||
This is the Hotel Booking example implemented in Groovy Beans and Hibernate JPA. | ||
The application is deployed as a WAR rather than an EAR. | ||
|
||
Running the example | ||
------------------- | ||
|
||
To deploy the example to a running JBoss AS instance, follow these steps: | ||
|
||
1. In the example root directory run: | ||
|
||
mvn clean install | ||
|
||
2. Set JBOSS_HOME environment property. | ||
|
||
3. In the groovybooking-web directory run: | ||
|
||
mvn jboss-as:deploy | ||
|
||
4. Open this URL in a web browser: http://localhost:8080/groovybooking-web | ||
|
||
|
||
Testing the example | ||
------------------- | ||
|
||
This example is covered by functional tests. All tests use the following technologies: | ||
|
||
* __Arquillian__ - as the framework for EE testing, for managing of container lifecycle and deployment of test archive, | ||
* __ShrinkWrap__ - to create the test archive (WAR). | ||
|
||
|
||
### Functional tests | ||
|
||
Functional tests are located in a separate project and are not run during the build of the example. They test the built archive in an application server through browser-testing. They use: | ||
|
||
* __Arquillian Graphene Extension__ - an advanced Ajax-capable type-safe Selenium-based browser testing tool, | ||
* __Arquillian Drone Extension__ - to automatically run and stop browser instances. | ||
|
||
Run the functional test on JBoss AS instance with | ||
|
||
mvn -f groovybooking-ftest/pom.xml clean test | ||
|
||
The `JBOSS_HOME` environment variable must be set and point to a JBoss AS instance directory. | ||
|
||
To test on a running server, use | ||
|
||
mvn -f groovybooking-ftest/pom.xml clean test -Dremote | ||
|
||
Testing in JBDS | ||
--------------- | ||
### Functional tests | ||
|
||
1. Open JBDS and start a configured instance of JBoss AS | ||
2. Import the `ftest` project of the example | ||
3. In the _Project Explorer_, select the ftest project, then | ||
1. Type `Ctrl+Alt+P` (_Select Maven Profiles_) and activate `arq-remote` profile and deactivate `arq-managed` profile | ||
2. Right-click the module and select _Run As_ - _JUnit Test_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.