Clearing Persistence Units

This section describes how to clear persistence units.

The effect of leaving persistence units in the Persistence Units collection is dictated by a context in which an instance of the application is created. If a client is using the API in the standalone mode, all units are closed. If a client is using the API as an add-in component, then after the client program is over, units are still open and available in the application user interface with the exception of those that were explicitly closed and removed from the persistence unit collection before exiting the program.