File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Prashant Sehgal
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic