Running Transactions Sample Web Application

The Transactions sample application contains a module that performs updates and either commits the transaction gracefully or aborts by throwing exception within code to simulate rollback. This sample contains a web application that demonstrates the event mechanism.

Running the Transactions sample consists of using the IDE to open the Transactions project, starting the application, entering data in the Transactions web page and clicking the Set Value button on the page to commit the transaction.

Before You Begin

Before performing the following procedure, the Java Card 3 Development Kit, Connected Editon must be downloaded and installed on your development system.

The Transactions project is located under the JC_CONNECTED_HOME\samples\web folder.


Note - Refer to the Java Card 3 Platform Development Kit User’s Guide for additional details including screen captures.


  1. Click File > Open Project in the main window.
  2. Go to the JC_CONNECTED_HOME\samples\web folder and open the Transactions project.
  3. Click the run button in the main window.

    The IDE compiles, builds, and runs the sample. When the sample runs the IDE launches the default browser and displays the Transactions page.

  4. Enter a set of characters in the New Value field and mark the Crash? checkbox.
  5. Click the Set Value button.

    The browser displays a page containing an exception message with the contents of the value field.

  6. In the Transactions page, enter a set of characters in the Value field, do not mark the Crash? checkbox, and click the Set Value button.

    The browser displays the Transactions page with the Current Value updated to the new value.

  7. Close the browser to stop the application.