db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrnap <my...@Golux.Com>
Subject Re: [PATCH] retrieveMessages... true by default in ij
Date Wed, 15 Sep 2004 19:54:32 GMT
Kathey Marsden wrote:

>For the change itself. I have a question.  Would you still be able to
>override the default value with a url attribute. e.g;
>
>'jdbc:derby:net://localhost:1527/mydb:retrieveMessagesFromServerOnGetMessage=false;'
>  
>
Well, no, with my original patch, that gave an error:
ERROR (no SQLState): java.util.Properties object passed to 
java.sql.Driver.connect() cannot be overriden by URL: 
jdbc:derby:net://localhost:1527/bladb:user=me;password=mine;retrieveMessagesFromServerOnGetMessage=false;

So, I made a modification, with this you *can* overwrite the setting in 
the url.:
Index: java/tools/org/apache/derby/impl/tools/ij/util.java
===================================================================
--- java/tools/org/apache/derby/impl/tools/ij/util.java (revision 45860)
+++ java/tools/org/apache/derby/impl/tools/ij/util.java (working copy)
@@ -400,7 +400,7 @@
            String password = util.getSystemProperty("ij.password");

            // Update connInfo for ij system properties and
-           // framework network server
+           // get text for messages for network server

            connInfo = updateConnInfo(user, password,connInfo);

@@ -445,16 +445,10 @@

        public static Properties updateConnInfo(String user, String 
password, Properties connInfo)
        {
-               String framework = util.getSystemProperty("framework");
                String ijGetMessages = 
util.getSystemProperty("ij.retrieveMessagesFromServerOnGetMessage");
-               boolean retrieveMessages = false;
+               // For JCC default to retrieve messages
+               boolean retrieveMessages = true;

-
-               // For JCC make sure we set it to retrieve messages
-               if (framework != null  && ((framework.equals("DB2jNet")
-                                                                       
|| framework.equals("DB2jcc"))))
-                       retrieveMessages = true;
-
                if (ijGetMessages != null)
                {
                        if (ijGetMessages.equals("false"))
@@ -467,10 +461,10 @@
                if (connInfo == null)
                        connInfo = new Properties();

-               if (retrieveMessages == true)
+               if (retrieveMessages == false)
                {
                        
connInfo.put("retrieveMessagesFromServerOnGetMessage",
-                                                "true");
+                                                "false");
                }
                if (user != null)
                        connInfo.put("user",user);



Mime
View raw message