Try if this works
(1) modify xxx-ds.xml
(2) modify your method:
javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup("java:/yourOracleDS");
(3) ensure oracle driver (i.e. classes12.jar) in JBOSS lib directory
i have tried ur option also but it was not working now also
every thing i have given was fine but i dont know y it was not working
while starting itself it is showing that no resource manager found for OracleDS i think datasource was not created yet
how can i do at this stage????
Try starting JBoss without your application or -ds.xml deployed.
Put the -ds.xml in the deploy folder, look at any messages on the console to see if it deployed.
Use JNDI View in jmx-console to check that the connection bound.
Only when you know that the connection has been bound correctly then deploy your session bean and see if you can make use of the connection.
thnk you all for helping me
finally i was got the reason why it was not deployed
the reason was small mistake in oracle-ds.xml
in place of
<local-tx-datasource>i have given
that was only mistake i was commited
by replacing it with proper word now it is working fine