[thelist] session_OnStart(), application_OnStart() in CFMX
Aaron Johnson
lists at cephas.net
Mon Jan 27 17:36:05 CST 2003
hi everyone,
Couple weeks back (developers at MINDSEYE) had some interesting discussions
w/ Macromedia guys about what we'd like to see in upcoming CFMX releases..
one of the features we wanted was application onstart, session onstart type
events.. Long story short...I wrote up a couple classes that sort of
implement that functionality using the HttpSessionListener ( sorta == cfmx
session scope) and ServletContextListener (sorta == application scope in
cfmx) of the javax.servlet package. You can read up here on the background:
http://cephas.net/blog/archives/000237.html#000237
and get the Java code samples, results, and web.xml mods to make it work
here:
http://cephas.net/blog/archives/000238.html#000238
I'm interested specifically in:
a) why the sessionDestroyed method doesn't return in CFMX (or at least
doesn't appear too, did I do something wrong?)
and b) in how to best implement this (ie: can I have I a separate listener
for each application I create by placing a WEB-INF directory w/ the
corresponding web.xml in each application's web root?)
Other questions...
1) I haven't seen any good documentation on WEB-INF specifically related to
CFMX. The other servlet containers (ie: Tomcat, JRUN... ) require a WEB-INF
*per application*... I've not seen that recommended with CFMX. Can you do
that? What are the ramifications of doing so? Anyone have any good
documentation or notes on the use of WEB-INF in CFMX?
2) You'll see in my notes on the above links that using the listeners only
return sessionID's of J2EE based sessions. Anyone know of a way to get the
session information in CFMX (ie: not <cfif isDefined("session.myvar"),
rather using a listener)?
3) it's obvious after using the ServletContext class that this *isn't* the
same thing as the Application scope in CFMX, although they both
fundementally provide the same functionality. *Are they the same thing
under the hood?* If not, why not?
Thanks all!
AJ
Aaron Johnson
http://cephas.net/blog/
ajohnson at cephas.net
More information about the thelist
mailing list