db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: [jira] Updated: (DERBY-289) Enable code sharing between Derby client and engine
Date Fri, 18 Nov 2005 01:02:40 GMT
Hi Kathey,

Some comments follow. Cheers-Rick

Kathey Marsden wrote:


>You can't have two client apps at different version levels in the same
>classloader.  The one loaded first will win.  
I'm not so sure this is true. If classes are added/deleted to/from the 
public API, then it may be possible to get behind the shadowing jar 
file. I think there are wormholes and heisenbugs in here.


>>If for some reason we have to distinguish client from server messages,
>>then we could add that information to the encoded file names. I
>>suppose that the message resolver could pick a client vs server
>>message file based on a peek at the call stack and knowledge about
>>what packages live in which jar files.
>This is a really good point about how to determine whether to load the
>server or client messages since these are static methods in
>MessageService.  So I guess that part is what would be really hard.   I
>don't understand what you said about how to do it.  Sounds complicated.

You can peek at the stack using Throwable.getStackTrace(). Done wrong, 
it could be a brittle piece of code. In any event, I don't recommend 
this approach because I think that versioned message files solve the 
problem of messages shared between client and server.

View raw message