JBoss Community

Cannot inject field annotated with @Resource annotation in JBOSS 6

created by Amber Crawford in JBoss Web Services - View the full discussion

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;


Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community