Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (53 sloc) 3.05 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.

You can’t perform that action at this time.