ANY feedback is appreciated. I cannot imagine I am the only one who has a WebService on SLSB, and injected jndi @Resources for runtime lookup. I am also looking into Arquillian for integration testing, but I'd like to see if there is a simple fix here, as I struggle with the dependencies set up of arquillian in JBoss 6.
I built a Arqullian test case using <arquillian.version>1.0.0.Alpha5</arquillian.version> and <jboss.version>6.0.0.Final</jboss.version>, and annotate a
@Resource(mappedName = "java:testDataSource")
protected DataSource dataSource;
mvn -e test -Pjbossas-managed-6
assert not null on dataSource.getConnection() and the test passed. I am lost as to why when I deployed on JBoss 6 and ran my test using the web services stub that it fails with :
10:17:00,093 ERROR [org.jboss.wsf.common.injection.InjectionException] Resource 'testDataSource' not found: javax.naming.NameNotFoundException: testDataSource not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]
when server starts up, the jndi DS is bound:
10:16:19,865 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=testDataSource' to JNDI name 'java:testDataSource'
Can someone help, please?! What does it take to get a little help here?