--Kurt
> --
> You received this message because you are subscribed to Mach-II for CFML list.
> To post to this group, send email to mach-ii-for...@googlegroups.com
> To unsubscribe from this group, send email to mach-ii-for-coldf...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
>
> ***New URLs as of April 29th, 2010***
> SVN: http://svn.mach-ii.com/machii/
> Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/
>
<bean id="adminANPService_remote"
class="coldspring.aop.framework.RemoteFactoryBean">
<property name="target"><ref bean="adminANPService"/></property>
<property name="serviceName"><value>adminANPServiceRemote</value></property>
<property
name="relativePath"><value>${remotingRelativePath}</value></property>
<property
name="remoteMethodNames"><value>doesAdminNameExist</value></property>
</bean>
In this case, I also have a bean "adminANPService" in which is the
target bean for the remote facade. The value of ${remotingRelativePath}
is "/remoting" which ultimately resolves to
example.com/remoting/adminANPServiceRemote.cfc (the name of the
generated CFC is indicated in the "serviceName" property).
There's an option parameter in the CSProperty that you can add:
<parameter name="generateRemoteProxies" value="true"/>
This will look for any RemoteFactoryBean defined in your CS
configuration file and regenerate them when you reload your
application. Right now CS won't regenerate the remote proxy if the file
exists on disk. The other way of doing it is deleting the CFCs from the
remoting directory but this way is definitely easier.
Personally, I'm moving to using REST endpoints for all my AJAX proxying
in Mach-II. While the remote factory stuff in ColdSpring is good, it
doesn't offer many extension points unless you get into AOP and usually
the AOP only applies to AJAX calls. It ends up being a lot of
configuration.
REST is easier to manage for us...
<cffunction name="temp" access="public" returntype="string" output="false"
hint="Temp testing method. To be removed"
rest:uri="/temp"
rest:method="PUT">
<cfreturn "temp" />
</cffunction>
The JS (in Prototype):
new Ajax.Request("/index.cfm/dashboard.api/memory", {
method: 'DELETE'
, onCreate: function() {
currentObject.stopMemoryInformation();
currentObject.startGarbageCollectionTimer();
$('gcRun').fade({ duration: 0.5, queue: 'end' });
$('gcInProgress').appear({ duration: 0.5, queue: 'end' });
}
, onSuccess: function(transport) {
currentObject.startMemoryInformation();
currentObject.stopGarbageCollectionTimer(transport.getHeader("recoveredMemory"));
$('gcInProgress').fade({ duration: 0.5, queue: 'end' });
$('gcRun').appear({ duration: 0.5, queue: 'end' });
}
, on403:
myGlobalHandler.loginRedirect.bindAsEventListener(currentObject)
});
jlcox said the following on 10/11/2010 08:08 AM: