db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gus Heck <gus.h...@olin.edu>
Subject Re: Progress on MetaDataManager bug?
Date Wed, 04 Feb 2004 16:44:37 GMT

>
> here you lookup a JdbcConnectionDescriptor. If for the given PBKey 
> (jcdAlias="fdbcon", user=null, passwd=null) no matching jcd exists, 
> OJB checks the used jcdAlias name "fdbcon" could be found in another 
> jcd. If yes, a deep copy of this jcd was made and returned by setting 
> given user/passwd (null, null). That's the reason why you have to set 
> user/passwd.
> This seems a little bit strange, but allows following "feature"
>
> http://db.apache.org/ojb/faq.html#Many different database user - How 
> do they login?
>
Ah I understand now, and to avoid further ProgrammerConfusionExceptions 
like this one I suggest the following patch to the javadocs:

Index: src/java/org/apache/ojb/broker/metadata/ConnectionRepository.java
===================================================================
RCS file: 
/home/cvspublic/db-ojb/src/java/org/apache/ojb/broker/metadata/ConnectionRepository.java,v
retrieving revision 1.11
diff -u -r1.11 ConnectionRepository.java
--- src/java/org/apache/ojb/broker/metadata/ConnectionRepository.java   
7 Jan 2004 19:11:10 -0000   1.11
+++ src/java/org/apache/ojb/broker/metadata/ConnectionRepository.java   
4 Feb 2004 16:47:17 -0000
@@ -35,7 +35,10 @@

     /**
      * Returns the matching {@link JdbcConnectionDescriptor}
-     * or <code>null</code> if no descriptor could be found.
+     * or <code>null</code> if no descriptor could be found. The user name
+     * and pass word will be set to match the supplied </code>PBKey</code>
+     * object. If the original user name and pass word are desired, the 
PBKey
+     * should be obtained with {@link 
#getStandardPBKeyForJcdAlias(String)}.
      */
     public JdbcConnectionDescriptor getDescriptor(PBKey pbKey)
     {



---------------------------------------------------------------------
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