public class ServerRuntime extends CayenneRuntime
ClientRuntime
). Any application, desktop, server, etc.
that has a direct JDBC connection should be using this runtime.injector, modules, threadInjector
Constructor and Description |
---|
ServerRuntime(String[] configurationLocations,
Module... extraModules)
Creates a server runtime configuring it with a standard set of services contained
in
ServerModule . |
ServerRuntime(String configurationLocation,
Module... extraModules)
Creates a server runtime configuring it with a standard set of services contained
in
ServerModule . |
Modifier and Type | Method and Description |
---|---|
DataDomain |
getDataDomain()
Returns the main runtime DataDomain.
|
DataSource |
getDataSource(String dataNodeName)
Provides access to the JDBC DataSource assigned to a given DataNode.
|
bindThreadInjector, getChannel, getContext, getContext, getInjector, getModules, getThreadInjector, mergeModules, mergeModules, shutdown
public ServerRuntime(String configurationLocation, Module... extraModules)
ServerModule
. CayenneServerModule is created with provided
'configurationLocation'. An optional array of extra modules may contain service
overrides and/or user services.public ServerRuntime(String[] configurationLocations, Module... extraModules)
ServerModule
. CayenneServerModule is created with one or more
'configurationLocations'. An optional array of extra modules may contain service
overrides and/or user services.public DataDomain getDataDomain()
CayenneRuntime.getChannel()
. Although
users may redefine DataChannel provider in the DI registry, for instance to
decorate this DataDomain with a custom wrapper.public DataSource getDataSource(String dataNodeName)
Normally Cayenne applications don't need to access DataSource or any other JDBC code directly, however in some unusual conditions it may be needed, and this method provides a shortcut to raw JDBC.
Copyright © 2001–2018 Apache Cayenne. All rights reserved.