ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Kulkarni" <ashish.kulkarn...@gmail.com>
Subject Setting up user id, password for JDBC connection
Date Wed, 21 Nov 2007 21:15:37 GMT
I am working on a swing application where the user enters his user id and
password, then this user id and password is required to create SqlMapClient,
this is what i am tried but did not work
in my sqlconfig.xml file i have
<dataSource type="SIMPLE">
<property name="JDBC.Driver" value="${driver}" />
<property name="JDBC.ConnectionURL" value="${url}" />
<property name="JDBC.Username" value="${username}" />
<property name="JDBC.Password" value="${password}" />

And in my java program
I do
System.setProperty("driver", JDBCdrivername);
System.setProperty("url", url);
System.setProperty("username", username);
System.setProperty("password", password);

String resource = "com/pfizer/maps/sqlmap/sql/SQLMapConfigAS400.xml";
Reader reader = Resources.getResourceAsReader(resource);
SqlMapClient sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(reader);

Any ideas of how do i get it working in Swing application


View raw message