2016/02/07 - Apache Onami has been retired.

For more information, please explore the Attic.

public interface

PersistenceService

org.apache.onami.persist.PersistenceService

Class Overview

This is the main control to the entire persistence engine. Before calling any other method of either UnitOfWork, EntityManagerProvider, or any method annotated with @Transactional the persistence service must be started.

Summary

Public Methods
abstract boolean isRunning()
abstract void start()
Starts the underlying persistence engine and makes onami-persist ready for use.
abstract void stop()
Stops the underlying persistence engine.

Public Methods

public abstract boolean isRunning ()

Returns
  • true if the underlying persistence engine is running. false otherwise.

public abstract void start ()

Starts the underlying persistence engine and makes onami-persist ready for use. This method must be called by your code prior to using any other onami-persist artifacts. If you are using onami-persist in a web container PersistenceFilter will call this method upon initialization of the web application.

Throws
IllegalStateException if the service is already running.

public abstract void stop ()

Stops the underlying persistence engine.

  • If already stopped, calling this method does nothing.
  • If not yet started, it also does nothing.