This content has been marked as final.
Show 2 replies
-
1. Re: Questions about injection and outjection
norman.richards Jun 13, 2007 5:29 PM (in response to y_zl)1 - yes
2 - don't understand the question
3 - We've talked about that, but as I recall the problem is that java doesn't store the parameter names (it does, but only as debug information). That means we can't get to the names to do injection in a way that is both simple and consistent with the rest of Seam. Given that you can have an EL method-binding like #{bean.doSomething(em)} now, it's generally not a big issue. -
2. Re: Questions about injection and outjection
y_zl Jun 13, 2007 5:59 PM (in response to y_zl)1) If the answer to question one is Yes, does it mean that it will inject non-relevant variables as well? Does it affect performance ?
2) For question 2, If I have two session beans A and B. B is used as a session facade.@Stateless @Name("a") public Class A ...{ @In B b; public String test1() { return b.test2("cccc"); } } @Stateless @Name("b") public Class B ...{ @In String s1; @Out String s2; public String test2(String s) { s2=s+"aaaa"; return s+s1; } }
is the above codes legal ? Could I get the variable named s2 outjected?
3) For question 3, Could you give a simple example to demo that?
For example
@Stateless @Name("actionA") public class ActionA implents ActionAInf { @PersistenceContext private EntityManager em; public String methodA() { new Bean(em); } }
How do I use the EL binding in this case?