Commit a793974c authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Fixed messengerHome issue with web applications.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@180 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0080182b
...@@ -253,6 +253,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -253,6 +253,7 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
this.modules.add(mod); this.modules.add(mod);
} }
catch (Exception e) { catch (Exception e) {
e.printStackTrace();
if (isInitialized) { if (isInitialized) {
mod.stop(); mod.stop();
mod.destroy(); mod.destroy();
...@@ -499,20 +500,24 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv ...@@ -499,20 +500,24 @@ public abstract class BootstrapContainer implements Container, ServiceLookupProv
* @throws FileNotFoundException if there was a problem with the home * @throws FileNotFoundException if there was a problem with the home
* directory provided * directory provided
*/ */
private File verifyHome(String homeGuess, String jiveConfigName) throws private File verifyHome(String homeGuess, String jiveConfigName) throws FileNotFoundException {
FileNotFoundException {
String forumsConfigName = "jive_config.xml";
File realHome = null; File realHome = null;
File guess = new File(homeGuess); File guess = new File(homeGuess);
File configFileGuess = new File(guess, jiveConfigName); File configFileGuess = new File(guess, jiveConfigName);
if (configFileGuess.exists()) { if (configFileGuess.exists()) {
realHome = guess; realHome = guess;
} }
File forumsHome = new File(guess, forumsConfigName); File forumsHome = new File(guess, jiveConfigName);
if (forumsHome.exists()) { if (!forumsHome.exists()) {
throw new FileNotFoundException(); throw new FileNotFoundException();
} }
return realHome;
try{
return new File(realHome.getCanonicalPath());
}
catch(Exception ex){
throw new FileNotFoundException();
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment