Hi,

I have an application using Model-Glue 'Gesture' 3.2 RC1 (3.2.439). I 
decided to explore Coldspring's RemoteProxy feature and created a proxy for 
PageService, one of my services.

ColdSpring.xml:

    <!-- REMOTE SERVICES -->
    <bean id="remotePageService" 
class="coldspring.aop.framework.RemoteFactoryBean" lazy-init="false">
        <property name="target">
            <ref bean="pageService" />
        </property>
        <property name="serviceName">
            <value>remotePageService</value>
        </property>
        <property name="relativePath">
            <value>/ws</value>
        </property>
        <property name="remoteMethodNames">
            <value>list</value>
        </property>
        <property name="beanFactoryName">
            <value>factory</value>
        </property>
    </bean>

That's all I did. Reloading the MG applicatin created the remote bean in 
/ws/remotePageService.cfc. I called it using JQuery from my html page 
(pseudocode):

$.ajax({
url: '/ws/remotePageService.cfc?method=list',
data: {....}
....
})

I got the error "Sorry, a ColdSpring BeanFactory named factory was not 
found in application scope. Please make sure your bean factory is properly 
loaded. Perhapse your main application is not running?"

After googling for answers I understood this is because the remote request 
(/ws/remotePageService.cfc) is not running in the same context as the MG 
application so there is no Application scope named 'factory' with 
Coldspring AbstractBeanFactory as it's value.

I read some stuff aboput manually creating Coldspring and assigning te key 
to Application in index.cfm but can't figure out how since the article that 
describes this (Sharing MG ColdSpring Beans With Other Applications) 
doesn't exist anymore.
 
How can I make the Coldspring bean factory accessible from _both_ remote 
requests and request that go through the MG front-end controller?

Thanks,

Marc

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to