I really do not agree with this being the default behavior. I generally would expect all tmp files used by JBoss to be placed into the server's tmp directory instead of littering the global system tmp directory. If I wanted to change where tmp files are written then I would set the jboss.server.tmp.dir property.

It seems that the only reason why one would want to not set the overrideJavaTmpDir property would be if they wanted to have two tmp file directories... which seems to be a bit of an administrative mess, not to mention that it complicates the configuration.

Before you stated that an embedded JBoss might want to use a different tmp directory or use the system default. This change seems to cater to that case, which I expect is not going to be the typical usage. It would make more sense IMO to let the embedded case set jboss.server.tmp.dir to the appropriate location... or have a boolean property to force the entire system to use the system default.

So with this change, the default behavior will be for the server to have two tmp directories... is that what we really want?

--jason


On Friday, July 4, 2003, at 06:19 PM, Scott M Stark wrote:


  User: starksm
  Date: 03/07/04 04:19:22

Modified: src/main/org/jboss/system/server Tag: Branch_3_2
ServerImpl.java
Log:
Only override the jboss.io.tmpdir if a jboss.server.temp.dir.overrideJavaTmpDir
system property is specified as true, an if true, set jboss.io.tmpdir to the
directory spepcified by the jboss.server.temp.dir system property value.


  Revision  Changes    Path
  No                   revision


No revision



1.25.2.14 +9 -4 jboss-system/src/main/org/jboss/system/server/ServerImpl.java


Index: ServerImpl.java
===================================================================
RCS file: /cvsroot/jboss/jboss-system/src/main/org/jboss/system/server/ ServerImpl.java,v
retrieving revision 1.25.2.13
retrieving revision 1.25.2.14
diff -u -r1.25.2.13 -r1.25.2.14
--- ServerImpl.java 3 Jul 2003 14:37:45 -0000 1.25.2.13
+++ ServerImpl.java 4 Jul 2003 11:19:22 -0000 1.25.2.14
@@ -52,7 +52,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a>
* @author [EMAIL PROTECTED]
- * @version $Revision: 1.25.2.13 $
+ * @version $Revision: 1.25.2.14 $
*/
public class ServerImpl extends NotificationBroadcasterSupport
implements Server, ServerImplMBean
@@ -129,10 +129,15 @@
{
// Create a new config object from the give properties
this.config = new ServerConfigImpl(props);
-
+
// Set the VM temp directory to the server tmp dir
- System.setProperty("java.io.tmpdir", config.getServerTempDir().getCanonicalPath());
-
+ boolean overrideTmpDir = Boolean.getBoolean("jboss.server.temp.dir.overrideJavaTmpDir");
+ if( overrideTmpDir )
+ {
+ File serverTmpDir = config.getServerTempDir();
+ System.setProperty("java.io.tmpdir", serverTmpDir.getCanonicalPath());
+ }
+
// masqurade as Server.class (cause Impl is not really important)
log = Logger.getLogger(Server.class);







-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/ 01
_______________________________________________
jboss-cvs-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits





------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to