Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
17.4. Run the Application
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
App1cache, usingAdminApp, and validated they are replicated to the server instance ofAppOne. - Add a value to the
App2cache, then rollback the transaction and confirm that it is not added to the cache after the rollback.
Procedure 17.4. Execute the AdminClient application
- Open a command line and navigate to the
$QUICKSTART_HOME/client/directory. - Execute the following command:
mvn -Dexec.mainClass=org.jboss.as.quickstarts.datagrid.eap.app.AdminClient exec:java
mvn -Dexec.mainClass=org.jboss.as.quickstarts.datagrid.eap.app.AdminClient exec:javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Note
By default the application will attempt to accesslocalhost:4447andlocalhost:4547for theAdminHostandAppOneHost. This may be changed by adding the following parameter to themvncommand:-Dexec.args="AdminHost AdminPort AppOneHost AppOnePort"
-Dexec.args="AdminHost AdminPort AppOneHost AppOnePort"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Confirm that the following text appears in the console; any unexpected results will raise an Exception:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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
App2cache using theAdminAppand accessAppOneto show that the EJB invocation is clustered and bothAppTwoinstances are used.
Procedure 17.5. Execute the AppOneClient
- Open a command line and navigate to the
$QUICKSTART_HOME/client/directory. - Execute the following command:
mvn -Dexec.mainClass=org.jboss.as.quickstarts.datagrid.eap.app.AppOneClient exec:java
mvn -Dexec.mainClass=org.jboss.as.quickstarts.datagrid.eap.app.AppOneClient exec:javaCopy to Clipboard Copied! Toggle word wrap Toggle overflow - 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]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 Copied! Toggle word wrap Toggle overflow