I have read that one can use the @EJB annotation inside a JSF managed bean to inject a reference to an EJB 3.0 session EJB, but when I try it I get a NullPointerException - meaning that the bean is not being injected. My annotation looks like this:
@EJB private fully.qualified.business.interface.Type varName;
I have a setter for the field as follows:
public void setVarName(Type parm) {
this.varName = parm;
}
Any ideas? Thanks in advance
-
Injecting EJBs into JSF managed beans (1 messages)
- Posted by: Ray Baco
- Posted on: March 16 2006 13:37 EST
Threaded Messages (1)
- Injecting EJBs into JSF managed beans by Alexandre Poitras on March 16 2006 18:21 EST
-
Injecting EJBs into JSF managed beans[ Go to top ]
- Posted by: Alexandre Poitras
- Posted on: March 16 2006 18:21 EST
- in response to Ray Baco
I have read that one can use the @EJB annotation inside a JSF managed bean to inject a reference to an EJB 3.0 session EJB, but when I try it I get a NullPointerException - meaning that the bean is not being injected. My annotation looks like this:@EJB private fully.qualified.business.interface.Type varName;I have a setter for the field as follows:public void setVarName(Type parm) { this.varName = parm;}Any ideas? Thanks in advance
You shoud really take a look at Seam. It would help you a lot.