Hi devs,
We already have ApplicationStartedEvent and ApplicationReadyEvent (when DB is ready). We also need an event when the wiki is ready since in s a multiwiki environment when you create a new wiki for example, you might need to init some stuff (like initialize mandatory classes). It's also needed the first time a request comes in for a given wiki.
Thus I propose to add a WikiReadyEvent next to ApplicationStartedEvent and to send it in XWiki.updateDatabase():
...
synchronized (wikiName) {
if (!wikiList.contains(wikiName)) {
wikiList.add(wikiName);
// Make sure these classes exists
if (initClasses) {
initializeMandatoryClasses(context);
getPluginManager().virtualInit(context);
getRenderingEngine().virtualInit(context);
}
--> send WikiReadyEvent here
}
}
WDYT?
Note that I was tempted to have a WikiCreatedEvent event sent when creating a wiki but that wouldn't fill the use case of initializing the wiki on the first request to it.
Thanks
-Vincent
Am 13.04.2012 17:43 schrieb "Vincent Massol" <vincent(a)massol.net>:
>
> Hi devs,
>
> We already have ApplicationStartedEvent and ApplicationReadyEvent (when
DB is ready). We also need an event when the wiki is ready since in s a
multiwiki environment when you create a new wiki for example, you might
need to init some stuff (like initialize mandatory classes). It's also
needed the first time a request comes in for a given wiki.
>
> Thus I propose to add a WikiReadyEvent next to ApplicationStartedEvent
and to send it in XWiki.updateDatabase():
>
> ...
> synchronized (wikiName) {
> if (!wikiList.contains(wikiName)) {
> wikiList.add(wikiName);
>
> // Make sure these classes exists
> if (initClasses) {
> initializeMandatoryClasses(context);
> getPluginManager().virtualInit(context);
> getRenderingEngine().virtualInit(context);
> }
>
> --> send WikiReadyEvent here
>
> }
> }
>
Is it a good practise to call event listeners in the synchronized block?
(see Brian Götz, Java Concurrence in Practise, never call alien code from a
synchronized block)
My 2cents
Richard
> WDYT?
>
> Note that I was tempted to have a WikiCreatedEvent event sent when
creating a wiki but that wouldn't fill the use case of initializing the
wiki on the first request to it.
>
> Thanks
> -Vincent
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
Hi devs,
Now that we have support for Hidden documents, I'd like to propose a general rule where to put XAR pages in platform modules.
The rule I'm proposing is:
* Each top level module in xwiki-platform-core/ that has a UI submodule should put its pages in a single space, generally named after the module but with a pretty name
Examples:
* xwiki-platform-appwithinminutes --> AppWithinMinutes (could also have been "App Within Minutes") (currently using: "AppWithinMinutes")
* xwiki-platform-index --> Index (currently using: "Main" and "XWiki")
* xwiki-platform-ircbot --> IRC (or "IRC Bot" or "IRCBot") (currently using: "IRC")
* xwiki-platform-livetable --> Livetable (currently using: "XWiki")
* xwiki-platform-user --> User (currently using: "XWiki")
etc
What's important is the rule: one module == one dedicated space
WDYT?
Note 1: This means that we the "Main" space will not be really needed anymore but I think we should keep it as the space name for the XE application for now (or we could introduce an application for it in xwiki-platform-core). It could simply contain the current Main.WebHome.
Note 2: When we add support for nested spaces, the rule would mean but we would be be able to better organize content in nested spaces.
Thanks
-Vincent
I deployed XWiki 3.5 on tomcat 7.0 , then it always occurs a OutOfMemory
Error:permgen space.Is there any good solution to it?I have changed the
configuration of tomcat to sovle the problem tentatively . But I want to
know if there any good solution or suggestion to it ? Thanks a lot.
hello devs,
having moved Curriki to the 3.5 core, we noticed our activity stream was having empty getDisplayBody... looking more closely revealed that the objects were all of type ActivityEvent while a family of sub-classes was available in the CurrikiActivityStream: the method ActivityStreamPluginApi.wrapEvents was made private hence its subclass was ignored!
This appears to have been made at https://github.com/xwiki/xwiki-platform/commit/1837196f0f6434603c4c24a13b7c… as part of a "code cleanup". Jean-Vincent, or someone else, could you explain the rationale behind it? I am sure this was checked for "others usages" but Curriki was not considered as part of that.
Having somewhat fixed this on my side by bringing more methods to the subclass (for the display of older events), I come to realize that newer events are also not of the right type so I'll have to hunt more for "compromised subclassing"...
This is rather an API breakage to my taste.
Has there been a policy about this?
Could we set-up one?
I wonder if such a search engine exists that would have indicated that such a breakage would have been avoided.
paul
Hi devs,
I'm implementing the LinkChecker UI and I want to be able to add a Tab in AllDocs. Right now I've coded it with a hardcoded #if but I really hate this.
So here's my proposal:
* Create the following modules:
xwiki-platform-uiextension/
|_ xwiki-platform-uiextension-ui/
|_ xwiki-platform-uiextension-api/
where:
* xwiki-platform-uiextension-ui/: contains XWiki.UIExtensionClass page
* xwiki-platform-uiextension-api/: contains a ScriptService to get UIExtension data + contains an EventListener that refreshes the UI Extension Cache when an UIExtensionClass object is modified (this is for performance reasons)
To start with I'm proposing to have the following fields for UIExtensionClass:
* type: String, represents the type of the extension (for example for the AllDocs needs, I'll use a "IndexTab" type (or "AllDocsTab" type)
* id: String, the technical name of the extension, which can be used for example as suffix for HTML class or ids.
* name: String, the name of the extension, which can be used for displaying. For example for the AllDocs needs, it would be used as the name of the Tab
* content: Textarea: the content of the extension. For example for the AllDocs needs, it would be used as the content to display when clicking on a tab
I'd like to implement this ASAP and thus stop hardcoding UI Extensions from now on.
Here's my +1
Thanks
-Vincent
PS: If you find a better than "uiextension" I'm all ears. A name without "extension" would be great to not confuse it with our Extensions (and with xwiki-platform-extension).
fyi…
-Vincent
Begin forwarded message:
> From: Robert Muir <rmuir(a)apache.org>
> Subject: [ANNOUNCE] Apache Solr 3.6 released
> Date: April 12, 2012 10:33:00 PM GMT+02:00
> To: dev(a)lucene.apache.org, solr-user(a)lucene.apache.org, Lucene mailing list <general(a)lucene.apache.org>, announce <announce(a)apache.org>
>
> 12 April 2012, Apache Solrâ„¢ 3.6.0 available
> The Lucene PMC is pleased to announce the release of Apache Solr 3.6.0.
>
> Solr is the popular, blazing fast open source enterprise search platform from
> the Apache Lucene project. Its major features include powerful full-text
> search, hit highlighting, faceted search, dynamic clustering, database
> integration, rich document (e.g., Word, PDF) handling, and geospatial search.
> Solr is highly scalable, providing distributed search and index replication,
> and it powers the search and navigation features of many of the world's
> largest internet sites.
>
> This release contains numerous bug fixes, optimizations, and
> improvements, some of which are highlighted below. The release
> is available for immediate download at:
> http://lucene.apache.org/solr/mirrors-solr-latest-redir.html (see
> note below).
>
> See the CHANGES.txt file included with the release for a full list of
> details.
>
> Solr 3.6.0 Release Highlights:
>
> * New SolrJ client connector using Apache Http Components http client
> (SOLR-2020)
>
> * Many analyzer factories are now "multi term query aware" allowing for things
> like field type aware lowercasing when building prefix & wildcard queries.
> (SOLR-2438)
>
> * New Kuromoji morphological analyzer tokenizes Japanese text, producing
> both compound words and their segmentation. (SOLR-3056)
>
> * Range Faceting (Dates & Numbers) is now supported in distributed search
> (SOLR-1709)
>
> * HTMLStripCharFilter has been completely re-implemented, fixing many bugs
> and greatly improving the performance (LUCENE-3690)
>
> * StreamingUpdateSolrServer now supports the javabin format (SOLR-1565)
>
> * New LFU Cache option for use in Solr's internal caches. (SOLR-2906)
>
> * Memory performance improvements to all FST based suggesters (SOLR-2888)
>
> * New WFSTLookupFactory suggester supports finer-grained ranking for
> suggestions. (LUCENE-3714)
>
> * New options for configuring the amount of concurrency used in distributed
> searches (SOLR-3221)
>
> * Many bug fixes
>
> Note: The Apache Software Foundation uses an extensive mirroring network for
> distributing releases. It is possible that the mirror you are using may not
> have replicated the release yet. If that is the case, please try another
> mirror. This also goes for Maven access.
>
> Happy searching,
>
> Lucene/Solr developers
Hi,
When talking with JV about the first 5 minutes experience, we thought about
adding some user roles inside XE.
>From the start the user could select his appropriate role inside the wiki
and we could customize his environment according to that role.
We talked about:
- display a "Get started" wizard the first time a user logs in:
Already proposed at:
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/XWiki5MinutesPropo…
- when the user starts/finishes the wizard, he's asked to choose a
role/flavor: (normal, advanced), (user, developer, administrator), etc.
- choosing a role configures the wiki with some predefined values for the
profile preferences;
- a user can later fine tune his preferences.
You can see the proposal at
http://incubator.myxwiki.org/xwiki/bin/view/Improvements/UserRoles
Waiting for your feedback.
Thanks,
Caty
Hi devs,
I'd like to propose a Deprecation Day on the 26th of April 2012.
The idea is that during this day all committers who would like to participate focus on moving deprecated APIs to legacy modules.
At the end of the day we'll count how many deprecated API we've moved (each committer should keep tab of how many APIs he moves to make that count easy).
Then we'll blog about it on xwiki.org
WDYT?
Thanks
-Vincent
Hi there,
I was testing out the XWiki Enterprise 3.5 release and I noticed that
the temporary files folder under my Tomcat 7 kept growing while I was
testing out XWiki.
I had added a number of jpg attachments to a page that was using the
{{photoalbum}} macro to display them.
However, I found that this causes a number of download requests with the
width parameter set, which seems to cause a new temporary file to be
created for each request. It seems that even though the original image
is cached it re-creates a new XWikiAttachmentContent thumbnail from
those original bytes each time, causing multiple DiskFileItems to be
created.
Looking through the code for XWikiAttachmentContent it does set the
deleteOnExit() for the DiskFileItem's store location file, but this file
then will only be deleted when the JVM is shutdown.
If multiple pages have many images each and they are being displayed in
the photoalbum macro, then this creates a problem with diskspace being
used up until the server is restarted.
(And in my case for some reason stopping Tomcat via the service icon
terminates the JVM in a way that doesn't cause the deleteOnExit() to be
called as all of the temporary files are left behind after Tomcat is
stopped)
How can we stop all these temporary files from becoming a problem with a
long running web application?
There may be a better way, but I tried hacking around with the 3.5
platform on my github account and created a component to fix the problem
by deleting files that had their DiskFileItem no longer being referenced:
Modified 3.5 platform (mainly XWikiAttachmentContent)
https://github.com/jamiemaher/xwiki-platform/tree/feature-tempfiles-3.5
Temporary Files provider component referenced by the XWikiAttachmentContent:
https://github.com/jamiemaher/xwiki-tempfiles-component
It seems to work pretty well, although there seem to be some files that
don't seem to be reclaimed, although I haven't tracked down if it's
because they are also in the regular xwiki cache as well.
Thanks,
Jamie