此内容没有您所选择的语言版本。
13.7. The (Transactional) CarMart Quickstart Using JBoss EAP
This CarMart Transactional quickstart requires JBoss Data Grid's Library mode with the JBoss Enterprise Application Platform container.
All required libraries (jar files) are bundled with the application and deployed to the server. Caches are configured programmatically and run in the same JVM as the web application.
All operations are transactional and are configured at
JBossASCacheContainerProvider
/TomcatCacheContainerProvider
implementation classes for the CacheContainerProvider
interface.
13.7.1. Quickstart Prerequisites 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The prerequisites for this quickstart are as follows:
- Java 6.0 (Java SDK 1.6) or better
- JBoss Enterprise Application Platform 6.x or JBoss Enterprise Web Server 2.x
- Maven 3.0 or better
- Configure the Maven Repository. For details, see Chapter 3, Install and Use the Maven Repositories
Prerequisites
Ensure that the following prerequisites are met before building and deploying the CarMart quickstart.
- Configure Maven (See Section 13.7.1, “Quickstart Prerequisites”)
- Start JBoss Enterprise Application Platform:
- In a command line terminal, navigate to the root of the JBoss EAP server directory.
- Use one of the following commands to start the server with a web profile:For Linux:
$JBOSS_HOME/bin/standalone.sh
$JBOSS_HOME/bin/standalone.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For Windows:%JBOSS_HOME%\bin\standalone.bat
%JBOSS_HOME%\bin\standalone.bat
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 13.13. Build and Deploy the Transactional Quickstart
- In a command line terminal, navigate to the root of the JBoss EAP server directory.
- Enter the following command to build and deploy the archive:
mvn clean package jboss-as:deploy
mvn clean package jboss-as:deploy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
target/jboss-carmart-tx.war
file is deployed to the running instance of the server.
13.7.3. View the Transactional CarMart Quickstart 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The following procedure outlines how to view the CarMart quickstart:
Prerequisite
The CarMart quickstart must be built and deployed to be viewed.
Procedure 13.14. View the CarMart Quickstart
- To view the application, use your browser to navigate to the following link:
http://localhost:8080/jboss-carmart-tx
http://localhost:8080/jboss-carmart-tx
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.7.4. Undeploy The Transactional CarMart Quickstart 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Undeploy the transactional CarMart quickstart as follows:
- In a command line terminal, navigate to the root directory of the quickstart.
- Undeploy the archive as follows:
mvn jboss-as:undeploy
mvn jboss-as:undeploy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
13.7.5. Test the Transactional CarMart Quickstart 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
The JBoss Data Grid quickstarts include Arquillian Selenium tests. To run these tests:
- Stop JBoss EAP, if it is running.
- In a command line terminal, navigate to root directory for the quickstart.
- Build the quickstarts as follows:
mvn clean package
mvn clean package
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the tests as follows:
mvn test -Puitests-jbossas -Das7home=/path/to/server
mvn test -Puitests-jbossas -Das7home=/path/to/server
Copy to Clipboard Copied! Toggle word wrap Toggle overflow