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.

Kathey

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.

Reply via email to