• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Non-web apps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-web apps


  • Subject: Re: Non-web apps
  • From: "Ricardo J. Parada" <email@hidden>
  • Date: Thu, 02 Jul 2009 10:07:23 -0400

Moving this thread to webobjects-dev as I think it has broader scope than just Wonder.

I want to create a program that is packaged as a webobjects application , i.e. MyAgent.woa but currently it doesn't process http requests.  It's main thread just checks for work to do in the database and then does it.  I'm currently not subclassing WOApplication.  I have my own MPVAgent class which subclasses Object.  But I can already see how I could benefit if have it subclass WOApplication (or ERXApplication) instead of my MPVAgent class.

However, in order to do so, I need to know what method to subclass to setup my thread that does the main work I described.

Has anybody done something like this?  Any advise?

I have lots of these so called agents.


On Jul 2, 2009, at 9:00 AM, Ricardo J. Parada wrote:

Just unfamiliarity with how to subclass it correctly to make it do exactly what I want it to do.



On Jul 2, 2009, at 5:57 AM, David Avendasora wrote:

I'm unclear as to why your would not extend ERXApplication in your back end apps, even if they aren't web apps. What are you trying to avoid? Having them respond to outside requests?

Dave

On Jul 1, 2009, at 11:01 PM, Ricardo J. Parada wrote:


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








------------------------------------------------------------------------------
_______________________________________________
Wonder-disc mailing list
email@hidden
https://lists.sourceforge.net/lists/listinfo/wonder-disc



 _______________________________________________
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

  • Follow-Ups:
    • Re: Non-web apps
      • From: Stefan Klein <email@hidden>
  • Prev by Date: UTF-16 no BOM and Eclipse
  • Next by Date: ERXRssPage
  • Previous by thread: Re: UTF-16 no BOM and Eclipse
  • Next by thread: Re: Non-web apps
  • Index(es):
    • Date
    • Thread