Ummm, that's just a default value for the file. It gets replaced by
whatever value the user wants in to use in the config file. I could throw
an exception instead of having a default value if you want.
David
> -----Original Message-----
> From: marc fleury [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 5:17 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-dev] CVS update:
> jbossmq/src/main/org/jboss/mq/server StateManager.java
>
>
> | 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
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development