You pass it in as a property when you create the ColdSpring Bean Factory.
How are you creating the factory? If you pass in the DSN, passing in the
path would be the same.

On 7/3/07, Nicholas Vacek <[EMAIL PROTECTED]> wrote:

How do use a variable Component Path for my bean definitions?

An example bean definition:

<beans>
        <bean id="Calculators" class="Components.Calculators"
singleton="true">
        <constructor-arg
name="datasource"><value>${datasource}</value></constructor-arg>
        </bean>
</beans>

I put all my CFC files into a folder called "components", within the
webroot. Thus this file path needs to be in the class attribute of the
bean definition, in order for ColdSpring to find the cfc's.

I've figured out how to pass in a datasource to my ColdSpring
BeanFactory, so my config file can be modular/reusable/etc. But I'd like
the Component Path be a variable too, and I can't figure out how to do
it. This code causes errors with ColdSpring:

<beans>
        <bean id="Calculators" class="${componentPath}.Calculators"
singleton="true">
        <constructor-arg
name="datasource"><value>${datasource}</value></constructor-arg>
        </bean>
</beans>

Thanks in advance for any help you can give!


--
Nicholas Vacek
Vivid Image - Programmer
320-587-8974 ext. 111
[EMAIL PROTECTED]
http://www.vimm.com



Reply via email to