A JDBC resource can be associated with at most one persistence instance.

Warning Rhino SLEE treats different JDBC resources as different database managers, even if they use the same persistence instance. Therefore, even if two JDBC resources use the same persistence instance, and a single transaction uses both JDBC resources, Rhino treats them as multiple resource managers.

To add a persistence instance to a JDBC resource, use the following rhino-console command or related MBean operation.

Console command: addpersistenceinstanceref


addpersistenceinstanceref <resource-type> <resource-name>
    Add a persistence instance reference to a database resource. The resource-type
    parameter must be either 'persistence' or 'jdbc'.


$ ./rhino-console addpersistenceinstanceref jdbc myresource oracle
Added persistence instance reference 'oracle' to JDBC resource myresource

MBean operation: setJdbcResourcePersistenceInstanceRef


Rhino operation

public void setJdbcResourcePersistenceInstanceRef(String jdbcResourceJndiName, String persistenceInstanceName)
    throws NullPointerException, NameNotFoundException,
Previous page Next page
Rhino Version 3.2