Hi Andrew,
> I'm a bit curious - the WOA boot process somewhat contorted.  Why can
> one not assemble the classpath manually and then just run
> "com.mycompany.app.Application"?
It's just about running java process, here a "generic classpath" (more
than a just the classpath in fact) :

/.../bin/java -DWORootDirectory=$NEXT_ROOT
-DWOLocalRootDirectory=$NEXT_ROOT/Local
-DWOUserDirectory=$NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa
-DWOEnvClassPath= -DWOApplicationClass=Application
-DWOPlatform=$YOUR_PLATFORM  -classpath WOBootstrap.jar
com.webobjects._bootstrap.WOBootstrap
-Dcom.webobjects.pid=MyApp.pid    -WOPort 1234  -WOCachingEnabled YES
-WODebuggingEnabled NO -WOOutputPath $NEXT_ROOT/Local/logs/MyAPP-1
-WOAutoOpenInBrowser NO -WOAutoOpenClientApplication NO
-WOLifebeatInterval 30 -WOLifebeatEnabled YES -WOLifebeatDestinationPort
1085 -WOAdaptor WODefaultAdaptor -WOWorkerThreadCount 8
-WOListenQueueSize 128 -WOWorkerThreadCountMin 16
-WOWorkerThreadCountMax 256 -NSProjectSearchPath () -WOSessionTimeOut
3600 -WOApplicationName MyApp -WOMonitorEnabled YES -WONoPause YES
(plus monitor "Additional Arguments")

The only thing which change each time is the process pid and so
-Dcom.webobjects.pid=MyApp.pid . In fact the pid is the startup shell
pid which "fork" when starting java process with "eval exec". I don't
know if it is important, but I think it's need to do a Force quit in the
monitor.
So giving up the startup shell script of application is possible, just
need to keep arguments, some for the continuation are important, like
WOApplicationClass.

Next java execute com.webobjects._bootstrap.WOBootstrap and I got some
JVM instrumentation show that:
_ Frist it reads command line args localroot, approot, platform ...
_ Next it trys to read the generated classpath file in
$NEXT_ROOT/Local/Library/WebObjects/Applications/Abricot.woa/Contents/YOUR_PLATFORM/YOUR_PLATFORMCLASSPATH
_ Then it outputs the generated classpath and loads class in jars, in
order to  invoke the main in the class corresponding to
WOApplicationClass (com.mycompany.app.Application).

I am not certain of all that, it is only what I think of having observed
but if it is only that it should be possible.

Aurelien


PS: does anyone try to use lauch4j ( http://launch4j.sf.net )  with
WOBootstrap.jar ?

-- 
------------------
Direction des systèmes d'information
Université Paris Descartes

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to