简体   繁体   English

对于Flex远程对象调用(BlazeDS),返回的对象是否有大小限制?

[英]For Flex remote object calls (BlazeDS), is there a size limitation on objects returned?

I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. 我有一个生产型移动Flex应用程序,该应用程序使用RemoteObject调用进行所有数据访问,并且运行良好,除了我刚刚添加的新远程调用(仅在使用发布版本运行时才失败)。 The same call works fine when running on the device (iPhone) using debug build. 使用调试版本在设备(iPhone)上运行时,相同的调用工作正常。 When running with a release build, the result handler is never called (nor is the fault handler called). 使用发布版本运行时,永远不会调用结果处理程序(也不会调用错误处理程序)。 Viewing the BlazeDS logs in debug mode, the call is received and send back with data. 在调试模式下查看BlazeDS日志,将接收到呼叫并发送回数据。 I've narrowed it down to what seems to be a data size issue. 我将其范围缩小到似乎是数据大小的问题。

I have targeted one specific data call that returns in the String value a string length of 44kb, which fails (release build). 我的目标是一个特定的数据调用,该调用在String值中返回44kb的字符串长度,该字符串失败(发布版本)。 When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is called, and the object is returned, again, using the release build. 当我没有在对象上填充String值(在服务器端Java代码中)(只需将其设置为空字符串)时,将调用结果处理程序,然后再次使用release版本返回该对象。 This works in a debug build. 这适用于调试版本。

The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. 调用中返回的自定义对象是一个非常简单的对象,具有用于简单类型boolean,int,String和org.23c.dom.Document类型的getter / setter方法。 This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). 同一对象类型可用于其他其他RemoteObject调用(不同的数据),并且工作正常(发行版和调试版)。 I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization. 我最初是作为文档返回的,但是,为了确保这不是问题,更改了要返回的字符串的值,只是为了排除序列化中的XML / Dom问题。

I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build. 我不明白1)为什么对于RemoteObject调用,发布版本与调试版本的行为有所不同; 2)为什么在字符串中发送大量(但并非不合理)的数据时,调用在调试版本中起作用?对象,但不在发布版本中。

I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect. 我没有尝试确切地找出失败点的大小,但是不确定该点是否相关,因为44kb并不是一个不合理的大小。

By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. 通过在BlazeDS中打开“调试”模式,我可以看到该对象及其属性已被序列化,并且一切看起来都很好。 The calls are received and processed appropriately in BlazeDS for both debug and release build testing. 在BlazeDS中可以适当地接收和处理这些调用,以进行调试和发布构建测试。

Anyone have an idea on other things to try to debug/resolve this? 任何人有其他想法来尝试调试/解决这个问题?

Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). 平台测试是BlazeDS 4,Flashbuilder 4.7,Websphere 8服务器,iPhone(iOS 7.1.2)。 Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior. 尝试使用多个Flex SDK的4.12到最新的4.13,并且行为不变。

Thanks! 谢谢!

After a week's worth of debugging, I found the issue. 经过一周的调试,我发现了问题。

The Java type returned from the call was defined as ArrayList. 调用返回的Java类型定义为ArrayList。 Changing it to List resolved the problem. 将其更改为列表可解决此问题。

I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid. 我不确定为什么ArrayList不是有效的返回类型,我一直在查看Adobe文档,但仍然看不到为什么这是无效的。 And, why it works in Debug mode and not in Release build is even stranger. 而且,为什么它在“调试”模式下而不在“发布”版本中起作用,这甚至很奇怪。 Maybe someone can shed some light on the logic here to me. 也许有人可以向我阐明这里的逻辑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM