--Kurt
On 3/23/06, Matthew Lesko <[EMAIL PROTECTED]> wrote:
Kurt,
In response to your question, this answer is very SQL Server specific
and off-topic, but here goes: I created a mixin and included it in a
database-specific stub that Reactor creates (in this case for mssql -
i.e. MyGatewaymssql.cfc) in order to use the SQL Server utility "bcp" to
move text files into the table that Gateway wraps. I decided to go this
route because "bcp" needs much of the same information that gets passed
to the gateway object when instantiated - name of the database, name of
the table, username, password, etc - so I thought it would be a good
marriage. The property method I am trying to set on this object then, is
the physical location of "bcp.exe" on the file system, which is then
used as part of a cfexecute command.
Hope that makes sense.
Regards,
Matthew Lesko
Kurt Wiersma wrote:
> ColdSpring works a little differently when factory-bean is used.
> ColdSpring calls the factory to get an instance of MyGateway. To do
> this it uses the constructor-arg you defined. You cannot also define
> properties since the ReactorGateway is actually responsible for
> creating the object and returning to ColdSpring which then can inject
> that created object into another object. Currently I don't believe we
> support also passing in properties since we get that object from the
> external factory.
>
> Can I ask in what situation you would find this useful? What you
> trying to inject in your Reactor created gateway?
>
> --Kurt
>
> On 3/22/06, *Matthew Lesko * < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> All,
>
> I am using Coldspring to instantiate reactor beans via the
> "factory-method/factory-bean" attributes, but am running into problem
> when trying to specify a "property" child node.
>
> So here is the ReactorFactory bean:
>
> <bean id="reactorFactory" class="reactor.reactorFactory">
> <constructor-arg name="configuration">
> <value>reactorConfigFile.xml </value>
> </constructor-arg>
> </bean>
>
> Then here is an example of a bean I create using Reactor as the
> factory:
>
> <bean id="MyGateway" factory-bean="reactorFactory"
> factory-method="createGateway">
> <constructor-arg name="objectAlias">
> <value>DBObjectName</value>
> </constructor-arg>
> <property name="myProperty">
> <value>myValue</value>
> </property>
> </bean>
>
> When I use the getMyProperty method of this object it doesn't return
> "myValue" as I would expect.
>
> Is this a bug? Or if not, can anyone suggest a solution for how to
> set
> properties of factory generated beans?
>
> Regards,
>
> Matthew Lesko
>
>
