tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From is_maximum <>
Subject Question regarding Stateless session beans
Date Thu, 12 Nov 2009 09:23:38 GMT


We have a stateless SB with three method: preProcess, process and
Normally when I use this EJB in another SB I call these methods as follows:

public class AnotherEJB {

private SessionBean sessionBean;

   public void someMethod() {

this works fine and it seems the state of that bean is kept the same. 
My question is if a delay occurs between these three methods, will container
assign this stateless to another thread to serve incoming request and after
this delay say process() method is called it might be another session bean
instance? To clarify my question look at following code:

public void someMethod() {


    //calling another method which takes too long to complete, and during
this method container
    // is receiving another request in which sessionBean is invoked
    sessionBean.process(); //is this the same instance of sessionBean that
already invoked preProcees() method above?

    perhapsDoSomethingElse(); //another method



can anyone please help me on this?



Mohammad Norouzi

Help each other to reach the future faster Pixelshot Photoblog Brainable Blog 

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message