Thanks for the reply Oliver.  I was also wondering is it possible to create
directories with this package?  IE using my below example if I needed to
create /4 for a total of /storage/content/4 (4 being a directory)?

Thanks,
David

> -----Original Message-----
> From: Oliver Zeigermann [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 3:23 AM
> To: Jakarta Commons Users List; [EMAIL PROTECTED]
> Subject: Re: Transaction - FileResourceManager
> 
> On Mon, 3 Jan 2005 12:55:13 -0700, David Erickson <[EMAIL PROTECTED]>
> wrote:
> > Couple Questions regarding the new Transaction package, specifically the
> > FileResourceManager.
> >
> > It was a bit vague in the FRM docs, but it talked about threaded access
> to
> > the FRM object, and left me still wondering.  I will be using this in a
> web
> > application, and it will have multiple threads needing access to the FRM
> > object, however each thread will only ever access 1 transaction at a
> time,
> > and that transaction will be created/destroyed by that thread.  Is that
> ok?
> 
> Yes.
> 
> > I'm also wondering, for example I have a method on my service object:
> >
> > InputStream getFile(Long courseId, String fileName) throws
> > DataAccessException;
> >
> > This method is already wrapped using AOP from Spring with a transaction
> > manager for RBDMS access, I would like to integrate FRM into an Aspect
> as
> > well.  However I'm wondering since its returning an InputStream what
> happens
> > if the transaction closes before the InputStream is read?  Would I need
> to
> > move from returning a stream to returning a byte[] or something that has
> > been fully read from the filesystem?  Is there a best approach I should
> use
> > for this type of situation?
> 
> If the stream comes from the FRM and it has been opened inside a
> transaction it will be closed by the FRM upon commit/rollback.
> 
> > Also I noticed when you instantiate a FRM you give it a base path for
> the
> > files to be stored at.  Is it legal when specifying resources to
> read/write,
> > to specify a directory then the file?  IE basepath /storage/content then
> > when I specify a read resource specify it as /5/something.wav for a
> total
> > path of /storage/content/5/something.wav?
> 
> This should work.
> 
> Oliver
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.296 / Virus Database: 265.6.7 - Release Date: 12/30/2004
> 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.7 - Release Date: 12/30/2004
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to