CORBA 2.3.7 Programmer's Guide for Java

object whose lifespan policy is TRANSIENT is stateful by default.
The state policy (com.tandem.nsdom.PortableServer.StatePolicy) is a NonStop CORBA
proprietary policy you can apply to allow persistent stateful objects in a server-pool process to be
accessed by the GIOP over TS/MP transport protocol. (By default, an object with a lifespan policy of
PERSISTENT is assumed to be stateless.) The state policy has two values: STATEFUL and
STATELESS.
Using Stateless Factory Objects to Create Stateful Servants
The use of stateless factory objects in combination with server pools provides a pattern for scalable
stateful servants: you create a factory POA with a state policy of STATELESS (if the lifespan policy is
PERSISTENT, then STATELESS is set by default) and then create a separate POA for the created
servant (worker) objects with the state policy explicitly set to STATEFUL. Figure 61 shows the
operation of the factory and worker objects with these POA settings.
Figure 6.1. Stateless Factory Object and Stateless Servant
The Comm Server process relays the first request to the server using the GIOP over TS/MP protocol, and
TS/MP selects a server process, within the application server pool, to host a factory object. The factory
object creates a stateless worker object and returns the worker's object reference to the Comm Server,
which relays the object reference to the client. Subsequent requests from the client are routed through the
same Comm Server and sent directly to the same worker object. Communications between the worker
and the Comm Server use the GIOP over Guardian file system protocol. In this scenario, all three
transport protocols (IIOP, GIOP over TS/MP, and GIOP over Guardian file system) must be configured
in the application profile.