Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 2.92 KB

README.adoc

File metadata and controls

70 lines (51 loc) · 2.92 KB

helloworld-singleton: Helloworld Using a Singleton EJB

The helloworld-singleton quickstart demonstrates an EJB Singleton Bean that is instantiated once and maintains state for the life of the session.

What is it?

The helloworld-singleton quickstart demonstrates the use of an EJB Singleton Bean in {productNameFull}. It is instantiated once and maintains its state for the life of the session.

Access the Application

The application will be running at the following URL: http://localhost:8080/{artifactId}/.

This example demonstrates a singleton session bean that maintains state information for 2 variables: Increment A and Increment B.

A counter is incremented when you click on the link to the variable name. If you close and restart your browser, or if you have multiple browsers, you can see that the counter always increments the last value. These values are maintained until you restart the server.

To test the singleton bean, click on either Increment A or Increment B. The result page will give you the current value of the variable.