Dear all,
I want to write JUnit Tests for my EJB3.0 SessionBeans. How do I access the
application server?
InitialContext ctx = new InitialContext();
bean = (BeanInterface) ctx.lookup("...");
does not work since the initial context cannot be resolved
(javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an application
resource file: java.naming.factory.initial).
Obvoiusly, for the same reason, dependency injection doesn't work either:
@EJB
BeanInterface bean;
What do I have to do?
Best regards
Bernhard
--
Prof. Dr. Bernhard Humm
Darmstadt University of Applied Sciences
[EMAIL PROTECTED]
www.fbi.h-da.de/~b.humm
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970146#3970146
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970146
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user