[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Passing in parameters from runtime code
|
Depending on what web server you use, it might provide you with hooks to
the creation of new sessions. What I mean to say is that it might
provide some listener interface, so whenever a session is created, the
interested listeners are notified.
I am guessing that if your aspect (or a helper class) will implement the
listener interface, it will be able to access each session object, and
from their get each of the Subject objects.
One more thing to consider: you'll probably need to change the
declaration of your aspect so it is no longer a singleton.
Jonathan
Seaman, Sloan wrote:
How do I get a variable from the running code into some Aspect?
What I mean to say is that I have an web app that for each user logged
in, there is a javax.security.auth.Subject object for. I'm using
AspectJ to record all SQL statements that end up getting executed but
how do I tie them to the Subject?
I.E. How do I get the .aj code to have an instance of the Subject
object? I can't put it in a static place in memory because since it is
a web app, I have to worry about threading issues.
Anyone know how I can pull this off?
Thanks!
--
Sloan