See my answers below ----- "Vincent Massol" <[email protected]> wrote:
> On May 15, 2010, at 4:53 PM, Jerome Velociter wrote: > > > Hi Devs, > > > > I'd like to add a bridge event to allow components to get notified > when > > old core has been initialized (at the end of XWiki#initXWiki for > example). > > > > This would be useful for components that needs to access the store, > for > > example to register XWiki classes. > > > > I recognize this solution is not perfect since it's more bridged > code, but > > it would be better that what we have been doing so far (hard-coded > > component initialization in XWiki.java, for example for the wiki > macro > > bridge to register its classes) > > > > I've attached a patch proposal to > > http://jira.xwiki.org/jira/browse/XWIKI-5194. > > Note that I would also fix the wiki macro bridge initialization. > > > > +1 from me to go ahead with that. > > > > WDYT ? > > Before I can answer, some questions: > > - Why do you call it a "bridge event"? It's a bridge event because ideally the ApplicationStartedEvent should be enough, and this event means "the legacy xwiki-core has been initialized". > - How would you call the event (I haven't checked the patch yet), > knowing that we already have an app initialized event? XWikiInitializedBridgeEvent > - Do we need 2 events: app initialized + this one or is one enough? > - Why don't we initialize the store upon application start as the > first listener (we'll need an init order but we've been needing that > anyway IMO)? I don't know how much work this require, but I'd tend to think it's not a trivial refactoring (I might be wrong, though). What I propose with this bridge event is not as perfect as doing this work, but already better than what we are doing today (hard-coding initialization in XWiki.java). > > If we can have only a single app initialized event it would be better > IMO. I agree on the principle. Jerome. > > Thanks > -Vincent > > > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

