cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: svn commit: r580786 - in /cocoon/whiteboard/osgi/core/cocoon-spring-osgi/cocoon-spring-osgi-impl/src/main: java/org/apache/cocoon/springosgi/config/ java/org/apache/cocoon/springosgi/service/exporter/ resources/org/apache/cocoon/springosgi/config/
Date Sun, 30 Sep 2007 22:46:41 GMT
On 30.09.2007 17:02 Uhr, wrote:

> Author: danielf
> Date: Sun Sep 30 14:02:24 2007
> New Revision: 580786
> URL:
> Log: Spring-OSGi doesn't contain any support for beans with prototype
> scope. This is  mainly because there is no direct mapping between the
> prototype scope and any OSGi concepts. In OSGi services are either
> singletons at global level or at bundle level. The only reasonable
> mapping, AFAICS, is to export a factory bean as an OSGi service.
> As Cocoon uses prototypes in many places I have extended Spring-OSGi
> with support for exporting a factory bean instead of the bean by
> setting the attribute "factory-export" to true. In this case a
> SmartFactoryBean is exported and the classes of the contained bean is
> put in the "org.springframework.osgi.beanclasses" property.
> The import part is not written yet.
> The code contains a lot of copy and modify from Spring-OSGi as some
> of the involved classes wasn't really extendible. The idea is to try
> to contribute it back to Spring-OSGi.

I don't know if it applies here at all, but in standard Spring to get
access to the factory bean instead of the bean itself you prefix the
bean name with an ampersand. Is it reasonable to go with that approach 
here as well compared to your new attribute "factory-export"?


View raw message