Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

@EJB & @Resource problem Please Help

 
Manolescu Sebastian
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!