You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Vamsavardhana Reddy <c1...@gmail.com> on 2007/08/09 16:22:51 UTC

Dependency resolution on restart of a configuration

I am noticing that if I "restart" a configuration, the dependencies are not
re computed.  This makes a difference when a dependency is specified in the
plan without a version and a new (higher) version of the dependency is added
to repo after the configuration is started the last time.  The higher
version is used only if the configuration is stopped and started instead of
restart.  Should restart be fixed to re resolved dependencies?  The
following is the discussion I had on IRC with David Jencks on this issue:

    <vamsic007>    Is "restart" for configurations expected to be equivalent
to "stop" followed by a "start"?
    <djencks>    vamsic007: yes
    <djencks>    I think
    <djencks>    actually I don't remember, we might keep a list of stuff we
stopped and try to restart it
    <vamsic007>    djencks: one difference is that restart starts all
configurations that have been stopped at "stop" step. I am ok with this
part.
    <djencks>    ah, thanks
    <vamsic007>    djencks: Other difference is that restart does not
re-resolve the dependencies. which is the part that bothers me
    <djencks>    are you sure? I find that very surprising
    <vamsic007>    For e.g., I have given a dependency on "foo/bar//jar" in
my config.
    <vamsic007>    I have "foo/bar/1.0/jar" in my repo. When I start the
config, it uses "foo/bar/1.0/jar"
    <vamsic007>    Now I add "foo/bar/1.1/jar" to my repo and restart my
config.
    <vamsic007>    my config still uses "foo/bar/1.0/jar" where as I expect
it to use the highest version, 1.1 in this case
    <djencks>    what happens if you stop, start ?
    <vamsic007>    unless I stop and start the configuration then it is
fine.
    <vamsic007>    Someone reported this on user list.
    <vamsic007>    At first I used restart and thought there was a problem.
    <vamsic007>    I tried to debug and this time I used stop, start, which
will not show me the problem.
    <vamsic007>    does it have something to do with loading and unloading
the configurations?
    <djencks>    I seem to recall Aaron wrote this part and he might have
had a reason to implement it this way, but I don't remember what it was
    <vamsic007>    may be the dependencies are resolved only when loading a
configuration and restart does not unload and load where as stop will unload
the config!!
    <djencks>    maybe
    <djencks>    I don't think so though
    <djencks>    obviously you have looked at this more recently than me
though
    <vamsic007>    should we fix it to re compute dependencies on restart or
just document that it won't recompute dependencies :)
    <djencks>    I thiink we should ask Aaron and Dain if they know of a
reason for the current behavior and if they don't change it
    <vamsic007>    as the user can always stop and start (unless there are a
million child configs to be started explicitly)
    <vamsic007>    Let me post it to dev list. Thanks djencks .
    <djencks>    thanks