Hello Brian

Ages ago, we wrote an application - using Visual Basic
would you believe - that created, updated and
generally messed around with .doc files. The only
practical way we could find to overcome the same type
of problem was to write our own application to control
access to the file(s).

Put simply, when a user accessed a file, a record was
written into a log. If anyone else tried to access the
file, the first thing we did was to consult the log.
If the file had not been checked out, they were
allowed access to it, but if the file had been checked
out they were simply prevented from loading that file.
Then, as soon as a person finished with a file, it
would be rendered accessible again by being checked in
so to speak - removed from the log.

It worked but did impose some overhead and of course
that overhead became more of a problem as the volumne
of files grew and more and more users gained access to
the system.

Do not know if that helps? It may be possible to
implement something similar using a shared object that
maintains an internal ArrayList of file names and has
synchronised methods to check and update that
ArrayList.

Yours

Mark B



--- Brian Bonner <[EMAIL PROTECTED]> wrote:

> It seems like I need to synchronize access to the
> tags that perform 
> these updates.  Here's my rationale.  My tags read
> the workbook to 
> figure out the row count and perform an insert on a
> cell of a specific 
> row and then save it back to the file.  If two
> requests come into this 
> JSP at the same time, they'll both have the same
> initial picture of the 
> file (assuming it will even be read and won't throw
> a lock or 
> FileNotFoundException) and when they update, the
> last update will win.
> 
> But still this synchronization solution doesn't seem
> to help at the file 
> level.  Additional thoughts?
> 
> Brian
> 
> 
> 
> Brian Bonner wrote:
> 
> > Hi Guys,
> >
> > I had a request from someone to allow them to
> write forms directly to 
> > an Excel spreadsheet. This user is not a
> developer, but does do web 
> > design and is fairly fluent with HTML, xHTML. 
> Anyway.
> >
> > I have written a tag library to allow read/write
> access to/from Excel 
> > spreadsheets using POI.  It works well, and I know
> that POI is not 
> > threadsafe.
> >
> > I could synchronize access to calls made by the
> tags to POI.  But I'm 
> > also concerned about a user opening up the file
> and locking up the app.
> >
> > Any suggestions?
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> Mailing List:    
> http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: 
> http://jakarta.apache.org/poi/
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to