I figured that might be the issue. Let me give that a try and I will post back with the results.

On Dec 30, 2006, at 9:26 AM, Kurt Wiersma wrote:

In your Mach II listener you should not have an init method.
configure() is the method you should use to set a listener. In this
case you just need a setter method for the reactor factory instead of
making it an argument to configure() so that ColdSpring will
automatically inject the reactor factory into the listener.

<cfcomponent name="ServiceListener" extends="MachII.framework.Listener">

      <cffunction name="configure" access="public" returntype="void"
hint="Configures this listener">

      </cffunction>

      <cffunction name="setReactorFactory" access="public"
returntype="void" hint="Inits this listener">
              <cfargument name="Reactor" required="true"
type="reactor.reactorFactory" />
              <cfscript>
                      variables.Reactor = arguments.Reactor;
              </cfscript>
      </cffunction>

      <cffunction name="getAll" access="remote" returntype="query">
<cfreturn variables.Reactor.createGateway ('Service').getAll() />
      </cffunction>
</cfcomponent>

--Kurt

On 12/29/06, Kyle Hayes <[EMAIL PROTECTED]> wrote:
I am using AutoWiring with the Mach-II plugin. I had the constructor-arg in their before just as you have it and it still isn't working. I will repost with that change to make it clear even for people not familiar with Mach-ii.

My services.xml:

<?xml version="1.0" encoding="UTF-8"?>

<beans>
 <bean id="reactor" class="reactor.reactorFactory">
 <constructor-arg name="configuration">
 <value>/config/reactor.xml</value>
 </constructor-arg>
 </bean>

 <bean id="serviceListener" class="model.ServiceListener">
 <constructor-arg name="reactor">
 <ref bean="reactor" />
 </constructor-arg>
 </bean>

 <bean id="udf" class="model.UDF" singleton="true" />

</beans>

I am still getting the same exact error. Even with the change noted above.


On Dec 29, 2006, at 8:41 AM, Porter, Benjamin L. wrote:



You are not passing reactor to the service listener as a constructor arg.



<bean id="reactor" class="reactor.reactorFactory">

                        <constructor-arg name="configuration">


<value>/config/reactor.xml</value>

                        </constructor-arg>

            </bean>



<bean id="serviceListener" class="model.ServiceListener" />





Should be



<bean id="reactor" class="reactor.reactorFactory">

                        <constructor-arg name="configuration">


<value>/config/reactor.xml</value>

                        </constructor-arg>

            </bean>



<bean id="serviceListener" class="model.ServiceListener">

                    <constructor-arg name="Reactor">

  <                      <ref bean="reactor" />

        </constructor-arg>

</bean>




________________________________


From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf
Of Kyle Hayes
Sent: Friday, December 29, 2006 10:10 AM
To: [email protected]
Subject: [coldspring-dev] Reactor issues




Good Morning,





I hope I am not posting something that has been posted a billion times, but here we are. I am not sure why I am having these issues as I have implement ColdSpring and Reactor in my projects together before. I am also using
Mach-ii as my OO framework.





I am getting the following error when attempting to getAll() from my
"Service" table in my database:





The argument REACTOR passed to function init() is not of type
reactor.reactorFactory


The error occurred in
D:\Websites\DigitalEyeon\mladamsins\webroot\model \ServiceListener.cfc:
line 5





ServiceListener.cfc:





<cfcomponent name="ServiceListener" extends="MachII.framework.Listener">





<cffunction name="configure" access="public" returntype="void"
hint="Configures this listener">





            </cffunction>





            <cffunction name="init" access="public" returntype="void"
hint="Inits this listener">


                        <cfargument name="Reactor" required="true"
type="reactor.reactorFactory" />


                        <cfscript>


                                    variables.Reactor =
arguments.Reactor;


                        </cfscript>


            </cffunction>





<cffunction name="getAll" access="remote" returntype="query">


                        <cfreturn
variables.Reactor.createGateway('Service').getAll() />


            </cffunction>


</cfcomponent>





Services.xml:


<?xml version="1.0" encoding="UTF-8"?>





<beans>


            <bean id="reactor" class="reactor.reactorFactory">


                        <constructor-arg name="configuration">



<value>/config/reactor.xml</value>


                        </constructor-arg>


            </bean>





<bean id="serviceListener" class="model.ServiceListener" />





            <bean id="udf" class="model.UDF" singleton="true" />





</beans>





Mach-ii ColdSpring plugin config:


<plugin name="ColdspringPlugin"
type="coldspring.machii.ColdspringPlugin">


                                    <parameters>


                                                <parameter
name="configFilePropertyName" value="servicesConfig" />


                                                <parameter
name="configFilePathIsRelative" value="true" />


                                                <parameter
name="resolveMachiiDependencies" value="true" />


                                    </parameters>


                        </plugin>








Thanks,


Kyle

********************************************************************* *******

This email may contain confidential
material. If you were not an intended recipient,
Please notify the sender and delete all copies.
We may monitor email to and from our network.

********************************************************************* ******






Reply via email to