Author: anil.saldhana(a)jboss.com
Date: 2011-11-08 10:09:23 -0500 (Tue, 08 Nov 2011)
New Revision: 1320
Modified:
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ServerDetector.java
Log:
PLFED-246: server detection in as7
Modified:
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ServerDetector.java
===================================================================
---
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ServerDetector.java 2011-11-07
19:50:57 UTC (rev 1319)
+++
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util/ServerDetector.java 2011-11-08
15:09:23 UTC (rev 1320)
@@ -51,10 +51,11 @@
private void detectServer()
{
//Detect JBoss
-
+ Class<?> me = getClass();
+ Class<?> clazz = null;
try
{
- Class<?> clazz = SecurityActions.loadClass(getClass(),
"org.jboss.system.Service");
+ clazz = SecurityActions.loadClass(me, "org.jboss.system.Service");
if (clazz != null)
{
jboss = true;
@@ -63,13 +64,21 @@
}
catch (Exception e)
{
- //ignore
+ try
+ {
+ clazz = SecurityActions.loadClass(me,
"org.jboss.as.server.Bootstrap");
+ jboss = true;
+ return;
+ }
+ catch (Exception ee)
+ {
+ }
}
//Tomcat
try
{
- Class<?> clazz = SecurityActions.loadClass(getClass(),
"org.apache.cataline.Server");
+ clazz = SecurityActions.loadClass(getClass(),
"org.apache.cataline.Server");
if (clazz != null)
{
tomcat = true;
Show replies by date