Hi. I have been posting like a looney on an issue I am working on. I will
reiterate the background since you all do not want to remember my issues!
I have an ASP app (biggish). We are creating the first of many JSP apps.
Until such time as we re-engineer our ASP apps for our new JSP / Java /
Websphere environment, we need a session bridge.
The services are always initiated from within ASP where they are
authenticated and authorized. The fiddle in the ASP app and make a request
of the JSP app. Here is the ASP side of the "bridge" when the JSP services
is requested:
- Store all session info in a database.
- Encrypt (if necessary, kinda anal) some unique id which identifies the
client and store as a domain session cookie.
- Redirect to the JSP service
- Read (decrypt, if necessary) cookie and retrieve session info from db.
My issue is what to use as the unique id. What I *really* want is the
identity from my DB2 table upon insert. So off I went to aspfaq.com. I see
this article:
http://www.aspfaq.com/show.asp?id=2174
Let's assume for the moment that I can get the identity column in DB2 to
work and can retrieve a value after insert. The docs say that the function
which is used is "non-deterministic function that returns the most recently
assigned value for an identity column." And goes on to explain that
basically it is similar to SQL Servers @@IDENTITY. Which cannot be
guaranteed to be the last insert.
The project architect knows that a Java method can be made threadsafe by the
simple inclusion of the "sync" keyword in the method declaration. He thinks
there has to be equivalent in ASP. I do not think so without implementing
com objects and using COM+, which I am not inclined to do.
Am I correct that a page or sub or something cannot be indicated as
threadsafe in native ASP?
(Please note that the architect in question explained to me that
"threadsafe" in the Java method example used above means that until the
first user is done with the method then second user will wait and use it
next. If it means more or something else, then I confess to being utterly
confused. I guess I am anyway.)
Thanks
S