| private HashSet loggedOnClientIds;
| - private String stateFile = "jbossmq-state.xml";
| + private String stateFile = "conf/default/jbossmq-state.xml";
David, I think this is a bad idea, you are hardcoding the configuration of
the files...
think some more about this... use somewhere else to store that file
marcf
|
| /**
| * Constructor for the StateManager object
| @@ -60,7 +60,7 @@
| */
| public void setStateFile(java.lang.String newStateFile)
| {
| - stateFile = newStateFile;
| + stateFile = newStateFile.trim();
| }
|
| /**
| @@ -389,8 +389,16 @@
| */
| public void loadConfig() throws java.io.IOException,
|org.jboss.mq.xml.XElementException
| {
| - java.io.File jbossHome = new
|java.io.File(System.getProperty("jboss.system.home"));
| + java.io.File jbossHome = new
|java.io.File(System.getProperty("jboss.system.home"));
| + if (!jbossHome.exists())
| + {
| + category.error("jboss.system.configurationDirectory
|not found! : " + jbossHome);
| + }
| java.io.File file = new java.io.File(jbossHome, stateFile);
| + if (!file.exists())
| + {
| + category.error("statefile not found! : " + file);
| + }
| java.io.InputStream in = new
|java.io.BufferedInputStream(new java.io.FileInputStream(file));
| stateConfig = XElement.createFrom(in);
| in.close();
|
|
|
|
|_______________________________________________
|Jboss-development mailing list
|[EMAIL PROTECTED]
|https://lists.sourceforge.net/lists/listinfo/jboss-development
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development