| Author |
About the session tracking of stateful beans
|
Tang Yue
Ranch Hand
Joined: Nov 11, 2008
Posts: 40
|
|
After reading EJB in action, I still wonder exactly how the EE container does session-tracking? For example: clientMethod() { @EJB StatefulBean sb; sb.method1(); .... sb.method2(); } How does the EE container ensure that the same stateful bean is served when method1 and method2 are called? Is this implemented some lower-level protocol?
|
Houston Rockets go go go!
|
 |
Celinio Fernandes
Ranch Hand
Joined: Jun 28, 2003
Posts: 546
|
|
well, in your example, sb is an instance of StatefulBean. This is no session-tracking.
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
|
 |
Tang Yue
Ranch Hand
Joined: Nov 11, 2008
Posts: 40
|
|
I know on the hgih abstraction level, developers would see a stateful bean always serving the same client. But how is this implemented by a container? How does a container see two calls(method1, method2) from the same client and give it the same stateful bean?
|
 |
 |
|
|
subject: About the session tracking of stateful beans
|
|
|