Default Properties Not Being Parsed

3 views
Skip to first unread message

todd sharp

unread,
Aug 13, 2010, 11:29:39 AM8/13/10
to ColdSpring-Users
I set up my bean factory using a struct of default properties and set those properties into a simple config bean in CS.

    <bean id="EmailConfig" class="ModelGlue.Bean.CommonBeans.SimpleConfig">
        <property name="config">
            <map>
                <entry key="emailServer">
                    <value>${emailServer}</value>
                </entry>    
                <entry key="emailUName">    
                    <value>${emailUName}</value>
                </entry>
                <entry key="emailPWord">
                    <value>${emailPWord}</value>
                </entry>
            </map>
        </property>    
    </bean>


If I grab that bean from a test page via: application.factory.getBean("config").getconfigSetting('emailServer') I can see all of the proper value as expected.

Problem is, I pass that bean to another service and dump it out in the arguments scope and I'm only seeing the token placeholders (IE: ${emailServer}, etc)...  Any idea why these tokens aren't being replaced when I pass them to my service like such:

<bean id="email" class="model.emailCFC">
    <constructor-arg name="EmailConfig">
        <ref bean="EmailConfig" />
    </constructor-arg>
</bean>


--
Todd Sharp
Sharp Interactive, LLC
http://slidesix.com -- Multimedia Enabled Presentation Sharing
IM:  cfsi...@gmail.com
Blog:  http://cfsilence.com
Twitter: cfsilence | slidesix

Doug Boude

unread,
Aug 13, 2010, 11:40:44 AM8/13/10
to coldspri...@googlegroups.com
perhaps you need to set the config bean as a singleton, explicitly? singleton=true

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.

Todd Sharp

unread,
Aug 13, 2010, 11:49:02 AM8/13/10
to ColdSpring-Users
No luck on that Doug. I wonder if Model-Glue is what's causing the
issue. I'm setting my factory as the PARENT_BEAN_FACTORY, so I'm
thinking there shouldn't be an issue with MG...

On Aug 13, 11:40 am, Doug Boude <dougbo...@gmail.com> wrote:
> perhaps you need to set the config bean as a singleton, explicitly?
> singleton=true
>
> >http://slidesix.com-- Multimedia Enabled Presentation Sharing
> > IM:  cfsile...@gmail.com
> > Blog:  http://cfsilence.com
> > Twitter: cfsilence | slidesix
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "ColdSpring-Users" group.
> > To post to this group, send email to coldspri...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > coldspring-use...@googlegroups.com<coldspring-users%2Bunsu...@googlegroups.com>
> > .

Todd Sharp

unread,
Aug 13, 2010, 11:56:25 AM8/13/10
to ColdSpring-Users
Ah, I found it. Need to set a MG variable in index.cfm per this MG
trac ticket:

http://trac.model-glue.com/ticket/302

"It looks like support for the
"ModelGlue_LOCAL_COLDSPRING_DEFAULT_PROPERTIES" variable (set in
index.cfm) was added in Model-Glue 3.0.

The only thing I think really needs to be done at this point is to
document the variable; in particular we ought to have a comment for it
in /modelglueapplicationtemplate/index.cfm."

I'll try to get this documented on the MG wiki, as I'm sure I'm not
the first one who has gotten tripped up on this.
> > >http://slidesix.com--Multimedia Enabled Presentation Sharing
Reply all
Reply to author
Forward
0 new messages