You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by myrnap <my...@Golux.Com> on 2004/09/14 03:07:26 UTC
[PATCH] retrieveMessages... true by default in ij
Hi,
Currently, the networkserver-related ij property
retrieveMessagesFromServerOnGetMessage is false by default.
The disadvantage of setting this property to true is that performance
might be slower, the advantage of setting it is that you get actual
message text.
It would be nice if this could be true by default (only relevant if the
driver is the universal driver).
It seems to me maximum performance may be less important with ij (as
opposed to access in an application) than getting helpful messages. And
if it is important, the property can easily be set false when starting
ij, by using the property: ij.retrieveMessagesFromServerOnGetMessage=false
Making the default value true also allows me to take out the references
to "framework", which is a property used in the (subset of IBM
Cloudscape) functionTests for Derby that I'm working on. Taking the
reference out makes a cleaner separation between product & test.
Once this is agreed on, documentation should also change.
svn diff:
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"))
-------------------
Myrna van Lunteren
- IBM -
Re: [PATCH] retrieveMessages... true by default in ij
Posted by myrnap <my...@Golux.Com>.
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);
Re: [PATCH] retrieveMessages... true by default in ij
Posted by Kathey Marsden <km...@Sourcery.Org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> It would be nice if this could be true by default (only relevant if the
> driver is the universal driver).
+1 to have retrieveMessages on by default in ij.
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;'
Also since this is a behavior change, I think it would be good to bump
the version in some way, but I think a decision on a version scheme is
still pending.
Thanks
Kathey
Thanks
Kathey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBR0ntG0h36bFmkocRAldVAKDHBvcb9IuV0P/1WXzO/NDH/68GfgCdGHnP
+23uKp1HNIoMM6XNRU8caWE=
=ZKvQ
-----END PGP SIGNATURE-----