Singleton Session EJB: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
==Overview==
==Overview==


A ''singleton session bean'' is a component that is instantiated once per application. For distributed applications that span multiple VMs, each application will have on singleton session bean instance ''per JVM''. The instances are intended to be shard, and must support [[#Concurrency|concurrent access]].
A ''singleton session bean'' is a component that is instantiated once per application. For distributed applications that span multiple VMs, each application will have on singleton session bean instance ''per JVM''. The instances are intended to be shard, and must support [[#Concurrency|concurrent access]]. The Singleton bean instances maintain state between invocations, but the state is not required to survive container shutdown or crash.


==Lifecycle==
==Lifecycle==

Revision as of 18:46, 27 April 2017

Internal

Concepts

Overview

A singleton session bean is a component that is instantiated once per application. For distributed applications that span multiple VMs, each application will have on singleton session bean instance per JVM. The instances are intended to be shard, and must support concurrent access. The Singleton bean instances maintain state between invocations, but the state is not required to survive container shutdown or crash.

Lifecycle

Once instantiated, the Singleton bean instance lives for the duration of the application.

Dependencies between Singletons

Transactional Behavior

Concurrency

Also see

EJB Concepts - Concurrency

Interceptors

Restrictions

Singleton beans must not implement javax.ejb.SessionSychronization interface or use the session synchronization annotations.