• 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: handles requests concurrently: problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handles requests concurrently: problems


  • Subject: Re: handles requests concurrently: problems
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 12 Jan 2004 15:57:55 -0800
  • Organization: Global Village Consulting, Inc.

I always load the models in the app constructor to ensure that everything is initialized before I start accepting requests. EOModelGroup.defaultModelGroup().modelNames(); will do that.


Chuck

Jonathan Rochkind wrote:

So, I'm trying to turn on concurrent request handling for my app.

So I turned it on, and now try hitting the same instance several times at once, to see what will happen. I'm not even using any automated software to do this, I just opened up a few windows in a few different browsers, got them all pointed at my app, and clicked on a link that results in a particularly processor intensive action, one after the other as quick as I could.

Um. There seems to be a problem, indeed. I got this error in one case:
java.lang.IllegalStateException
Unabled to find an EOClassDescription for objects of class UserLogEntry
EOGenericRecord.java    98    _setClassDescription
EOGenericRecord.java    72    <init>
UserLogEntry.java    12    <init>

UserLogEntry is a custom EO class, the stack trace exerpted there begins in it's constructor. [Earlier parts of the stack trace omited because I don't think they are relevant].

I believe this is a concurrency problem. Trying the same exact action again, everything worked fine. It could construct a UserLogEntry object no problem. I have not been able to reproduce this exception, but I havne't tried too hard yet. I have a sort of hunch that it _may_ just exhibit when one of the threads is accessing the EOF stack for the first time, that perhaps some part of EOF that sets things up (or loads models?) is not thread safe.

Or, hmm, I DO catch the model loaded notification myself, and do some things. I wonder if my OWN code is somehow not thread safe, or if the second request came in when my model-load-notification-catch code was still executing, so the model HADN'T been loaded yet. This is jsut a wild speculation on my part now... if this IS happening, is there any way to verify that? If I can verify it, I suppose the only way to deal with it is to load all models in App constructor, instead of doing a lazy load.

But that's all just really wild speculation. All I know for sure is that I got that error. Anyone have any ideas at all for me?

--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net

Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >handles requests concurrently: problems (From: Jonathan Rochkind <email@hidden>)

  • Prev by Date: Re: Limiting number of assignments in a many-to-many relationship
  • Next by Date: Re: Limiting number of assignments in a many-to-many relationship
  • Previous by thread: handles requests concurrently: problems
  • Next by thread: Re: Filtering an array of EO objects in D2J (getting the data source)
  • Index(es):
    • Date
    • Thread