Hi,

The theory is to override the PersistentManager with your own class.
Theirs subclasses the PersistentManagerBase which subclasses ManagerBase.
Now inside ManagerBase it seems to create the sessions in the method
createSession(String). If you override that, you could count the sessions
and if you already have one active, toss "IllegalStateException" to prevent
a second session from being created.
Rick did almost the same but using webcontainer indepenedent APIs.
So why should he bind his implementation to Tomcat?

I think that Rick's original solution is ok.
He could remove some lines, because you can set/remove an attribute to/from a context and have that
as a true, false flag.
Instead of setting the attributes to false, don't set them or remove them and check only for attributes beeing
present in the given scope, no need to check for their bool value.

But that's only a minor detail...


Tamas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to