Hi
We have a Flex app that uses an AMF channel to call a Java object on LCDS. The LCDS is a default 2.5.1 install on windows, running the built in JBOSS server.
When we run the flex client on the lan, response is excellent. When we call it from outside the firewall, we get a 5 to 7 second delay on the all Java calls. The app also uses SQL assember, but we dont see any perfomance issue with the data service calls.
The LCSD server is behind our firewall, and we are doing simple port forwarding of 8700 and 2038 to enable access from outside teh firewall.
To test, I set up a very simple java method, and if I call it from a pc on the lan I get an instant response. If I call it via the internet, I get a 5 second delay. This shows that bandwidth is not the issue.
My suspicion is that the problem is with polling on a simple amf channel. I tried to setup a streamingAMFchannel, but got a class not found error. I set up long polling, but got the same result.
Here is more background:
I created a simple java method:
public String ping() {
Calendar cal = Calendar.getInstance();
String time = cal.getTime().toString();
fLogger.info("Ping Received at "+time);
return time;
}
I call this from a form
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:RemoteObject
id="testBed"
destination="testBed">
<mx:method name="ping" result="pingHandler(event.result)"/>
</mx:RemoteObject>
<mx:Script><![CDATA[
privatefunction ping():void {
var date:Date = new Date();
msgBox.text=msgBox.text+"Calling ping at "+date.toLocaleTimeString()+" "+date.getMilliseconds()+"\n"
testBed.ping()
date = new Date();
msgBox.text=msgBox.text+"Ping called at "+date.toLocaleTimeString()+" "+date.getMilliseconds()+"\n"
}
privatefunction pingHandler(result):void {
var date:Date = new Date();
msgBox.text=msgBox.text+"Ping returned at "+date.toLocaleTimeString()+" "+date.getMilliseconds()+"\n"
msgBox.text=msgBox.text+"Ping returned :"+result+"\n"
} ]]> </mx:Script>
<mx:Button x="35" y="268" label="Ping" id="pingButton" click="ping()"/>
<mx:TextArea x="19" y="10" width="371" height="250" id="msgBox" text=""/>
</mx:Canvas>
When I run over the net I get
Calling ping at 04:19:11 PM 593
Ping called at 04:19:11 PM 593
Ping returned at 04:19:16 PM 562
Which is a 5 second delay
I have attached my config files.
Any suggestions would be appreciated.
Cheers
James