I should also mention that one of the goals behind our current (very basic)
ObjectFactory was to allow the returned objects to be either java or cfcs,
without the calling code's knowledge. Code just asks for an object by its
registered name, and if it's implemented as a cfc today and java tomorrow,
nothing changes.

I'd love to use ColdSpring instead, for its many more advanced capabilities,
but this cf/java transparency is a key longer-term strategy.

Dave Merrill


> Can anyone suggest a way to inject a cfc with a java object, like this:
>
> -----
> <bean id="datasourceService"
> class="coldfusion.server.ServiceFactory.DataSourceService" />
>
>       then
>
> <bean id="model" class="cf_tests.coldspring.model">
>       <constructor-arg name="datasourceService">
>               <ref bean="datasourceService" />
>       </constructor-arg>
> </bean>
> -----
>
> Apparently ColdSpring assumes that all objects it creates are CFCs, so it
> uses createOject('component', '...'); that's in
> beans.BeanDefinition.getBeanInstance().
>
> Is there another approach that doesn't run into this? If not, has anyone
> thought about what it would take to modify ColdSpring to make it possible?
>
> Dave Merrill
>
>
>
>



Reply via email to