public static Object createJdbcDataSourceFactory() { return new JdbcDataSourceFactory(); }
/** * The public constructor. */ public JdbcDataSource() { initFactory(); int id = getNextId(TraceObject.DATA_SOURCE); setTrace(factory.getTrace(), TraceObject.DATA_SOURCE, id); }
/** * Forget a transaction. * This method does not have an effect for this database. * * @param xid the transaction id */ @Override public void forget(Xid xid) { if (isDebugEnabled()) { debugCode("forget("+JdbcXid.toString(xid)+");"); } prepared = false; }
@Override public synchronized void close() throws SQLException { if (!isClosed) { try { rollback(); setAutoCommit(true); } catch (SQLException e) { // ignore } closedHandle(); isClosed = true; } }
/** * Set the login timeout in seconds, 0 meaning no timeout. * The default value is 0. * This value is ignored by this database. * * @param timeout the timeout in seconds */ @Override public void setLoginTimeout(int timeout) { debugCodeCall("setLoginTimeout", timeout); this.loginTimeout = timeout; }
/** * Set the current password in the form of a char array. * * @param password the new password in the form of a char array. */ public void setPasswordChars(char[] password) { if (isDebugEnabled()) { debugCode("setPasswordChars(new char[0]);"); } this.passwordChars = password; }
/** * Get the current password. * * @return the password */ public String getPassword() { debugCodeCall("getPassword"); return convertToString(passwordChars); }
/** * Set the current password. * * @param password the new password. */ public void setPassword(String password) { debugCodeCall("setPassword", ""); this.passwordChars = convertToCharArray(password); }
/** * The global transaction identifier. * * @return the transaction id */ @Override public byte[] getGlobalTransactionId() { debugCodeCall("getGlobalTransactionId"); return globalTransactionId; }
/** * Checks if this is the same XAResource. * * @param xares the other object * @return true if this is the same object */ @Override public boolean isSameRM(XAResource xares) { debugCode("isSameRM(xares);"); return xares == this; }
/** * Get the current log writer for this object. * * @return the log writer */ @Override public PrintWriter getLogWriter() { debugCodeCall("getLogWriter"); return logWriter; }
/** * The transaction branch identifier. * * @return the identifier */ @Override public byte[] getBranchQualifier() { debugCodeCall("getBranchQualifier"); return branchQualifier; }
/** * Set the current URL. * This method does the same as setURL, but this methods signature conforms * the JavaBean naming convention. * * @param url the new URL */ public void setUrl(String url) { debugCodeCall("setUrl", url); this.url = url; }
/** * Set the current user name. * * @param user the new user name */ public void setUser(String user) { debugCodeCall("setUser", user); this.userName = user; }
/** * Get the current description. * * @return the description */ public String getDescription() { debugCodeCall("getDescription"); return description; }
/** * Set the current log writer for this object. * This value is ignored by this database. * * @param out the log writer */ @Override public void setLogWriter(PrintWriter out) { debugCodeCall("setLogWriter(out)"); logWriter = out; }
/** * Get the current URL. * * @return the URL */ public String getURL() { debugCodeCall("getURL"); return url; }
/** * Get the login timeout in seconds, 0 meaning no timeout. * * @return the timeout in seconds */ @Override public int getLoginTimeout() { debugCodeCall("getLoginTimeout"); return loginTimeout; }
/** * Get the current user name. * * @return the user name */ public String getUser() { debugCodeCall("getUser"); return userName; }