|
From: Ted H. <thu...@ro...> - 2004-07-15 17:59:46
|
We have been using the Java Service Wrapper successfully for the past year with JBoss 3.2.1. It has worked flawlessly. However we just added a new application feature using the Java Runtime class to spawn a VB script in the operating system environment (Windows Script Host environment or 'cscript'). The VB script starts an instance of Excel, inserts some values, does some processing, then emails the spreadsheet. Excel is instructed to exit at the final line of the VB script. The VB script works fine in standalone mode. It also works correctly when JBoss is run without the Java Service Wrapper. However, when JBoss is wrapped, Excel never exits. Repeated executions cause multiple, zombie versions of Excel to hang around, consuming memory & resources. It is not always possible to kill these zombies Excel's from the Windows Task Manager. A reboot is often required. (This is Windows 2000 Server). It seems that the Java Service Wrapper interferes with one or more of the following: 1) the java Runtime class 2) the Windows Script Host Environment (cscript) or 3) Excel Recommendations or suggested gladly welcome! Thank you. My JSP code looks like this: StringBuffer cmd; cmd.append( "cscript C:\\src\\excel.vbs fo...@ba..." ); Runtime.getRuntime( exec( cmd.toString() ) ); My VB script (excel.vbs) looks like this: Set objExcel = CreateObject( "Excel.Application" ) objExcel.DisplayAlerts = False objExcel.Visible = False Set wb = objExcel.Workbooks.Open( "C:\src\template.xls" ) . Set address = WScript.Arguments(0) wb.SendMail address, "title", False wb.Close False objExcel.Quit WScript.Quit I am using wrapper_win32_3.0.5 -- Ted Hudacko thu...@ro... |