mirror of https://github.com/apache/activemq.git
the login.config is at the root of the resouces dir. so use the class's classload to get the resource.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@358602 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3621f25504
commit
bd17e0385f
|
@ -121,7 +121,7 @@ public class SimpleSecurityBrokerSystemTest extends JmsTestSupport {
|
||||||
static {
|
static {
|
||||||
String path = System.getProperty("java.security.auth.login.config");
|
String path = System.getProperty("java.security.auth.login.config");
|
||||||
if( path == null ) {
|
if( path == null ) {
|
||||||
URL resource = SimpleSecurityBrokerSystemTest.class.getResource("login.config");
|
URL resource = SimpleSecurityBrokerSystemTest.class.getClassLoader().getResource("login.config");
|
||||||
if( resource!=null ) {
|
if( resource!=null ) {
|
||||||
path = resource.getFile();
|
path = resource.getFile();
|
||||||
System.setProperty("java.security.auth.login.config", path);
|
System.setProperty("java.security.auth.login.config", path);
|
||||||
|
|
Loading…
Reference in New Issue