The real interesting solutions for lifecycle extensions require some
sort
of "session" information. Consider the process of setting the
SecurityManager
based on the user credentials, or using the proper private key for
encrypted
communication. Each of these require knowledge about the user. We need
some
sort of session information.
Now it is easy to implement if we change a couple contracts, and one of
the
interfaces in the Lifecycle Extension. The main contract to change is
that
each client has a unique ServiceManager/ServiceSelector. That means
each
component has its ServiceManager, as well as what we expose externally.
Within each ServiceManager would be a Map. That Map exists as long as
the
ServiceManager exists. By virtue of the fact that the SM is unique to
the
client, so is the Map.
The interface that needs to be changed is the LifecycleExtension
interface.
We need to add a new parameter to both access() and release():
public interface LifecycleExtension
{
// .... Everything else is the same ....
void access( Object component, Context context, Map session );
void release( Object component, Context context, Map session );
}
That session can be used to store information about a component before
and
after the access and release.
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>