Re: command line EOF + WOContext
Re: command line EOF + WOContext
- Subject: Re: command line EOF + WOContext
- From: "Jerry W. Walker" <email@hidden>
- Date: Sat, 4 Feb 2006 23:44:54 -0500
Hello Michael,
I sent you the following message, but it included an archived copy of
a small project to demonstrate an approach almost identical to that
which Lindesay suggested. The archived project pushed the message
size over 30K which is Apple's limit, so they may not let the message
go through, or, if so, they may strip the project. So I sent another
copy of the message to you directly with the project included.
Regards,
Jerry
========================================================
Hello Michael,
I agree with Lindesay's suggestion to use an alternate approach using
message queues in a producer-consumer arrangement. However, if you
wish to follow your original plan, I created a small app using a
slightly different approach than Lindesay's in actually dispatching
the request through Application, but this isn't necessary:
<compressed copy of project was here>
Build and run the app, then check the last few lines of the run log
and the code in Application and DirectAction.
Regards,
Jerry
On Feb 4, 2006, at 10:22 PM, email@hidden wrote:
I tend to do this sort of thing when this is necessary, but I have
not tried this line when it is not in a running WOA...
WOContext dummyCtx = new WOContext(new WORequest("GET","/","HTTP/
1.1",null,null,null));
Possibly of interest; instead of creating a command-line utility
for this sort of thing, I tend to use a producer-consumer
arrangement with message queues to dispatch batch runs off to
"wotaskd" managed instances which are dedicated to running batch
jobs outside of a request-response cycle. This allows for large
jobs to be partitioned into smaller jobs and dequeued over multiple
CPU's.
I have a new (old for me) twist on the old WebObjects command-line
start up type stuff. We run nightly jobs for accounting and other
things, and I need to be able to mail out WOComponents for
statements, trouble ticket reminders, etc. The only way I have
ever been able to get a command line WOApplication to be able to
do this was to have it send itself a bogus WORequest and then call
session() from the direct action in order to get it to instantiate
a session, and thereby, a WOContext.
========================================================
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden