Bug 114446 - No way for Startup process to differentiate between web and command line invocation
Summary: No way for Startup process to differentiate between web and command line invo...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: ccm-bugs-list
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-28 10:28 UTC by Daniel Berrangé
Modified: 2007-04-18 17:02 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-08-03 18:43:57 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2004-01-28 10:28:02 UTC
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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Vadim Nasardinov 2004-01-28 12:51:51 UTC
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 Berrangé 2004-01-28 13:01:05 UTC
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 15:39:17 UTC
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 Berrangé 2004-01-28 15:43:03 UTC
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 18:43:57 UTC
slate


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