The configuration properties of an existing persistence instance can be updated at runtime. If the persistence instance is in use at the time of a reconfiguration, then new connections will be established with the new configuration properties, and any existing connections to the database will be closed when they become idle.

To update an existing persistence instance, use the following rhino-console command or related MBean operation.

Console command: updatepersistenceinstance

Command

updatepersistenceinstance <name> [-type type] [-ds <datasource-class-name>]
[-set-property <property-name> <property-type> <property-value)]*
[-remove-property <property-name>]*
  Description
    Update a persistence instance configuration.

Example

$ ./rhino-console updatepersistenceinstance oracle \
    -set-property URL java.lang.String jdbc:oracle:thin:@oracle_backup:1521:db \
    -set-property user java.lang.String '${MANAGEMENT_DATABASE_USER}' \
    -set-property password java.lang.String '${MANAGEMENT_DATABASE_PASSWORD}'
Updated persistence instance oracle

MBean operation: updatePersistenceInstance

MBean

Rhino operation

public void updatePersistenceInstance(String name, PersistenceInstanceType type, String dsClassName, ConfigProperty[] configProperties)
    throws NullPointerException, InvalidArgumentException,
      NameNotFoundException, ConfigurationException;
Previous page Next page
Rhino Version 3.2