cmlenz      2002/08/19 00:51:27

  Modified:    src/stores/org/apache/slide/store/impl/rdbms JDBCStore.java
  Log:
  Remove the 'jdbcversion' parameter, it isn't used anywhere
  
  Revision  Changes    Path
  1.2       +24 -32    
jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/JDBCStore.java
  
  Index: JDBCStore.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/impl/rdbms/JDBCStore.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JDBCStore.java    19 Aug 2002 07:45:55 -0000      1.1
  +++ JDBCStore.java    19 Aug 2002 07:51:27 -0000      1.2
  @@ -236,25 +236,20 @@
       /**
        * User name.
        */
  -    private String user;
  +    private String user = "";
       
       
       /**
        * Password.
        */
  -    private String password;
  +    private String password = "";
       
       
       /**
  -     * JDBC Version to use.
  -     */
  -    private int jdbcVersion;
  -    
  -    /**
        * This store doesn't handle nested transactions, this variable keeps track 
        * if the store is already enlisted to a transaction.
        */
  -    private boolean alreadyEnlisted=false;
  +    private boolean alreadyEnlisted = false;
       
       
       // -------------------------------------------------------- Service Methods
  @@ -264,7 +259,7 @@
        * Initializes the data source with a set of parameters.
        *
        * @param parameters Hashtable containing the parameters' name 
  -     * and associated value
  +     *                   and associated value
        * @exception ServiceParameterErrorException Incorrect service parameter
        * @exception ServiceParameterMissingException Service parameter missing
        */
  @@ -272,38 +267,35 @@
           throws ServiceParameterErrorException, 
           ServiceParameterMissingException {
           
  +        String value;
  +        
           // Driver classname
  -        driver = (String) parameters.get("driver");
  +        value = (String)parameters.get("driver");
  +        if (value == null) {
  +            throw new ServiceParameterMissingException(this, "driver");
  +        } else {
  +            driver = value;
  +        }
           
           // Connection url
  -        url = (String) parameters.get("url");
  -        
  -        // FIXME: before slide 1.0.12 the database url was passed 
  -        // without "jdbc:" this compatibility code sould be removed in the
  -        // future code changed 18 jul 2001
  -        if (!url.startsWith("jdbc:"))
  -            url="jdbc:" + url;
  -        // end compatibility code
  +        value = (String)parameters.get("url");
  +        if (value == null) {
  +            throw new ServiceParameterMissingException(this, "url");
  +        } else {
  +            url = value;
  +        }
           
           // User name
  -        user = (String) parameters.get("user");
  -        if (user == null) {
  -            user = new String();
  +        value = (String)parameters.get("user");
  +        if (value != null) {
  +            user = value;
           }
           
           // Password
  -        password = (String) parameters.get("password");
  -        if (password == null) {
  -            password = new String();
  +        value = (String)parameters.get("password");
  +        if (value != null) {
  +            password = value;
           }
  -        
  -        // JDBC version to use
  -        jdbcVersion = 1;
  -        String version = (String) parameters.get("jdbcversion");
  -        if (version != null) {
  -            jdbcVersion = (new Integer(version)).intValue();
  -        }
  -        
       }
       
       
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to