db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/metadata JdbcConnectionDescriptor.java
Date Tue, 29 Jul 2003 10:38:46 GMT
arminw      2003/07/29 03:38:46

  Modified:    src/java/org/apache/ojb/broker/metadata
                        JdbcConnectionDescriptor.java
  Log:
  fix #192
  
  show additional jcd attributes
  when using DataSource too
  
  Revision  Changes    Path
  1.24      +19 -18    db-ojb/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java
  
  Index: JdbcConnectionDescriptor.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- JdbcConnectionDescriptor.java	26 Feb 2003 00:30:28 -0000	1.23
  +++ JdbcConnectionDescriptor.java	29 Jul 2003 10:38:46 -0000	1.24
  @@ -452,6 +452,19 @@
           strReturn += "    " + tags.getAttribute(DBMS_NAME, this.getDbms())  + eol;
           strReturn += "    " + tags.getAttribute(JDBC_LEVEL, "" + this.getJdbcLevel()) +
eol;
   
  +        //username is optional
  +        String user = getUserName();
  +        if (user != null)
  +        {
  +        	strReturn += "    " + tags.getAttribute(USER_NAME, user) + eol;
  +        }
  +        // password is optional
  +        String passwd = getPassWord();
  +        if (passwd != null)
  +        {
  +        	strReturn += "    " + tags.getAttribute(USER_PASSWD, passwd) + eol;
  +        }
  +
           // JDBC Datasource or DriverManager information are alternatives:
           String dsn = getDatasourceName();
           if (dsn != null)
  @@ -464,24 +477,12 @@
           	strReturn += "    " + tags.getAttribute(URL_PROTOCOL,this.getProtocol()) + eol;
           	strReturn += "    " + tags.getAttribute(URL_SUBPROTOCOL, this.getSubProtocol())
+ eol;
           	strReturn += "    " + encode(tags.getAttribute(URL_DBALIAS, this.getDbAlias()))
+ eol;
  -        	strReturn += "    " + tags.getAttribute(EAGER_RELEASE, "" + this.getEagerRelease())
+ eol;
  -            strReturn += "    " + tags.getAttribute(BATCH_MODE, "" + this.getBatchMode())
+ eol;
  -            strReturn += "    " + tags.getAttribute(USE_AUTOCOMMIT, "" + this.getUseAutoCommit())
+ eol;
  -            strReturn += "    " + tags.getAttribute(IGNORE_AUTOCOMMIT_EXCEPTION, "" +
  -                    this.isIgnoreAutoCommitExceptions()) + eol;
  -        }
  -        //username is optional
  -        String user = getUserName();
  -        if (user != null)
  -        {
  -        	strReturn += "    " + tags.getAttribute(USER_NAME, user) + eol;
  -        }
  -        // password is optional
  -        String passwd = getPassWord();
  -        if (passwd != null)
  -        {
  -        	strReturn += "    " + tags.getAttribute(USER_PASSWD, passwd) + eol;
           }
  +        strReturn += "    " + tags.getAttribute(EAGER_RELEASE, "" + this.getEagerRelease())
+ eol;
  +        strReturn += "    " + tags.getAttribute(BATCH_MODE, "" + this.getBatchMode()) +
eol;
  +        strReturn += "    " + tags.getAttribute(USE_AUTOCOMMIT, "" + this.getUseAutoCommit())
+ eol;
  +        strReturn += "    " + tags.getAttribute(IGNORE_AUTOCOMMIT_EXCEPTION, "" +
  +                this.isIgnoreAutoCommitExceptions()) + eol;
   
   		strReturn += "  >" + eol+eol;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message