To create a persistence instance, use the following rhino-console command or related MBean operation.
Console command: createpersistenceinstance
Command |
createpersistenceinstance <name> <datasource-class-name> [(<property-name>
<property-type> <property-value)*]
Description
Create a persistence instance configuration. A datasource class name must be
specified along with any configuration parameters necessary for the datasource
to connect with the persistence instance.
|
|---|---|
Example |
This example creates a new persistence instance with the following configuration properties:
$ ./rhino-console createpersistenceinstance oracle \
oracle.jdbc.pool.OracleDataSource \
URL java.lang.String jdbc:oracle:thin:@oracle_host:1521:db \
user java.lang.String ${MANAGEMENT_DATABASE_USER} \
password java.lang.String ${MANAGEMENT_DATABASE_PASSWORD} \
loginTimeout java.lang.Integer 30
Created persistence instance oracle
|
MBean operation: createPersistenceInstance
MBean |
|
|---|---|
Rhino operation |
public void createPersistenceInstance(String name, String dsClassName, ConfigProperty[] configProperties)
throws NullPointerException, InvalidArgumentException,
DuplicateNameException, ConfigurationException;
|
