I have been trying to integrate shiro into one of our web applications. I have gotten it to work with my own overloaded JdbcRealm class that opens up a tomcat jdbc pool datasource. Our current web app has a datasource pool already initialized and stored in the servlet context. The reason we do this in the code and not with a JNDI source, is for security reasons and database password rotation ease of use. The initialize servlet pulls the encrypted database credentials from another internal web service. Now I am trying to find a way to get the shiro realm and the current web app to use the same datasource pool. I cannot pull the datasource from the servlet context in the JdbcRealm because it is not a servlet. I tried looking at setting up the datasource in an overloaded EnvironmentLoaderListener, however, I am not sure how the realm can get the datasource from the loader. Any suggestions of how I can get the web app and shiro both using the same pooled datasource?
-- View this message in context: http://shiro-user.582556.n2.nabble.com/Shared-datasource-between-realm-and-web-application-tp7580393.html Sent from the Shiro User mailing list archive at Nabble.com.
