onSessionEnd具有不同的根路径,然后我的运行应用程序 [英] onSessionEnd has different rootpath then my running application

查看:112
本文介绍了onSessionEnd具有不同的根路径,然后我的运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的applicationScope中有一个返回自定义对象的服务。

I've got a service in my applicationScope that returns an custom object.

<cffunction name="getObject" access="public"returntype="com.my.Object">

这在我的应用程序中正常工作,但是当我从onSessionEnd
调用此函数时:
arguments.ApplicationScope.service.getObject()

this is works fine in my application but when i call this function from onSessionEnd like: arguments.ApplicationScope.service.getObject()

我得到一个错误,它找不到组件或接口。

I get an error that it cannot find the component or interface.

当我使用expandPath(/)从网站调用它时,我得到路径c:/ websites / project / htdocs

When i use a expandPath("/") when calling it from the website i get the path c:/websites/project/htdocs

我调用相同从onSessionEnd我会得到c:/ coldfusion8 / wwwroot这使得它无法找到位于c:/websites/project/htdocs/com/my/Object.cfc的组件,并抛出的错误任何人知道这个也许是我的配置的解决方案?

when i call the same from the onSessionEnd i'll get c:/coldfusion8/wwwroot this makes it unable to find the components thats located in c:/websites/project/htdocs/com/my/Object.cfc and throws the errors does anyone know a solution for this maybe my configuration?

Thx。

推荐答案

我怀疑你的com.my.Object路径的至少一部分通过Application.cfc中设置的ColdFusion映射解决?如果是这样,这些似乎不存在的时候onSessionEnd()被调用。因此,要解决这个问题,您需要在CFAdmin中创建映射。

I suspect that at least part of your com.my.Object path is resolved via a ColdFusion mapping set in Application.cfc? If so, these don't seem to exist by the time onSessionEnd() is called. So to work around this, you'll need to create the mapping in CFAdmin instead.

我已经确认这已经在CF9中部分解决,虽然Application.cfc中设置的映射仍然不可用在onApplicationEnd()。

I've confirmed this has been partially resolved in CF9, although the mappings set in Application.cfc still are not available in onApplicationEnd().

这篇关于onSessionEnd具有不同的根路径,然后我的运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆