I am building a ear project using maven and embed a webservice war in it ;
the testDataSource is the jndi name defined like this under JBOSS AS 6 deploy directory:
<jndi-name>testDataSource</jndi-name>
The web service endpoint is defined as:
@Stateless()
@Resource(mappedName="testDataSource")
@TransactionManagement(TransactionManagementType.BEAN)
@WebContext(contextRoot="/testMe")
@WebService(name="TestDataSourceService",
serviceName = "TestDataSourceServiceBeanService",
portName = "TestDataSourceServicePort",
targetNamespace = "http://testDataSource/")
@SOAPBinding()
public class TestWSServiceBean extends TestServiceImpl {
....
}
the war(webservice) also has a dependency (so under WEB-INF/lib/testDataSource.jar with
@Resource(mappedName="testDataSource")
that is class TestServiceImpl {
@Resource(mappedName="java:tx_vantive")
protected DataSource dataSource;