Manolescu Sebastian

Greenhorn
+ Follow
since Apr 03, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Manolescu Sebastian

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,