Skip to Content
WebObjects® Developer's Guide
book

WebObjects® Developer's Guide

by Ravi Mendis
June 2002
Intermediate to advanced content levelIntermediate to advanced
400 pages
7h 48m
English
Sams
Content preview from WebObjects® Developer's Guide

Using Stateless Components

Now that we've had a look at stateful components, I think we have a better understanding of when a component is not stateful, more commonly known as stateless.

Making a Component Stateless

To set a component that isn't stateful as stateless is simple. Make sure the accessor isStateless() returns true. Let's return to WOMappedRolloverTest and set both reusable components WOMappedRollover and WOArea as stateless:

public boolean isStateless() {
    return true;
}

After this is completed build and run.

There should not to be any observable difference. So what's all the fuss about?

Observing Singleton Component Instantiation

When a component is set to stateless, only one such component is created in every application. It is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Real World XML

Real World XML

Steven Holzner
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0672323265Purchase book