Phrame 3 Documentation Home  |  Features  |  Downloads  |  Contact Documentation > How To Load Classes Just In Time
How To...
Install Phrame 3
Configure The Phrame Container
Configure An Action Server
Configure The Error Handler
Define A Module Configuration
Trigger The Phrame Container
Trigger An Action Server
Trigger An Action
Use Language Negotiation
Use Session Validation
Use Phrame Tag Libraries
 
How To Load Classes Just In Time
Phrame is able to load the class definitions of your custom made error handlers, configuration digesters, actions and action forms just before they are needed.

In pre 3.1 versions Action and ActionForm classes typically were loaded after the action server (re)started the PHP session. This is why a mechanism was built in to avoid 'incomplete object' errors: the action server first closed the PHP session, then loaded the class definition and finally restarted the PHP session.

From version 3.1 onwards Phrame only (re)starts the PHP session when it is actually needed, i.e. just before redirecting or forwarding to a web resource. Before this time no PHP session will be active (rest assured your application and session scope will neatly be preserved :o) ), hence classes that are loaded 'just in time' will not lead to 'incomplete object' errors.

Enabling session restarting (pre 3.1 versions)
In order enable 'just in time' loading you have to explicitly allow Phrame to restart PHP sessions by setting the _ALLOW_SESSION_RESTARTING parameter in the server configuration to TRUE. The default setting of this parameter is FALSE, which means you have to include all the classes used by your application before starting the action server.

Enabling session restarting (version 3.1 and later)
Since the session restarting mechanism has become obsolete, the _ALLOW_SESSION_RESTARTING parameter is no longer supported. You will not have to configure anything to enable 'just in time' loading.

© 2005 Pieter A. van Stempvoort. All rights reserved.
Hosted by www.Geocities.ws

1