Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Jonny Butamer

Greenhorn
+ Follow
since Oct 27, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jonny Butamer

Hi,

I have a class that creates a Timer to run a TimerTask if a certain event happens. It will repeatedly run the Task every 10mins for an hour. When I open a command console and run the Timer it works fine no problems.

If I run the Timer using eclipse, eclipse freezes as well as my whole PC. I have to reboot to get around this. I have got other people to try this using a different version of eclipse and the same thing happens on their machine.

Does anyone what causes this and how to fix the problem?

Appreciate any help you can give
Thanks
Hi,

I looking for a book to help me with unix programming. I have some experience with unix but would to learn a bit more. Anyone have any suggestions on a good book?

Thanks
Jonny
14 years ago
Thanks Ernest. Managed to find out what would happen by testing.
Small change to the code. It should be.
Hi there,

I recently came across some code and I am hope someone will tell if the logic behind it is correct.
The code is summarised as follows:


What happens if the method, creates an instance of myThread, returns result, and then myThread throws a RuntimeException? Will that RuntimeException be caught by the surrounding try/catch and then throw a new instance of MyException?

Thanks for replies
Hi,

I am wondering if anybody knows of any patterns or best practices that could be used when using JDBC besides connection pooling. eg is it a good idea to have all JDBC operations in a facade like class and return the results to the calling classes or should the calling classing carrying out the operations themselves?

Thanks in advance
Jonny
Hi,

I'am wondering if anybody knows if the connection closes that was used to retrieve a ResultSet, does the ResultSet also close. Can you continue to use a ResultSet after the connection that retrieved the ResultSet closes?

Thanks for any answers
Hi,

I am starting to study for the IBM 486 test. I am hoping someone will be able to give me some advice on what material I should read. I have the gang of four book and the UML distilled 2nd edition. I read on another thread that I should read the Applying UML and Patterns: book by Craig Larman. Should i get the 2nd or third edition of this book. I know that the 2nd edition covers UML 1 and the third edition covers UML 2. I think the exam covers UML 1?? My question is there much difference between the the two versions of UML? Should i buy the 2nd or 3rd edition of Applying UML and Patterns??

Thanks for any advice
Thanks for that Conan

I actually have wait() inside a while loop but left it out of the snippet i put in my last post. Sorry.

I think I understand now. But just to be sure. If i have the following:
(lockedRecords is a HashMap)


Where ever I make a change to the lockedRecords I should call notify/notiyAll?

Thanks
Thanks for the reply Paul.

Why would locking the data object cut down on my concurrency? I tried it out and it doesn't seem to have any affect.

Thanks in advance
Hi

Thanks for the replys. Andrew I have updated my profile but not sure if it changes my display name. How do i do that?

I'am still a bit confused about when i should call notify or notifyAll. I understand the difference between them and I know when not to call them. But am still a bit confused about where exactly i should call one of them.

If i have a wait() call inside a synchronized block should I call notifyAll/notify at the end of that synchronized block?
For example:



Is this correct use of notifyAll? If it is not, when for the above scenario should notifyAll/notify be called?
Thanks in advance.
Hi

I� am a bit confused about when notify or notifyAll should be call and am hoping some body might be able to explain a few things for me.

Should notify or notifyAll be called at the end of every synchronized block or will notify be called automatically when the synchronized block is exited?

If a synchronized block is interrupted for some reason eg an Exception is caught should notify or notifyAll all be called?

If a method is synchronized should notify or notifyAll be called before that method is returned?

If no for all of the above when should notify or notifyAll be called?

Thanks in advance for any replys
Hi,

I have been reading this forum for the last few months but this is my first time posting here. I have a problem and I� am hoping someone can give me some advice.

For the database part of my project I have a DataAdapter and a Data class. The DataAdapter does the locking and unlocking for clients and has a reference to a data object for accessing the database file.

The DataAdapter has a method called getRecordsUsingCriteria() that returns a list of records matching a supplied criteria. getRecordsUsingCriteria() calls the find() method in Data to get an array of record numbers that matches the criteria. Using the record numbers, getRecordsUsingCriteria() reads each record and adds it to a list which is returned to the client.

The find method in Data locks the file while it is searching record numbers. However the getRecordsUsingCriteria() does no locking. I think there is a possibility of a dirty read in the getRecordsUsingCriteria() method, if in between the time getRecordsUsingCriteria() receives the array of records and reads the records another client cuts in an changes the records.

I was wondering what is the best way to avoid this situation. I could either make getRecordsUsingCriteria() synchronized or call synchronized on the Data object and hold the lock for the duration of the method. Which one would be the best solution and would it work?

Any advice would be appreciated
Hi,

I have been trying to set up a java environment on a windows system. I have downloaded the SDK and set my classpath and path variables. I can compile my code no problem but get a problem when i try to run the programs. I get the following error "Error: Could not open 'C:\Program Files\Java\j2re1.4.1_01\lib\i386\jvm.cfg'". I assumed that windows is looking for the JVM in this directory but cannot find it because its not there. My question is why is windows looking is this directory and not the directory I have set in my PATH variable? and can I change this? If not how do I fix the problem?

Thanks for any help
15 years ago