9 Replies Latest reply on Sep 9, 2004 6:18 PM by Viet

    Wiki module?

    Ron Lawrence Newbie

      Forgive me if this has been asked in the past. I did a search on "wiki module" on this forum and got so many matches without "wiki" in the title, that I suspect I drove the search tool wrong.

      In any case, is there a way to get access to the wiki module that this site uses? I have a site I'd like to support a wiki on, and the thought of implementing yet another wiki seems like a waste of time.

        • 1. Re: getters/setter vs. field interception
          Viet Master

          > I have the following use case. I have a cache
          > (subclass of java.util.Map) into which I put keys and
          > values (which all have to be serializable). Let's
          > take an example:
          >
          > Cache c;
          > c.put("name", "Bela Ban");
          >
          > Whenever I put a new entry, it will be replicated to
          > all cache instances. Caches can be in different
          > processes, on different machines etc.
          >
          > Now consider a class Person with attrs name and age
          > that I put into the cache:
          >
          > Person p=new Person("Bela Ban, 37);
          > cache.put("bela", p);
          >
          > Now the entry will be replicated to all instances of
          > the replicated cache. But when someone does
          >
          > p.setAge(p.getAge()++);
          >
          > the new value of p's age will not be replicated
          > unless we put the item back into the cache:
          >
          > c.put("bela", p);
          >
          > See my problem ? If people forget to invoke the put()
          > method, the values in the caches are going to become
          > inconsistent.
          >

          Don't understand what would be the difference between intercepting methods and interception fields here.

          Just do this.

          public class CacheInterceptor
          {
          ...
          public Object invoke(Invocation invocation) ...
          {
          Method method = invocation.getMethod();
          Object rtn = invocation.invokeNext();
          if (method.getName().startsWith("set"))
          {
          cache.put("bela", targetObject);
          }
          }
          }


          > Now one could argue that this it is the programmer's
          > fault, but it would be nice to take care of these
          > things automatically.
          >
          > Another nice aspect would be that we would know
          > exactly which field have changed, and therefore only
          > replicated the field which actually changed, *not*
          > the entire object. We currently replicate the entire
          > object in HTTPSession replication and in clustering
          > (stateful session beans).
          >

          I think this could be done as long as the app developer follows the getter/setter semantic.

          Bill

          • 2. Re: Wiki module?
            Aaron Tang Newbie

            Nukes integrates with JSPWiki, you can search "wiki" in the nukes user forum

            • 3. Re: Wiki module?
              jae Master

              this site uses a modified version of jspwiki.

              here are two links on the topic

              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=50376
              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=47376

              there have been other discussions about buiilding a native wiki module, but no one has taken up the task. this wiki does have some issues (ie: it doesn't always properly save a page), so "buyer beware" :)

              hrm... since i want to setup a wiki myself, maybe i should look into a native nukes module.

              • 4. Re: Wiki module?
                Ron Lawrence Newbie

                Thanks for the pointers, I'll give this a try. As to a native module, xwiki (http://www.xwiki.org/) has some JSR-168 portlet support, so maybe in nukes 2, it will just plug right in :)

                • 5. Re: Wiki module?
                  jae Master

                  i'll take a look at xwiki and see what the possibilities are.

                  julien: didn't you say that bill wrote a parser for wiki html tags, where can i find that?

                  • 6. Re: Wiki module?
                    Viet Master

                    +1 for a real wiki module

                    • 7. Re: Wiki module?
                      jae Master

                      where is that wiki parser so i can look into it - i should be able to hook into the existing html module as a base for the version history.

                      • 8. Re: Wiki module?
                        Viet Master

                        There is no written parser yet.

                        Actually the wiki parser must be integrated through the parser stack framework sitting in the common module.

                        Then the HTML module must be capable to interpret some files with a specialized content type "text/wiki" and render it. That would be an internal content type and the real content type is "text/html".

                        The interest of the parser stack integration is the unified use of this framework and the reuse accross different modules like news and of course the forum.

                        • 9. Re: Wiki module?
                          Joachim Van der Auwera Expert

                          There is a offline wiki module in JBoss cvs (I think Scott Stark wrote that). Alternatively, you could consider looking at radeox.

                          Joachim