이 콘텐츠는 선택한 언어로 제공되지 않습니다.

18.4. Run the Application


Once built the deployed applications may be accessed using the included classes.
Using the AdminClient

In this example neither the AdminServer nor the AppOneServer are clustered at the JBoss EAP level; only the JBoss Data Grid instances are clustered as configured by the application. This application will perform the following:

  • Add values to the App1 cache, using AdminApp, and validated they are replicated to the server instance of AppOne.
  • Add a value to the App2 cache, then rollback the transaction and confirm that it is not added to the cache after the rollback.

Procedure 18.4. Execute the AdminClient application

  1. Open a command line and navigate to the $QUICKSTART_HOME/client/ directory.
  2. Execute the following command:
    mvn -Dexec.mainClass=org.jboss.as.quickstarts.datagrid.eap.app.AdminClient exec:java
    Copy to Clipboard Toggle word wrap

    Note

    By default the application will attempt to access localhost:4447 and localhost:4547 for the AdminHost and AppOneHost. This may be changed by adding the following parameter to the mvn command:
    -Dexec.args="AdminHost AdminPort AppOneHost AppOnePort"
    Copy to Clipboard Toggle word wrap
  3. Confirm that the following text appears in the console; any unexpected results will raise an Exception:
    Add a value to App1Cache with the AdminApp and check on the same instance that the value is correct added
        success
    Check the previous added value of App1Cache by accessing the AppOne Server
        success
    Add a value to App2Cache and check on the same instance that the value is correct added
        success
    Check whether changes to a cache are rollbacked if the transaction fail
        The cache App2 work as expected on rollback
    Copy to Clipboard Toggle word wrap
Using the AppOneClient

In this example both JBoss EAP and the JBoss Data Grid caches are clustered; however, the purpose of this example is to demonstrate that the clusters are independent of one other. The JBoss Data Grid cluster is able to use a different JGroups implementation compared to the JBoss EAP servers, and this example will:

  • Add values to the App2 cache using the AdminApp and access AppOne to show that the EJB invocation is clustered and both AppTwo instances are used.

Procedure 18.5. Execute the AppOneClient

  1. Open a command line and navigate to the $QUICKSTART_HOME/client/ directory.
  2. Execute the following command:
    mvn -Dexec.mainClass=org.jboss.as.quickstarts.datagrid.eap.app.AppOneClient exec:java
    Copy to Clipboard Toggle word wrap
  3. Confirm that the following text appears in the console; any unexpected results will raise an Exception:
    Add a value to App2Cache with the AdminApp
    Access the App2Cache from the AppOneServer by using the clustered EJB@AppTwoServer
        success : received the following node names for EJB invocation : [node3, node4]
    Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat