Este contenido no está disponible en el idioma seleccionado.

14.8. The (Transactional) CarMart Quickstart Using JBoss Enterprise Web Server


This CarMart Transactional quickstart requires JBoss Data Grid's Library mode with the JBoss Enterprise Web Server container.
All the required libraries (jar files) are bundled with the application and deployed to the server. Caches are configured programatically and run in the same JVM as the web application for this quickstart.
Additionally, all operations are transactional. The standalone transaction manager from JBoss Transactions is used to run the application in JBoss Enterprise Web Server.
Only the library-tomcat profile can be used when running this quickstart with JBoss Enterprise Web Server because this profile enables library mode.

14.8.1. Quickstart Prerequisites

The prerequisites for this quickstart are as follows:

14.8.2. Build and Deploy the Transactional CarMart Quickstart

Prerequisites

Ensure that the following prerequisites are met before building and deploying the CarMart quickstart.

  1. To configure JBoss Enterprise Web Server, add the following lines to the conf/tomcat-users.xml file:
    <role rolename="manager-script"/>
        <user username="admin" password="admin" roles="manager-script"/>
    Copy to Clipboard Toggle word wrap
  2. Configure Maven by adding the following configuration information to the Maven settings.xml file with the appropriate credentials:
    <server>
    	<id>tomcat</id>
    	<username>admin</username>
    	<password>admin</password>
    </server>
    Copy to Clipboard Toggle word wrap
  3. Start JBoss Enterprise Web Server:
    1. In a command line terminal, navigate to the root of the JBoss Enterprise Web Server directory.
    2. Use one of the following commands to start the server with a web profile:
      For Linux:
      $TOMCAT_HOME/bin/catalina.sh run
      Copy to Clipboard Toggle word wrap
      For Windows:
      %TOMCAT_HOME%\bin\catalina.bat run
      Copy to Clipboard Toggle word wrap

Procedure 14.15. Build and Deploy the Transactional CarMart Quickstart

  1. In a command line terminal, navigate to the root directory for the quickstart.
  2. Enter the following command to build and deploy archive:
    mvn -Plibrary-tomcat clean package tomcat:deploy
    Copy to Clipboard Toggle word wrap
  3. The target/jboss-carmart-tx.war file is deployed to the running instance of JBoss Enterprise Web Server.

14.8.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 14.16. View the CarMart Quickstart

  • To view the application, use your browser to navigate to the following link:
    http://localhost:8080/jboss-carmart-tx
    Copy to Clipboard Toggle word wrap

14.8.4. Undeploy The Transactional CarMart Quickstart

Undeploy the transactional CarMart quickstart as follows:
  1. In a command line terminal, navigate to the root directory of the quickstart.
  2. Undeploy the archive as follows:
    mvn -Plibrary-tomcat tomcat:undeploy
    Copy to Clipboard Toggle word wrap

14.8.5. Test the Transactional CarMart Quickstart

The JBoss Data Grid quickstarts include Arquillian Selenium tests. To run these tests:
  1. Stop JBoss Enterprise Web Server, if it is running.
  2. In a command line terminal, navigate to root directory for the quickstart.
  3. Build the quickstarts as follows:
    mvn clean package
    Copy to Clipboard Toggle word wrap
  4. Run the tests as follows:
    mvn test -Puitests-jbossas -Das7home=/path/to/server
    Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat