M
Matthias Kranz
Hi,
I'm writing an webapp in which users can create something like a diary. They
can use it alone or together with some other users. When the start creating
the diary my webapp creates an XML-file for every diary. It is only allowed
to add data, not to change or delete.
To add the users data to the XML-files I use some servlets, corresponding to
the context/JSP from where the user adds his data. All these servlets use
the same class to write the data into the XML-file.
I'm not sure how to implement the synchronisation. Should I use a Singleton
pattern or the SingleThreadModel? And if I have implemented this my webapp
is safe?
Can someone please give me some hints?
Thanks in advance!
Greets Matze
I'm writing an webapp in which users can create something like a diary. They
can use it alone or together with some other users. When the start creating
the diary my webapp creates an XML-file for every diary. It is only allowed
to add data, not to change or delete.
To add the users data to the XML-files I use some servlets, corresponding to
the context/JSP from where the user adds his data. All these servlets use
the same class to write the data into the XML-file.
I'm not sure how to implement the synchronisation. Should I use a Singleton
pattern or the SingleThreadModel? And if I have implemented this my webapp
is safe?
Can someone please give me some hints?
Thanks in advance!
Greets Matze