I have defined oracle datasource in JBoss standalone.xml as mentioned below:
<datasource jndi-name="java:jboss/datasources/DefaultDS" pool-name="DefaultDS_pool" enabled="true" use-java-context="true">
<connection-url>jdbc:oracle:thin:@localhost:1521:C3S</connection-url>
<driver>oracle</driver>
<security>
<user-name>jboss</user-name>
<password>sysadm</password>
</security>
</datasource>
<drivers>
<driver name="oracle" module="com.oracle.jdbc">
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<datasource-class>oracle.jdbc.OracleDriver</datasource-class>
</driver>
and i am using this datasource in bean class using below code:
@Resource(mappedName="java:jboss/datasources/DefaultDS")
DataSource driver;
But i am not able to get oracle datasource instead only getting wrapperdatasource object. I was under impression as i have defined oracle datasource so i will get the same.
So please let me know how can i get oracle datasource instead of wrapperdatasource in jboss as7?
Aucun commentaire:
Enregistrer un commentaire