Class PropertyDataSourceFactory
java.lang.Object
org.apache.cayenne.configuration.server.PropertyDataSourceFactory
- All Implemented Interfaces:
- DataSourceFactory
public class PropertyDataSourceFactory extends Object implements DataSourceFactory
A DataSourceFactrory that creates a DataSource based on system properties.
 Properties can be set per domain/node name or globally, applying to all nodes
 without explicit property set. The following properties are supported:
 
- cayenne.jdbc.driver[.domain_name.node_name]
- cayenne.jdbc.url[.domain_name.node_name]
- cayenne.jdbc.username[.domain_name.node_name]
- cayenne.jdbc.password[.domain_name.node_name]
- cayenne.jdbc.min.connections[.domain_name.node_name]
- cayenne.jdbc.max.conections[.domain_name.node_name]
- Since:
- 3.1
- 
Field SummaryFields Modifier and Type Field Description protected RuntimePropertiesproperties
- 
Constructor SummaryConstructors Constructor Description PropertyDataSourceFactory()
- 
Method SummaryModifier and Type Method Description DataSourcegetDataSource(DataNodeDescriptor nodeDescriptor)Returns DataSource object based on the configuration provided in the "nodeDescriptor".protected intgetIntProperty(String propertyName, String suffix, int defaultValue)protected StringgetProperty(String propertyName, String suffix)
- 
Field Details- 
properties
 
- 
- 
Constructor Details- 
PropertyDataSourceFactorypublic PropertyDataSourceFactory()
 
- 
- 
Method Details- 
getDataSourceDescription copied from interface:DataSourceFactoryReturns DataSource object based on the configuration provided in the "nodeDescriptor".- Specified by:
- getDataSourcein interface- DataSourceFactory
- Throws:
- Exception
 
- 
getIntProperty
- 
getProperty
 
-