aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes @EJB & @Resource problem Please Help Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "@EJB & @Resource problem Please Help" Watch "@EJB & @Resource problem Please Help" New topic
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,

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @EJB & @Resource problem Please Help
 
Similar Threads
struts iterate tag
endless loop
Inject a local bean @EJB
How to send /receive SMS using the siemens tool kit
JFrame display problem