/** * Return the database name. * * @return the database name */ public String getDatabaseName() { return ds.getDatabaseName(); }
/** * Return the password credential used to establish the connection. * * @return the password credential used to establish the connection */ public String getPassword() { return xaDataSource.getPassword(); }
/** * @return String "shutdown" if shutdown is set, or null if not */ public String getShutdownDatabase() { return ds.getShutdownDatabase(); } }
/** * Default constructor for a Derby Embedded XA DataSource. */ public EmbeddedXAMCF() { super(new EmbeddedXADataSource(), new NoExceptionsAreFatalSorter()); ds = (EmbeddedXADataSource) xaDataSource; }
/** * Return the user name used to establish the connection. * * @return the user name used to establish the connection */ public String getUserName() { return ds.getUser(); }
/** * Set the database name. * * @param name the database name */ public void setDatabaseName(String name) { ds.setDatabaseName(name); }
/** * Return whether the database should be created if it does not already exist. * * @return true if the database should be created */ public Boolean getCreateDatabase() { return "create".equals(xaDataSource.getCreateDatabase()); }
/** * Set whether the database should be created if it does not already exist. * * @param create TRUE if the database should be created */ public void setCreateDatabase(Boolean create) { xaDataSource.setCreateDatabase(create ? "create" : null); }
/** * Set the user password credential establish the connection. * This value is used if no connection information is supplied by the application * when attempting to create a connection. * * @param password the password credential used to establish the connection; may be null */ public void setPassword(String password) { ds.setPassword(password); }
/** * Set this property if one wishes to shutdown the database identified by databaseName. * * @param shutDown - if set to the string "shutdown", this data source will shutdown the * database if it is running. */ public void setShutdownDatabase(String shutDown) { xaDataSource.setShutdownDatabase(shutDown); }
/** * Default constructor for a Derby Embedded XA DataSource. */ public EmbeddedXAMCF() { super(new EmbeddedXADataSource(), new NoExceptionsAreFatalSorter()); }
/** * Return the user name used to establish the connection. * * @return the user name used to establish the connection */ public String getUserName() { return xaDataSource.getUser(); }
/** * Set the database name. * * @param name the database name */ public void setDatabaseName(String name) { xaDataSource.setDatabaseName(name); }
/** * Return whether the database should be created if it does not already exist. * * @return true if the database should be created */ public Boolean getCreateDatabase() { return Boolean.valueOf("create".equals(ds.getCreateDatabase())); }
/** * Set whether the database should be created if it does not already exist. * * @param create TRUE if the database should be created */ public void setCreateDatabase(Boolean create) { ds.setCreateDatabase(create.booleanValue() ? "create" : null); }
/** * Set the user password credential establish the connection. * This value is used if no connection information is supplied by the application * when attempting to create a connection. * * @param password the password credential used to establish the connection; may be null */ public void setPassword(String password) { xaDataSource.setPassword(password); }
/** * Set this property if one wishes to shutdown the database identified by databaseName. * * @param shutdown - if set to the string "shutdown", this data source will shutdown the * database if it is running. */ public void setShutdownDatabase(String shutDown) { ds.setShutdownDatabase(shutDown); }
@Override public XADataSource createXADataSource(Properties props) throws SQLException { EmbeddedXADataSource ds = new EmbeddedXADataSource(); setProperties(ds, props); return ds; }
/** * Return the database name. * * @return the database name */ public String getDatabaseName() { return xaDataSource.getDatabaseName(); }
/** * Return the password credential used to establish the connection. * * @return the password credential used to establish the connection */ public String getPassword() { return ds.getPassword(); }