I have a basic understandind question about stateless session beans and
injection:
A statless session bean doesn't hold any state, but what happens if you inject
some beans that are user realted (request or session scope)? that would mean
the stateless session bean has a state (for the request).
For example:
| @Stateless
| @Name("register")
| @Interceptors(SeamInterceptor.class)
| public class RegisterAction implements Register
| {
|
| @In
| private User user;
| @In
| private FormBeanXY formBean;
|
| public String processRegister()
| {
| .... do something with the injected beans and call other methods of
this bean or other injected sessionbeans ...
|
|
if multiple useres access this sessionbean at the same time, will this cause
troubles? Or does every user get a new instance of the stateless session bean
(with the specific injected values)?
By the way: In the documentation I found an example of a stateles session bean
with the scope EVENT : Does this make any sense? Will this bean be destroyed
after the request, or does it mean, it is just referenced under der Event
context too?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3937064#3937064
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3937064
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user