aspose file tools*
The moose likes Java in General and the fly likes Stuck between TimerTasks and ObjectOutputStream...(i think) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Stuck between TimerTasks and ObjectOutputStream...(i think)" Watch "Stuck between TimerTasks and ObjectOutputStream...(i think)" New topic

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

Prashant Sehgal
Ranch Hand

Joined: Jun 20, 2003
Posts: 56

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
wood burning stoves
subject: Stuck between TimerTasks and ObjectOutputStream...(i think)
Similar Threads
security manager warning
Applet notinitited, please need urgent help
Applet servlet communication
ScrollBar Problem
Server returned HTTP response code: 405