• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stuck between TimerTasks and ObjectOutputStream...(i think)

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

I've been banging my head against this for almost two days and am now out of ideas and stamina! There's much more code than I'm putting here and much more weird behaviour I'm seeing - but I dont think anyone has the patience to read that, much less mine to write it!! But here's the summary:

I have an signed applet that talks to a servlet. On the click of a button in the applet, the servlet calls a bunch of utility classes that do file i/o of the disk, connect to db, called stored procedures etc.

Now what I want to achieve is that all these utility classes be able to some log progress back to a text area on the applet. I use a singleton Logger that buffers all log messages coming from anywhere in the app. I designed skeletons around it and it worked. The real thing, however, doesn't.

I user a timer in the applet and the servlet classes. The applet timer wakes up, and appends to the text area whatever's there to read off of the ObjectInputStrem. The servlet timer wakes up and checks if there's anything new in the Loffer buffer and if so, throws it to the Applet.

The problem is that the initial messages from the utililty classes arrive fine, but the later message never make it past the servlet.

Here's the code:

The Applet


The Servlet



The Servlet's TimerTask
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic