• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

onMessage method of websocket client endpoint stopping after message received

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.

I have a websocket java client connecting to a server to read back the messages from that server. The onMessage method does appear to be obtaining the messages from the server but I noticed an issue when I added further code within the same method. In my case I wanted to log the messages to a database but noticed the database code was not being executed. I removed the database code and put in some println debug and found out that they were not always being executed or that some were but others were not.I also added a for loop which too should complete but stops before the end at differing points, I have the onError and onClose methods implemented and they are not being fired by any error or socket closure. I have included the client code below. Has anyone else encountered this? I'm running jdk 7 and I'm really puzzled by this.
thanks.


 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've hit the same issue and have no idea what is happening. God bless the souls of all cursed to crawl through these lands!
 
I've been selected to go to the moon! All thanks to this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic