Hi folks,

yes - Wiki On A Stick (aka jspwiki-portable) runs multiple JSPWiki instances as 
“skinny” wars

Cheers,

Siegfried Goeschl

On 12 Aug 2014, at 14:16, Juan Pablo Santos Rodríguez 
<[email protected]> wrote:

> Hi Ichiro,
> 
> for reason #1, Wiki on a Stick comes to my mind as an example of a single
> JVM
> with multiple wiki instances, if I recall correctly. Also on thread [1]
> several people
> noted being using /having used different combinations of one JVM and
> several
> wikis. But yes, I agree that having the WikiEngine inside a WikiPage is a
> bit overkill
> in there (f.ex. why it does need to know about the rss generator?).
> 
> Perhaps instead of receiving the whole WikiEngine on the constructor we
> could
> switch to just the wiki name? Reason #2 could still be easily solved as
> well, WDYT?
> 
> 
> br,
> juan pablo
> 
> [1]
> http://mail-archives.apache.org/mod_mbox/jspwiki-user/201407.mbox/%3C53BE536A.40805%40holeczek.de%3E
> 
> 
> On Tue, Aug 12, 2014 at 1:26 AM, Ichiro Furusato <[email protected]>
> wrote:
> 
>> Hi,
>> 
>> I've been playing around with WikiPage objects lately and noted that
>> the constructor includes the parent WikiEngine. This has been true so
>> far as I know for the life of the project. The JSPWiki isn't particularly
>> clean in this regard so this would be (IMO) categorised as an API
>> cleanup.
>> 
>> I'd like to modify the WikiPage class so that we can create them
>> without a WikiEngine dependency. They are then more portable and
>> can be created, stored, transferred, etc. without regard to their parent
>> wiki. There isn't much of a logical reason for a WikiPage to know about
>> its wiki so this seems like a good idea.
>> 
>> Looking a bit more closely it's clear that the WikiEngine argument is
>> only used for two things:
>> 
>>  1. the application name is used to differentiate wiki pages for
>>      use in permissions.
>>  2. the WikiEngine provides a PageSorter to permit WikiPages
>>      to be sorted according to a property-configured sort algorithm.
>> 
>> Neither are compelling as a reason for this dependency, particularly
>> if there is only one JSPWiki instance running in a given JVM. Earlier
>> versions of Tomcat used to host multiple webapps/wikis in the same
>> memory space, but that's not true any longer, i.e., wikis can't interact
>> directly.
>> 
>> So I'm curious to know of anyone using multiple wikis in the same JVM.
>> I can't think of a scenario but there certainly may be some out there.
>> 
>> If that's *not* the case then reason #1 goes out the door. Reason #2
>> is a relatively simple fix, as if there is only one wiki per JVM we can set
>> the PageSorter as a static variable on WikiPage. That's effectively what's
>> happening with the WikiPage requesting the singleton PageSorter from
>> the WikiEngine so there'd be no effective difference.
>> 
>> I've already done the coding for this in a local copy of JSPWiki -- it's
>> not particularly difficult. I'd deprecate the current constructor that
>> includes
>> the WikiEngine rather than eliminate it, as it is used in a lot of places.
>> 
>> Pros? Cons? Thanks for any.
>> 
>> Ichiro
>> 

Reply via email to