Hi, gang.
Reading the base clases for our project provided by Jim, I noticed that the WikiContext class will be implemented as a singleton.
As far as I know, this is not a trivial implementation in Java( also in C++ if you consider all the multithreading stuff). The main reason is a singleton is UNIQUE PER JVM. But if you have several JVMs running on the same server, you end up having several singletons runing in the same time. That is also true for Servlets. The whole life cycle for a Servlet object(initialized once) is valid for the JVM the container is runnning. But again what if you several containers running on different JVMs?
Please let me know if there is any solution for this.
Thank you.
Radu
---
On Fri, 26 Oct 2001 12:46:14
James J Kalafut wrote:
>Here are some thoughts I had concerning really basic classes that everyone
>will use. These are just my thoughts, not the result of pair work, so they
>are just suggestions at this point.
>
>Class - Description
>
>WikiPage - Encapsulates one page, however that is represented, and will
>be passed around from the database, parser, HTML generator, etc...
>
>WikiContext - This would be a singleton which would contain common
>configuration information. Users typically call getInstance() on it, and
>then use that object to learn about the environment, policies/setting, and
>get references to other objects.
>
>WikiDB - Abstracts the database functions. One would probably call
>getLocalDB() on a WikiContext object to get a reference, and then this
>class would handle page creation/deletion/retrieval/update. I would expect
>that most of the functions would be passing WikiPage references. The guts
>of this class would then attach to a production DB, text file interface,
>etc.
>
>Those are just some ideas, and I think that the Create/Save work will use
>all of those concepts. Let me know if I'm out in right field compared to
>your perspectives of the foundation classes.
>
>Unit Testing---I've used JUnit and SUnit quite a bit with good results, but
>for servlet and other web work we'll need something to augment those test
>fixtures. On the Apache site I saw references to both HTTPUnit and
>something called 'Cactus', and I wanted to know if anyone has experience
>with those or other test setups that accommodate web development.
>
>Regards,
>Jim Kalafut
>
>
>
>_______________________________________________
>xmlWiki-developers mailing list
>xml...@li...
>https://lists.sourceforge.net/lists/listinfo/xmlwiki-developers
>
Make a difference, help support the relief efforts in the U.S.
http://clubs.lycos.com/live/events/september11.asp
|