I am trying to understand how EJB components (SLSB, SFSB, MDB) work.  If I have 
an MDB that has a reference to a SLSB and a SFSB like:

  | public class TestMDB implements MessageListener {
  |     @EJB
  |     private TestSLSB slsb;
  |     @EJB
  |     private TestSFSB sfsb;
  |     public void onMessage(Message msg){
  | ...
  | 

I had thought that the SLSB was pulled from a pool of available objects (so 
could be the same instance but not necessary) while the SFSB would always be 
the same instance no matter how many times the onMessage was called so long as 
the MDB remained in memory, is this not the case?  One of the developers I work 
with was telling me that the SLSB and SFSB would both be the same instances no 
matter how many times the onMessage was called.  If this were the case I am not 
sure I completely understand what the difference between a SLSB and SFSB would 
be.  Additionally it would help to understand when injection occurs and for 
SFSB vs SLSB.

If anyone can help me figure out these questions I'd greatly appreciate it.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4177763#4177763

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4177763
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to