Login | Register
My pages Projects Community openCollabNet

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

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

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

Author edk
Full name Ed Korthof
Date 2000-10-04 14:48:13 PDT
Message On Wed, 4 Oct 2000, Jon Stevens wrote:

> Right...10,000 classes are now 10,000 more objects in memory as well. Ed,
> you are Mr. Optimization Man...I don't see how you think this is good.

My point is that it's not much worse than the overhead we already have
from 10,000 classes (which I'm not suggesting ;-).

> You didn't address my query about how you are going to query each object in
> memory for its version information. You are going down to the granularity of
> the individual object level when you really only need the .jar level.
>
> My guestimate is that figuring out what files are in a classpath will be a
> _hell_ of a lot easier than trying to query each and every object in memory
> for its VERSION string.
>
> Maybe a better idea for solving the problem you describe above would be to
> add a class to the .jar file with a Main in it that allows you to execute
> the .jar file and return the version information.
>
> java -jar anzu.jar Version

Well, I wouldn't mind using that approach as well. But finding the
version ID for a class is relatively easy. Inside a non-static method (or
with an actual object), it's something along the lines of:

    Class name = this.getClass().getC​lassLoader().loadCla​ss("name");

then you use reflection on the Class object to retrieve the value of the
field (we're using a consistent name, so that's not a problem).

The good & bad of this approach is that you don't really get release tags,
you get the IDs of the individual files. You'd have to map those to
release tags by hand.

OTOH -- in situations where we may have some of the classes for joist
overridden by an instanciation -- it may be important to know the IDs for
each class. The current design for instanciations involves overriding
classes in joist / helm / etc. to change the behavior. (Yes, this scares
me.)

cheers --

Ed
--
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=
   | Ed Korthof | edk at collab dot net | 415-247-1690 |
   +=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=+=-=​+=-=+=-=+=-=+=-=

« Previous message in topic | 6 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: