I would like to know if someone has suceeded in accessing a ServletContext from within a SFSB.
The problem has as follows: I use a staeful session EJB to compute and produce some dynamic images along with their image metadata (image maps etc..) I set a maximum lifetime for these beans in jboss3.0.1. Then i have a servlet that checks if a specific attribute (which coresponds 1-1 to the session EJB) in the ServletContext is set. -If not set, it creates the EJB, and sets the appropriate ServletContext attribute with the value of the Handle. -If set then it calls the EJB methods (getting the cached image). The point is that the only way to know when the SFSB had been removed by the jboss container is to check for an exception. I would like a better way, in which the ServletContext would *know* when the SFSB dies and gets removed. I would like to bind the ServletConext (i use one JVM for both catalina,jboss) to a name, and then have the remove() method of the SFSB to remove the attribute from the servletContext. Has anyone done anything similar?? Is there a better way?? Thanx a lot. ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-10-8981112 fax: +30-10-8981877 email: [EMAIL PROTECTED] [EMAIL PROTECTED] ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user