| Author |
@EJB & @Resource problem Please Help
|
Manolescu Sebastian
Greenhorn
Joined: Apr 03, 2012
Posts: 1
|
|
Hi,
I've got a problem whit the @EJB injection, the EJBis null and I can't find the problem.
first class:
@Named("serviceMixter")
@Stateless
public class ServiceMixter extends XGen {
private static final String some = "xType";
@Resource(lookup = "java:/jca/jcrJCA")
private Rep rep;
@Resource
private SessionC c;
.....
//rest of the class
}
and I try to test the class but when I call:
@EJB
ServiceMixter serviceMixter;
@Test
public void mx(){
System.out.println(serviceMixter); //return null
serviceMixter.save(method);
}
The problem is from the @Resource? How can I incude the @Resource in the test.
Please help.
Regards,
|
 |
 |
|
|
subject: @EJB & @Resource problem Please Help
|
|
|