My context.xml...
My Java Code ....
It's working fine when I use Windows, but it's not working when I use Linux.
My Application server is Tomcat.
I mean to say why does it behave in different operating System .. Where I gone wrong ?
Code:
<Context path="/JNDITest">
<Resource name="jdbc/dataSource" auth="Container"
type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://10.29.33.90:5432/Admin"
username="erp"
password="iiterp"
maxIdle="50"
maxWait="60000"
maxActive="10"/>
</Context>
Code:
Context ctx = new InitialContext();
DataSource ds= (DataSource)ctx.lookup("java:/comp/env/jdbc/dataSource");
Connection l_con = ds.getConnection();
My Application server is Tomcat.
I mean to say why does it behave in different operating System .. Where I gone wrong ?
Comment