Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!

Nilesh Raje

Ranch Hand
+ Follow
since Aug 02, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nilesh Raje

Hi Guys,

I am working on a the following problem and need your suggestions and ideas

I am reading 10 values from a config file and preparing 10 connections and storing it in an array as of now. All this objects in array are runnable objects.
These 10 objects connect to 10 different server(located in different locations/country) respectively.

I am writing a code to iterate this array get the objects out of it and connect to their respective server.

I have the following scenarios.

1) If Initially the servers are down I need to keep trying to connect to that server with incremental delay ( 1 min ,next try at 2, next try 4... and so on).

2) if any server disconnects I need to keep trying to connect it with a incremental delay.

I used blocking queues and could address the 2nd issue. Whenever object disconnects i pushed the object back in the queue.

The problem I am facing is that if I keep trying for the first connection objects then the other connections in the array/queue would be waiting for their turn.

I need some kind of monitoring mechanism/thread that could address both the situations in a multithreaded environment.

Please advise.

Hi guys,

One of my friends was asked this question in his interview.

How can you disable or prevent polymorphism in Java?

Can anyone here provide me the right answer to this question with example?

I have already sent you email but you never replied ???
14 years ago
I was asked this question in interview.

Can you guys tell me what would be the right answer to this questions?

1) when hashmap or treemap are implemented, do they effect database queries?
I said that we could cache the data into collections so that we can read data from memory instead of doing DB transacations. This would increase the performance of the system.

2) if you override an equals but not the hashcode and try to insert an object into a hashmap, what happens and what kind of excepetion would you get?"
14 years ago
What is the use of thread pool in weblogic?
14 years ago
How to attach or transfer binary data using XML?
How to return a collection of records from a stored procedure.Can anyone give me some example code?
14 years ago
I just want to make them invisible.

Is the code i posted right?

I did not understand that. Can you show me some sample code?

Is this right?

how to develop an HTML page with a text link and an empty div element.
I need to Add JavaScript so that when the user clicks on the link, the word “Hello” appears in the div.
When the user clicks on the link, the page should not refresh, should not redirect and should not have any errors.

Please advise
How to Write a function that makes all the images on the web page disappear
Hey thanks a ton for the information guys.!
14 years ago
I am Java programmer and try to learn Ruby to add something on my resume. "Ruby in Practice" will help me jump start on Ruby so I can take on Rails quickly.
Please consider me for the Book give Away )


14 years ago

when we overide the equals method in a class for a given object then we use getClass to check the class type of the given object.

InstanceOF is also a option here but I know that instanceOf is a bad/inefficient and poor programming as I had read it somewhere.

Can any one justify why instanceOf is inefficient then getClass. Also would like to know details of InstanceOf() Vs getClass()

14 years ago