Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [joist-dev] Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

Re: [joist-dev] Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files

Author Jon Stevens <jon at latchkey dot com>
Full name Jon Stevens <jon at latchkey dot com>
Date 2000-10-04 16:04:32 PDT
Message on 10/4/2000 3:52 PM, "Ed Korthof" <edk at collab dot net> wrote:

> Here's the basic issue: otnxchange overrides some classes in joist. It
> doesn't override all of them, just some. Now -- say a given class is
> misbehaving; the first thing I should do in this case is to figure out
> where it's from. If I've got to look through the classpath, then I have
> to reconstruct that and look through a bunch of .jar files -- painful &
> somewhat more error prone. It also requires me to use a shell account to
> poke around the live system.

I don't get *why* this is error prone and difficult though...

#1. You know what class is the problem (you said "given class" above).

#2. You know it must exist in one of two .jar's for which you know which one
it is.

#3. You look at which .jar comes first in the classpath.

Problem solved in 3 easy steps.

> OTOH -- if I can use the JVM to figure out where a given class is from,
> then my debugging of this hypothetical problem is much easier.

Ok, so you are going to spend time writing code to give you the solution.
Sorry, but that sounds a lot more painful than simply looking at the
classpath.

Now, that also only tells you which class is being used...not even
necessarily *why* and either way, you are going to have to come back and fix
the classpath issue so you are back at square one.

> I'm with Manoj in believing that this scenario is one we should avoid in
> the first place, by not overriding classes. However, that is *not* the
> current plan: the current *design* for how to do instanciations includes
> overriding some but *not* all files in joist/helm/etc. Because of that, I
> think this offers a compelling advantage.
>
> Unless you want to try to convince people to avoid overriding classes,
> ever. I'd be with you, but I've no time left to fight that fight. <sad
> smile>

Right...that is also a really bad aspect of this whole thing...Why aren't
these classes defined in property files instead so that they can be easily
swapped out?

If you are going to spend all the time added $Id: $ to the files and writing
code to figure out which class is loaded, you might as well spend the time
going through the code base and use
Class.forName(props.​getString("class.i.r​eally.want.to.instan​tiate")).newInst
ance() as a real solution instead. In fact, you can probably do regex
replacements in the code to get the above effect.

s/new
Foo()/Class.forName(​props.getString("cla​ss.i.really.want.to.​instantiate")).n
ewInstance()/

$0.00

-jon

« Previous message in topic | 16 of 26 | Next message in topic »

Messages

Show all messages in topic

Inserting $Id$ into files deploy Deployment Pseudo-user 2000-10-03 23:14:23 PDT
     Re: [joist-dev] Inserting $Id$ into files dlr Daniel Rall 2000-10-03 23:19:18 PDT
     Re: [joist-dev] Inserting $Id$ into files Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-10-04 11:37:59 PDT
         Re: [joist-dev] Inserting $Id$ into files edk Ed Korthof 2000-10-04 14:23:04 PDT
             Re: [joist-dev] Inserting $Id$ into files Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-10-04 14:42:02 PDT
                 Re: [joist-dev] Inserting $Id$ into files edk Ed Korthof 2000-10-04 14:48:13 PDT
                     Re: [joist-dev] Inserting $Id$ into files Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-10-04 15:01:48 PDT
                         Re: [joist-dev] Inserting $Id$ into files deploy Deployment Pseudo-user 2000-10-04 15:18:39 PDT
                             Re: [joist-dev] Inserting $Id$ into files Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-10-04 15:28:46 PDT
                                 Re: [joist-dev] Inserting $Id$ into files dlr Daniel Rall 2000-10-04 21:39:08 PDT
                             Re: [joist-dev] Inserting $Id$ into files dlr Daniel Rall 2000-10-04 21:37:40 PDT
                 Re: [joist-dev] Inserting $Id$ into files Manoj Kasichainula <manoj at collab dot net> Manoj Kasichainula <manoj at collab dot net> 2000-10-04 15:29:24 PDT
                     Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files deploy Deployment Pseudo-user 2000-10-04 15:31:58 PDT
                         Re: [joist-dev] Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-10-04 15:44:12 PDT
                             Re: [joist-dev] Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files edk Ed Korthof 2000-10-04 15:52:50 PDT
                                 Re: [joist-dev] Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-10-04 16:04:32 PDT
                                     Re: [helm-dev] Re: [joist-dev] Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files edk Ed Korthof 2000-10-04 16:24:20 PDT
                                         Re: Inserting $Id$ into files Jon Stevens <jon at latchkey dot com> Jon Stevens <jon at latchkey dot com> 2000-10-04 16:33:12 PDT
                                         Re: Inserting $Id$ into files edk Ed Korthof 2000-10-04 16:34:56 PDT
                                         Re: [helm-dev] Re: [joist-dev] Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files Manoj Kasichainula <manoj at collab dot net> Manoj Kasichainula <manoj at collab dot net> 2000-10-04 16:57:25 PDT
                         Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files Manoj Kasichainula <manoj at collab dot net> Manoj Kasichainula <manoj at collab dot net> 2000-10-04 15:55:47 PDT
                         Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files dlr Daniel Rall 2000-10-04 21:57:32 PDT
                             Re: Inserting $Id$ into files edk Ed Korthof 2000-10-05 01:21:41 PDT
                     Re: [helm-dev] Re: [joist-dev] Inserting $Id$ into files dlr Daniel Rall 2000-10-04 16:11:57 PDT
                 Re: [joist-dev] Inserting $Id$ into files dlr Daniel Rall 2000-10-04 16:10:25 PDT
Page: of 2 « Previous | Next »
Messages per page: