• 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: stateless component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stateless component


  • Subject: Re: stateless component
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 3 Apr 2008 18:03:06 -0700

That sounds like a good idea.  Do you want a bug report?


On Apr 3, 2008, at 6:00 PM, Mr. Pierre Frisch wrote:

May be we should log a warning for this?

Pierre
--
Pierre Frisch
email@hidden


On Apr 3, 2008, at 10:39, Chuck Hill wrote:


On Apr 3, 2008, at 10:28 AM, Tonny Staunsbrink wrote:
The top level component is allways created, subcomponents are reused, not sure why....

Because they have to go in the page cache as unique instances recording page state. Stateless and page state don't mix.



Chuck



Cheers Tonny

On Wed, Apr 2, 2008 at 11:37 PM, Archibald Singleton <email@hidden > wrote:
Hello,


>From the WO API docs: "For extra efficiency, you can create stateless components: components that can be shared between sessions. Stateless components aren't replicated each time they're needed; rather, a single shared instance is referenced each time the component is used."

But logging calls to my stateless component constructor (subclass of ERXStatelessComponent), I see that's it's being called for every request and that new instances are created for each request.

Maybe worth noting is the fact that the component is instantiated by a direct action (hence there are no sessions).

I basically replicated what David showed in his lastest screencast re: the first hit to the app being a default action instead of a component action.

I would have thought that that "shared instance" business means it's created once and reused all along?

Could someone please be kind enough to enlighten me as to what's happening?

TIA

= tmk =


_______________________________________________ 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

_______________________________________________
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

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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



--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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: stateless component
      • From: "Mr. Pierre Frisch" <email@hidden>
References: 
 >stateless component (From: Archibald Singleton <email@hidden>)
 >Re: stateless component (From: "Tonny Staunsbrink" <email@hidden>)
 >Re: stateless component (From: Chuck Hill <email@hidden>)
 >Re: stateless component (From: "Mr. Pierre Frisch" <email@hidden>)

  • Prev by Date: Re: stateless component
  • Next by Date: Re: stateless component
  • Previous by thread: Re: stateless component
  • Next by thread: Re: stateless component
  • Index(es):
    • Date
    • Thread