Thread in a session Bean
A servlet invokes an SessionBean (Stateless)
In the Bean , I have a thread which is constantly monitoring a column of a table.
This bean is just invoked by the Servlet and the thread gets on.
This thread had to killed (ie the instance) from a servlet.
How to kill this thread or the instance.
[337 byte] By [
jsjsjothi] at [2007-9-26 3:22:21]

This sounds like a weird design to me. Firstly, you're not supposed to use multi-threading from inside of any EJBs, this is in the EJB spec. Second, how are you monitoring the column of the table? Issuing polling queries to see if it has changed? There's got to be a better way for you to accomplish whatever it is you need to do. One way might be to use an entity bean, it will ensure the data in memory is consistent with that in the database.
jsjsjothi,From what I have read you are not able, if not strongly discouraged, from using threads in an EJB. You are supposed to rely on the container to do the threading. The monitor should be outside of the bean class.kyleb
kyleb at 2007-6-29 11:40:00 >

Now the Thread has been replaced by the following code
boolean booStatus = true;
while(booStatus )
{
//(Method) this method checks the 3 column of a single table at a regular interval
}
this is implemented in the ejbCreate();
how to kill this thru another instance or another invoking.