db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [jira] Updated: (DERBY-289) Enable code sharing between Derby client and engine
Date Tue, 15 Nov 2005 23:27:10 GMT
Deepa Remesh wrote:

> I changed client driver to use the new message:
> 		if (!parameterSet_[i] && !parameterRegistered_[i]) {
> 			CommonInfo cInfo = new CommonInfo();
> 		   	if(cInfo.hasFeature(CommonFeatures.SQLSTATE_07000_NEW))
> 		    		throw new SqlException2(agent_.logWriter_,
> SQLState.LANG_MISSING_PARMS2, new Integer (i));
> 		    	else
> 		      		throw new SqlException2(agent_.logWriter_,
> 		}

Hmmmm, I think you are correct Deepa in your approach to this, but the
shared code setup sure does result in some painful code. When I
discussed versioning, I wasn't assuming it would go down to the
individual message level.

I think, at least for messages, the actual shared code could provide
much of the support for changing messages. Doing this work up-front
would result in clean code, without version checking. Couple of ideas I
had after thinking about this are:

  - Have the new message identifier also include the old, something
like: 07000.S>07000, so that if the new identifier is not available the
message code looks for the old identifier.

  - Take advantage of the fact that Java can load multiple resource
files with the same name to merge old and new resources.


View raw message