Bug 114446 - No way for Startup process to differentiate between web and command line invocation
No way for Startup process to differentiate between web and command line invo...
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: ccm-bugs-list
Jon Orris
Depends On:
  Show dependency treegraph
Reported: 2004-01-28 05:28 EST by Daniel Berrange
Modified: 2007-04-18 13:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-03 14:43:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2004-01-28 05:28:02 EST
Description of problem:
When writing command line programs it is typically required that WAF
be initialized. This is achieved by invoking the c.a.runtime.Startup
class' startup() method. At the same time, however, ther are a number
of things that do not need to be initialized for a command line tool,
or indeed could cause race/error conditions if the tool were run on
the same host that had a servlet active. Thus there needs to be some
way to inform the impl's of c.a.runtime.INitializer what context they
are being run in, enabling them to bypass any servlet specific startup
processes when being run from the command line.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Vadim Nasardinov 2004-01-28 07:51:51 EST
To start a list of things that don't need to be run when Startup
is called from a command-line tool/program:

  1. Most TimerTask background threads do not need to be started.
  2. ...

Anything else?

On a related note, there used to be a way to run a subset of 
initializers when invoking unit tests.  Currently, all initializers
are run, which makes unit testing noticeably slower.  Even if I only
want to run a single suite in Core, I have to wait for a bunch of
other initializers to finish (CMS, formsectionitem, formitem, forum,
portalserver - you name it).  This may merit a separate ticket though.
Comment 2 Daniel Berrange 2004-01-28 08:01:05 EST
WRT to unit tests, I'm of the opinion that you should only have the
application you're running tests in (and its dependents) loaded in the
system. Having other unrelated applications present can break
assumptions made by the authors of the unit tests, causing false
failures. Not running the initializers of these unrelated apps is
likely to make the situation worse, for example if the test gets an
object for which there is no instantiator present.
Comment 3 Rafael H. Schloming 2004-01-28 10:39:17 EST
Regarding the problem described in the ticket I believe we've
discussed addressing the issue by moving web specific startup
activities to servlet init methods and reserving the initializer
system for truly environment agnostic stuff. Are you suggesting
another approach or simply observing that we still need to do this?
Comment 4 Daniel Berrange 2004-01-28 10:43:03 EST
Just observing the need for a solution, no particular opinion on the
approach we decide to take at this time.
Comment 5 Vadim Nasardinov 2005-08-03 14:43:57 EDT

Note You need to log in before you can comment on or make changes to this bug.