I configured Jakarta-Tomcat-4.1.27 to supply connections of my Oracle Database Server 
through JNDI Datasource as described in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

All accomplished the tests of JNDI Datasource HOW-TO and everything perfectly worked. 
Later, reading a magazine of ORACLE finds an article on Six JDBC Tips goes Enterprise 
Web Application (Setember/October 2002), more specifically with an example on 
Datasources according to code below:

...
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/pequi");
conn = ds.getConnection("CELIN","1951174");
conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
...

 My question is if I can pass the user and connection password to the servant of 
database in the way that is being done above, because in all of the examples of JNDI 
Datasource HOW-TO user's name and the password are so much defined in server.xml, 
together with the configuration.

When executing the code I am receiving the error message

java.lang.UnsupportedOperationException
 at datasource.OracleDataSource.conecta_datasource(OracleDataSource.java:18)

The line 18 of the code is exactly the same in that step the user and the respective 
password.

 Thank you

Sebastião Carlos Santos
Oracle Database Administrator - DBA 8i/9i
Oracle Certified Professional - OCP DBA 8i/9i

Reply via email to