poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TARAF, WALID (ATTSI)" <TW6...@att.com>
Subject XSSF POI /var/tmp protection issues
Date Fri, 04 Jun 2010 08:36:52 GMT
Hi there fellow POI'ers,

We have an issue where we have a Unix box with a few vtiers, and when a
user first creates an XLSX, it creates the file under
"/var/tmp/poifiles" with a random file name....but the issue is that the
protection for that "poifiles" is set to RW-R-R-and creates an issue for
the next user landing on another vtier on same Unix box.   XSSF then
cannot create another  temp file under that "poifiles" folder.

WE remedied the situation temporarily by running a CRON job to open up
protection on the "poifiles" to RW-RW-RW-.

Question: is there a setting for XSSF to set up my own temporary file
setting in the API?  I am not explicitly creating a new workbook for
everyone....rather same template everyone uses, and returning Workbook
handle.

try
		{			
			//everyone using the same template, so
synchronized  access and close right away
			synchronized (this)
			{
				FileInputStream inputStream = new
FileInputStream(new File(EXCEL_LOCKED_TEMPLATE)); 
				wb = new XSSFWorkbook(inputStream); 
				inputStream.close();
			}

		}
		catch (Exception ex)
		{
    		LoggerUtil.error(CLASS_NAME, "createWorkbook()",
					"Cannot create template
workbook, exception: " + ex.toString());
    		return null;
		} 

Thanks much - walid

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message