db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurag Shekhar <Anurag.Shek...@Sun.COM>
Subject Re: Using StorageFactory to create temporary files
Date Thu, 03 Aug 2006 15:53:41 GMT
Daniel John Debrunner wrote:
> Anurag shekhar wrote:
>   
>> Let me explain why I need a temporary file. I need a storage where
>> blob/clob can be stored before writing into the table. As the size of
>> lob can go upto 2gb its not possible to keep it in memory. I am using
>> the temporary file to keep the byte/string in case the the size grows
>> more than 4k.
>>
>> So the temporary file will be created and accessed from the jdbc driver.
>> I decided to use StorageFactory because it already have the nessasary
>> permission for disk i/o. In case derby is running on a special storage,
>> the StorageFactory will be aware of it and will be able to create
>> temporary file for that device.
>>     
>
> But there is no mechansim on the client to define one is running on "a
> special storage", are you going to define one?
>   
I am not using storage factory in client driver. I am using it in set 
methods of lob classes in EmbeddedDriver's Blob/Clob classes.
> In this case it seems using the simple java.io.File.createTempFile()
> will solve all of your issues. What benefit do you get from using
> StorageFactory and its *current* set of implementations?
>
>   
Yes java.io.File.createTempFile() will work. But is it ok to grant file 
i/o access to a jdbc driver class ?


thanks
anurag

Mime
View raw message