GraniteDS on Weblogic

58 views
Skip to first unread message

Lasha K

unread,
May 26, 2015, 6:44:31 AM5/26/15
to gran...@googlegroups.com
Hello, GraniteDS fans)
The problem that I'm facing is really odd. So here it is:
I have WLS 11g server and I've configured GraniteDS. I'm using Servlet 2.5 without async improvement, but that's ok.
When I login and go to some pages I can see that there are some Http requests that are in pending state and after some time they die with a timeout and after this User is facing Login Window.
So I've started debugging and that's what I found.
1. GraniteDS sends Ping operation to the Granite Server. It goes fine.
2. GraniteDS sends Subscribe operation to the Granite Server. It goes fine.
3. GraniteDS sends Connect operation to the Granite Server. The handling login of Connect operation is quite odd for the first look, but i'm newbie there, so whatever. The handle message logic for Connect Operation returns null;
    private Message handleConnectMessage(final ChannelFactory<?> channelFactory, CommandMessage message) {
       
Channel channel = getChannel(channelFactory, (String)message.getClientId());

       
if (channel == null)
           
return handleUnknownClientMessage(message);

       
return null;
   
}

and in GravityWebLogicServlet.java it returns true:

 if (amf3Response == null) {
   
if (amf3Requests.length > 1)
       
throw new IllegalArgumentException("Only one connect request is allowed on tunnel.");

   
WebLogicChannel channel = gravity.getChannel(channelFactory, channelId);
   
if (channel == null)
 
throw new NullPointerException("No channel on tunnel connect");
   
   
// Try to send pending messages if any (using current container thread).
   
if (channel.runReceived(new AsyncHttpContext(request, response, amf3Request)))
     
return false;

   
// No pending messages, wait for new ones or timeout.
 
GravityServletUtil.setConnectMessage(request, amf3Request);
 key
.setTimeout((int)GravityServletUtil.getLongPollingTimeout(getServletContext()));
 channel
.setRequestResponseKey(key);
 
return true;
}


which means that response will not be sent immediately according to WebLogic Documentation:
If a response needs to be sent immediately, this method should return false.

Questions:
1. Why GraniteDS is not sending response immediately for the Connect Operation?
2. Is there a possibility to send response immediately for the Connect Operation?
3. Has anyone faced the problem that there are http request from GraniteDS that failed with timeout, because response wasn't received?
4. Can somebody explain when the response will be sent back to that request?

P.S. sorry for my english)
P.S.S. the problem wasn't reproduced on Glassfish environment :(

Lasha K

unread,
Jun 4, 2015, 6:03:57 AM6/4/15
to gran...@googlegroups.com

It seems that the problem is in org.granite.gravity.weblogic.GravityWebLogicServlet.java
This servlet will not work properly in Weblogic 11g (which doesn't support servlet3 with async support) and will cause some security issues (e.g. relogin every minute), because after sending http request with Connect Operation there is no response and that request fails with timeout.
With Weblogic 12c - everything works great, no additional configuration required.

So in conclusion, it seems that GraniteDS requires Servlet3 implementation at least for Weblogic.
Reply all
Reply to author
Forward
0 new messages