Damjan S. Vujnovic wrote:
Emmanouil Batsis wrote:

This reminds me of Hibernate proxies but other than that i have no clue of what is going on. Anyone with a better idea?


Well, we pinned down the problem - the selector.select(publication.getSiteManagerHint()) actually returns java.lang.reflect.Proxy (dynamic proxy), so it can safely be casted to org.apache.lenya.cms.site.tree.SiteManager any of the INTERFACES that org.apache.lenya.cms.site.tree.TreeSiteManager implements (java.util.Comparator, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable). Of course casting to SiteManager doesn't help because getTree() method is not a method of the SiteManager interface (but of a TreeSiteManager) - so a solution is to make the TreeSiteManagerClass class implement TreeSiteManagerInterface interface.

I noticed (working on the custom lenya AC implementation) that the "programming against interfaces" is not applied consistently.

That's true, mainly due to legacy code from Lenya 1.2.
The API is currently being re-designed, feel free to observe and
comment the development.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to