Hi >From my experience of shiro with MySQL i can suggest some resources for you. You can try them out and get back here if you have any troubles ...
1. http://www.ibm.com/developerworks/data/library/techarticle/dm-0506fechner/ Description is given for DB2 application development. Some examples are given which can help you to determine properties accepted by DB2Driver. 2. This is how i have configured my MySQL + JDBCrealm. In web.xml, ------------------------------------- <!-- Apache Shiro Configuration --> <filter> <filter-name>ShiroFilter</filter-name> <filter-class>org.apache.shiro.web.servlet.IniShiroFilter</filter-class> <init-param> <param-name>config</param-name> <param-value> [main] jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm jdbcRealm.permissionsLookupEnabled = true jdbcRealm.authenticationQuery = select user_password,user_salt_passwd from mcuser where user_name = ? jdbcRealm.userRolesQuery = select role_name from users_roles where user_name = ? jdbcRealm.permissionsQuery = select permission_name from role_permissions where role_name = ? ds = com.mysql.jdbc.jdbc2.optional.MysqlDataSource ds.serverName = localhost ds.user = root ds.password = admin ds.databaseName = mysqldb jdbcRealm.dataSource = $ds #Use this if you are using hash-salted passwords for your app # password hashing specification sha256Matcher = org.apache.shiro.authc.credential.HashedCredentialsMatcher sha256Matcher.storedCredentialsHexEncoded = false sha256Matcher.hashIterations = 1024 sha256Matcher.hashAlgorithmName = SHA-256 mcnJdbcRealm.credentialsMatcher = $sha256Matcher authc = com.myplanet.myutils.VerboseFormAuthFilter authc.failureKeyAttribute = errorMessage [filters] authc.loginUrl = /index.jsp [urls] /index.jsp = authc /somename-1/* = authc /somename-2/* = authc </param-value> </init-param> </filter> <filter-mapping> <filter-name>ShiroFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> ---------------------------------------- may be these hints can help you to configure, your Db2 + JDBCRealm. Thanks, Manish On 2/8/12, jaxjava <[email protected]> wrote: > Newbie question, has anyone had any success with the DB2 JDBC datasource > driver? > > I can not determine the properties accepted by com.ibm.db2.jcc.DB2Driver. > There are no public getters/setters for this class (ie. serverName) and > implements javax.sql.Driver. > > Any help would be greatly appreciated. > > > > -- > View this message in context: > http://shiro-user.582556.n2.nabble.com/JdbcRealm-DB2-tp7263670p7263670.html > Sent from the Shiro User mailing list archive at Nabble.com. >
