(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).
See this http://www.jboss.org/community/wiki/GetquotjavaxnamingNoInitialContextExceptionquot
for using Dependeny injection in your Unit Tests (which are actually application clients), you have to do some very special tasks to start it. Here is a doc which describes the required steps for a standalone application client: http://www.jboss.org/community/wiki/HowtouseanapplicationclientinJBoss-5
But I fear this cannot be applied to JUnit, as you cannot use "org.jboss.client.AppClientMain" to run a test.
So I think you have to perform a JNDI lookup in the JUnit tests.
Thank a lot!!