I have back end processes that are not web apps. I call them agents. They are packaged like a web app, i.e. MyAgent.woa but the main class does not extend ERXApplication or WOApplication. In fact it extends a class called Agent that has Object as its super class.
It has a static method and I currently call ERXApplication.setup(argv). That goes through the same intialization as a Wonder app which is something I desire. :-)
But then I noticed that ERXProperties does not load the Properties files from my frameworks. Then inspecting ERXProperties source I noticed that the pathsForUserAndBundleProperties() method returns an empty array because it does not see a WOApplication :
public static NSArray pathsForUserAndBundleProperties(boolean reportLoggingEnabled) {
NSMutableArray propertiesPaths = new NSMutableArray();
NSMutableArray projectsInfo = new NSMutableArray();
String projectPath, aPropertiesPath;
WOApplication application = WOApplication.application();
if (application == null) {
log.warn("The application is not yet initialized. Returning an empty array.");
return NSArray.EmptyArray;
}
...
}
Am I out of luck? Should I have MyAgent subclass ERXApplication and just override the run method?
Any ideas? Am I the only one who has back end apps that are not web apps? :-)
Thanks
Ricardo
------------------------------------------------------------------------------