/** * This method provides client with access to add a new connection pool to a EclipseLink * ServerSession. * @param poolName the name of the new pool * @param maxSize the maximum number of connections in the pool * @param minSize the minimum number of connections in the pool * @param platform the fully qualified name of the EclipseLink platform to use with this pool. * @param driverClassName the fully qualified name of the JDBC driver class * @param url the URL of the database to connect to * @param userName the user name to connect to the database with * @param password the password to connect to the database with * @exception ClassNotFoundException if any of the class names are misspelled. */ public void addNewConnectionPool(String poolName, int maxSize, int minSize, String platform, String driverClassName, String url, String userName, String password) throws ClassNotFoundException { if (ClassConstants.ServerSession_Class.isAssignableFrom(getSession().getClass())) { DatabaseLogin login = new DatabaseLogin(); login.setPlatformClassName(platform); login.setDriverClassName(driverClassName); login.setConnectionString(url); login.setUserName(userName); login.setEncryptedPassword(password); ((ServerSession)getSession()).addConnectionPool(poolName, login, minSize, maxSize); } }
/** * This method provides client with access to add a new connection pool to a EclipseLink * ServerSession. * @param poolName the name of the new pool * @param maxSize the maximum number of connections in the pool * @param minSize the minimum number of connections in the pool * @param platform the fully qualified name of the EclipseLink platform to use with this pool. * @param driverClassName the fully qualified name of the JDBC driver class * @param url the URL of the database to connect to * @param userName the user name to connect to the database with * @param password the password to connect to the database with * @exception ClassNotFoundException if any of the class names are misspelled. */ public void addNewConnectionPool(String poolName, int maxSize, int minSize, String platform, String driverClassName, String url, String userName, String password) throws ClassNotFoundException { if (ClassConstants.ServerSession_Class.isAssignableFrom(getSession().getClass())) { DatabaseLogin login = new DatabaseLogin(); login.setPlatformClassName(platform); login.setDriverClassName(driverClassName); login.setConnectionString(url); login.setUserName(userName); login.setEncryptedPassword(password); ((ServerSession)getSession()).addConnectionPool(poolName, login, minSize, maxSize); } }
/** * This method provides client with access to add a new connection pool to a EclipseLink * ServerSession. * @param poolName the name of the new pool * @param maxSize the maximum number of connections in the pool * @param minSize the minimum number of connections in the pool * @param platform the fully qualified name of the EclipseLink platform to use with this pool. * @param driverClassName the fully qualified name of the JDBC driver class * @param url the URL of the database to connect to * @param userName the user name to connect to the database with * @param password the password to connect to the database with * @exception ClassNotFoundException if any of the class names are misspelled. */ public void addNewConnectionPool(String poolName, int maxSize, int minSize, String platform, String driverClassName, String url, String userName, String password) throws ClassNotFoundException { if (ClassConstants.ServerSession_Class.isAssignableFrom(getSession().getClass())) { DatabaseLogin login = new DatabaseLogin(); login.setPlatformClassName(platform); login.setDriverClassName(driverClassName); login.setConnectionString(url); login.setUserName(userName); login.setEncryptedPassword(password); ((ServerSession)getSession()).addConnectionPool(poolName, login, minSize, maxSize); } }
} else if (attribute.equals(PersistenceUnitProperties.CONNECTION_POOL_USER)) { pool.setLogin(pool.getLogin().clone()); ((DatabaseLogin)pool.getLogin()).setUserName((String)entry.getValue()); } else if (attribute.equals(PersistenceUnitProperties.CONNECTION_POOL_PASSWORD)) { pool.setLogin(pool.getLogin().clone());