# Class ServerRuntime

java.lang.Object
org.apache.cayenne.runtime.CayenneRuntime
org.apache.cayenne.configuration.server.ServerRuntime

@Deprecated(since="5.0", forRemoval=true) public class ServerRuntime extends CayenneRuntime
Deprecated, for removal: This API element is subject to removal in a future version.
use `CayenneRuntime` class instead
Object representing Cayenne stack. Serves as an entry point to Cayenne for user applications and a factory of ObjectContexts. Implementation is a thin wrapper of the dependency injection container.

The "Server" prefix in the name is in contrast to ROP "client" (that is started via ClientRuntime). So ServerRuntime is the default Cayenne stack that you should be using in all apps with the exception of client-side ROP.

Since:
  3.1

- ## Field Summary

  ### Fields inherited from class CayenneRuntime

  `injector, modules, threadInjector`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CayenneRuntimeBuilder`
  `builder()`
  Deprecated, for removal: This API element is subject to removal in a future version.
  use `CayenneRuntime.of()` instead
  `static CayenneRuntimeBuilder`
  `builder(String name)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  use `CayenneRuntime.of(String)` instead

  ### Methods inherited from class CayenneRuntime

  `bindThreadInjector, getChannel, getDataDomain, getDataSource, getDataSource, getInjector, getModules, getThreadInjector, newContext, newContext, of, of, performInTransaction, performInTransaction, performInTransaction, performInTransaction, shutdown`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### builder

    @Deprecated(since="5.0", forRemoval=true) public static CayenneRuntimeBuilder builder()
    Deprecated, for removal: This API element is subject to removal in a future version.
    use `CayenneRuntime.of()` instead
    Creates a builder of CayenneRuntime.
    Returns:
      a builder of CayenneRuntime.
    Since:
      4.0

  - ### builder

    @Deprecated(since="5.0", forRemoval=true) public static CayenneRuntimeBuilder builder(String name)
    Deprecated, for removal: This API element is subject to removal in a future version.
    use `CayenneRuntime.of(String)` instead
    Creates a builder of CayenneRuntime.
    Parameters:
      `name` - optional symbolic name of the created runtime.
    Returns:
      a named builder of CayenneRuntime.