ERMailUtils.instantiatePage calls the componentbs session() method which will
create a Session.
What I used to do in a distant past was to create a component with the normal
constructor and pass to this constructor a dummy WOContext. I was using this
technique to send batches of emails in the background, so not triggered by any
UI action. Below you see how I used to create such a dummy WOContext.
Hope this helps.
Rudi Angela
public WOContext dummyContext()
{
WOApplication app = Application.application();
String dummyUrl = app.cgiAdaptorURL() + "/" + app.name() +
".woa/wa/dummy";
WORequest request = app.createRequest("GET", dummyUrl, "HTTP/1.0",
null, null, null);
WOContext context = app.createContextForRequest(request);
context._generateCompleteURLs ();
return context;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]