A non-toolkit application can use the CHA EJBs as a way of storing runtime data in a remote environment.
The application accesses the CHASession session bean to create a CHAInstance bean to store the data. The CHAInstance can be anonymous or named depending on whether the application supplies an identifier. Anonymous CHAInstances have a generated unique ID that the application can obtain from the session bean. The application can then use this ID to manipulate the CHAInstance. If the application names the CHAInstance, the name must be unique across the entire system. An option exists for a CHAInstance factory to add values to the application supplied name to ensure the name is unique. Once the CHASession has created the CHAInstance, the application can then use the CHAInstance API.
The CHA EJBs provide both local and remote interfaces. Using the local CHA interfaces whenever possible improves performance by reducing EJB JNDI interaction and serialization activities.