-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jean,

jmuller wrote:
> I've written my own DataSourceRealm that overwrite Tomcat's one, and put the
> jar in server/lib.
> It only overwrites the getRoles() method to change the SQL statement. See
> source here:  http://www.nabble.com/file/p12820411/DataSourceRealm.java
> DataSourceRealm.java  (free to use/modify/comment) !

I do have one comment:

>         finally {
>             try {
>                 if (rs != null) {
>                     rs.close();
>                 }
>                 if (stmt != null) {
>                     stmt.close();
>                 }
>             } catch (SQLException e) {
>                     containerLog.error(
>                         sm.getString("dataSourceRealm.getRoles.exception",
>                                      username));
>             }
>         }
>  

I could use separate try/catch blocks for each close() call... you
wouldn't want the ResultSet.close call to fail and then never call
Statement.close().

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG8/6i9CaO5/Lv0PARAgTPAJ9se1N5+CdC42qnfgEYzJHDj1EAPACgn9uO
1Kuy4n+S/wTnDppdyE3bMKQ=
=53g3
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to