• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • kkannaiy
  • Reporter: troy216
  • April 10, 2009
  • 0
  • Watchers: 2
  • February 12, 2013
  • April 14, 2009

Attachments

Description

When starting a multiple TC clients simultaneously with dso-java.bat, “boot-jr-path.bat” is called which utilizes a temporary file name “var~”. Because this file gets locked while in use, concurrently running scripts will error out.

I have attached a modified boot-jar-path.bat file that calls setlocal and always sets the temp filename to a %RANDOM% value. There is still a chance the random number generator could return the same value for concurrently running scripts… so the ultimate fix should use a more robust method of generating a unique filename.

Comments

Troy Anderson 2009-04-14

Please ignore the attached batch file. It is not a solution. It does not work.

Hung Huynh 2009-04-14

use both %RANDOM% and %TIME% to ensure uniqueness of temp file

:tc_set_dso_boot_jar__1_0

  • if not defined TMPFILE set TMPFILE=%TEMP%\var~
  • call :GETTEMPNAME %TC_JAVACMD% %JAVA_OPTS% -cp %TC_JAR% com.tc.object.tools.BootJarSignature >%TMPFILE% for /F %%i in (%TMPFILE%) do @set DSO_BOOT_JAR_NAME=%%i del %TMPFILE% @@ -72,6 +72,10 @@ if %ERRORLEVEL% NEQ 0 goto error goto return

+:GETTEMPNAME +set TMPFILE=%TMP%\boot-jar-path-%RANDOM%-%TIME:~6,5%.tmp +if exist “%TMPFILE%” GOTO :GETTEMPNAME + :error exit /b %ERRORLEVEL%

Kalai Kannaiyan 2009-08-12

Verified with 3.1.0-nighlty rev13396, executing the pojo samples run.bat multiple times really quick, it is working fine.