aspose file tools*
The moose likes Applets and the fly likes Thread not opening connections properly. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Thread not opening connections properly." Watch "Thread not opening connections properly." New topic
Author

Thread not opening connections properly.

Declan Conlon
Ranch Hand

Joined: Jul 03, 2001
Posts: 34
I'm not sure what is wrong with my applet. Originally I had an applet that accessed a file and outputted it to a servlet. I then wanted to add a progress bar but the file access and transfer process were to intensive to make the progress workable. I moved the progress bar to a thread and the file access and transfer also. Now the progress bar works but there seems to be a problem with connecting to the servlet. A case of fix one thing brake another. Has anyone any ideas as to why this may be the case. The code is the same as I just pass datainputstream and a dataoutputstream to the thread and reuse the same codefrom there. The file inputs correctly and I have tried the older version of the code and it still works. Thanks for any help and ideas you can give.
Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
Hi while progg with threads,
plz take care of the following things
1)Starting point of each thread
2) Is these threds use a shared resource. If yes, then check any possiblilty of concurrent access.
3)Whether All threads stopped properly.

Sarath Mohan
Declan Conlon
Ranch Hand

Joined: Jul 03, 2001
Posts: 34
It's not one of the ususal thread problems, it is something a little more subtile than that. I believe the problem to be with my DataOutputStream not being initialised in the thread despite being passed references to the streams. Anyone think that sounds familiar?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread not opening connections properly.