Using JNDIPage edited by Andrus AdamchikChanges (7)
Full ContentCayenne can be setup to obtain a DataSource via JNDI, instead of using its own connection pool. To do that Cayenne DataNodes must be configured to use JNDIDataSourceFactory. This can be done in the modeler as shown on the pictures below. 1. Select JNDIDataSourceFactory: 2. Enter DataSource JNDI Name: Development with JNDI DataNodesTo be able to connect to the database from CayenneModeler when JNDIDataSourceFactory is specified (and thus no explicit connection information is associated with the DataNode), you may configure a "local DataSource" (see a corresponding Modeler Guide chapter). In runtime, a property-based mechanism to override Modeler DataSource definitions is used (actually the overrides take precedence of whether the DataSource is JNDI, DBCP, driver, etc). A quick configuration example is shown below: -Dcayenne.jdbc.driver=com.mysql.jdbc.Driver -Dcayenne.jdbc.url="" \ -Dcayenne.jdbc.username=user -Dcayenne.jdbc.password=password
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Cayenne Documentation > Using JNDI confluence
