-
1. Re: Entity Bean injection doesn't work while
drapierwim Oct 31, 2005 4:48 AM (in response to uml20)The user is loaded form the DB, if a user is found with the right name and
password it gets outjected by seam in the sessioncontext. (see below)user = results.get(0); sessionContext.set("loggedIn", true);
This entity bean is session scoped with the @Scope annotation.
My advice is you should read the documentation things are very well explained. I still read it almost every day.
Cheers -
2. Re: Entity Bean injection doesn't work while
uml20 Oct 31, 2005 7:48 AM (in response to uml20)Thanks for your response first.
I think that you misunderstood my question. @-@
1.without loginInterceptor, in "login".login(){}, I can find the "user" bean by sessionConext.get("user") before querying database, and the annotated "@In private User user" is not null. (auto injected)
2.with loginInterceptor, in "login".login(){}, I can find the "user" bean by sessionConext.get("user") before querying database, but the annotated "@In private User user" is null. (not injected)
so interceptors are responsible for link objects in contexts to fields of session_bean/java_bean.
[img]http://bbs.wayup.hexun.com/img/002_t.gif[/img]
[img]http://bbs.wayup.hexun.com/img/0015_t.gif[/img][/img]