getLogin().setPlatformClassName(platformName); } catch (EclipseLinkException classNotFound) { if (platformName != null && platformName.indexOf("Oracle") != -1) { getLogin().setPlatformClassName(platformName); } catch (EclipseLinkException oracleClassNotFound) { getLogin().setPlatformClassName(OraclePlatform.class.getName());
getLogin().setPlatformClassName(DBPlatformHelper.getDBPlatform(vendorNameAndVersion, getSessionLog())); } else { Connection conn = null; String vendorNameAndVersion = dmd.getDatabaseProductName() + dmd.getDatabaseMajorVersion() + dmd.getDatabaseProductVersion(); platformName = DBPlatformHelper.getDBPlatform(vendorNameAndVersion, getSessionLog()); getLogin().setPlatformClassName(platformName); } catch (EclipseLinkException classNotFound) { if (platformName.indexOf("Oracle") != -1) { getLogin().setPlatformClassName(OraclePlatform.class.getName()); } else { throw classNotFound;
/** * 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); } }
try { platformName = DBPlatformHelper.getDBPlatform(conn.getMetaData().getDatabaseProductName(), getSessionLog()); getLogin().setPlatformClassName(platformName); } catch (EclipseLinkException classNotFound) { if (platformName.indexOf("Oracle") != -1) { getLogin().setPlatformClassName(OraclePlatform.class.getName()); } else { throw classNotFound;
/** * 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); } }