Ok it turns out that the problem has to do with my gateway an dao objects extending a base component. The init method is inherited from the base component and not overwritten in my data objects and when I moved it into the gateway and dao, coldspring was able to pass in the required arguments (xmlpath).

Is this behaviour expected?

Here is my constructor used by the dao and gateway:
    <cffunction name="init" access="public" returntype="any" output="false" hint="I inititalise the component">
        <cfargument name="xmlpath" type="string" required="true" />       
        <cfset variables.xmlPath = expandPath(arguments.xmlPath) />
        <cfset variables.lockname = "LOCK_" & hash(arguments.xmlPath) />
        <cfset variables.xmlDoc = load() />
        <cfset variables.lastReloadHash = getXmlFileReloadHash() />
        <cfreturn this />
    </cffunction>

Thanks

On 3/5/06, P L <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to get the coldspring plugin to work in mach-ii but im having some trouble. I am able to get a service object from the bean factory in my listener's configure method but it doesn't seem like my DAO and Gateway objects have been injected into the service. Perhaps I am not calling it correctly so ill post my code to see if anyone can point out my problem.

Here is my xml config:
<?xml version="1.0" encoding="UTF-8"?>
<beans>
    <bean id="commentDAO" class="model.comment.commentDAO">
        <constructor-arg name="xmlpath">
            <value>/environment/thesandcasters/lounge.xml</value>
        </constructor-arg>
    </bean>
    <bean id="commentGateway" class="model.comment.commentGateway">
        <constructor-arg name="xmlpath">
            <value>/environment/thesandcasters/lounge.xml</value>
        </constructor-arg>
    </bean>  
    <bean id="loungeService" class="model.comment.loungeService">
        <constructor-arg name="commentDAO">
            <ref bean="commentDAO"/>
        </constructor-arg>   
        <constructor-arg name="commentGateway">
            <ref bean="commentGateway"/>
        </constructor-arg>        
    </bean>
</beans>

Here is my listener configure code:
<cfset variables.loungeService = getProperty("serviceFactory").getBean("loungeService") />

I am recieving the following coldspring exception:
coldspring.beanDefException - in C:\websites\extensions\components\coldspring\beans\BeanDefinition.cfc : line 128

Thanks in adavnce.


Reply via email to