public void setSchema ( String schema ) throws SQLException { Transaction suspendTx = null ; if ( mcf . beforeJDBCVersion ( JDBCRuntimeVersion . VERSION_4_1 ) ) throw new SQLFeatureNotSupportedException ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Set Schema to " + schema ) ; // Global trans must be suspended for jdbc-4.1 getters and setters on zOS if ( AdapterUtil . isZOS ( ) && isGlobalTransactionActive ( ) ) suspendTx = suspendGlobalTran ( ) ; try { mcf . jdbcRuntime . doSetSchema ( sqlConn , schema ) ; currentSchema = schema ; connectionPropertyChanged = true ; } catch ( SQLException sqle ) { throw sqle ; } finally { if ( suspendTx != null ) resumeGlobalTran ( suspendTx ) ; } }
Set a schema for this managed connection .