Hi<br><br>I'm trying to finish <a href="https://issues.jboss.org/browse/AS7-1371">https://issues.jboss.org/browse/AS7-1371</a> but I ran into a problem with the class loader. I need way to load the class for a specified JDBC driver, but I can't seem to figure out how to make it available on the classpath too my authentication service.<br>
<br>I try to load the connection class like this, and testing it with the existing H2 JDBC driver:<br>ClassLoader original = null;<br> try {<br> original = Thread.currentThread().getContextClassLoader();<br>
if (original != null) {<br> Thread.currentThread().setContextClassLoader(null);<br> }<br> Class.forName(this.driver).newInstance();<br> } finally {<br> if (original != null) {<br>
Thread.currentThread().setContextClassLoader(original);<br> }<br>}<br> <br>The user can setup a outbound connection to a database for authentication, by using the configuration below <br><br> <security-realm name="ManagementRealm"><br>
<authentication><br> <local default-user="$local"/><br> <database connection="db" plain-text="true"><br> <!-- simple-select-users table="users" username-field="user" password-field="password"/ --><br>
<sql-select-users sql="select user,password from users where user = ?" /><br> </database><br> </authentication> <br></security-realm><br><br><outbound-connections><br>
<database><br> <connection driver="org.h2.jdbcx.JdbcDataSource" name="db" url="jdbc:h2:/tmp/test;DB_CLOSE_DELAY=-1" username="sa" password="" min-pool-size="10" max-pool-size="20" /> <br>
</database><br></outbound-connections> <br><br>Any suggestions how to solve this?<br><br>Thanks!<br><br>br<br>Flemming<br>