• Post Reply Bookmark Topic Watch Topic
  • New Topic

Performance tuning through java  RSS feed

 
Suganya Purushothaman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The below is the question that was asked in the interview.

If there are 1 lakh records stored in the CLOB format in a table,what is the java code used if the there is a exception in the database while accessing the records.(I guess it is something related to performance tuning)

Anyone can reply to this?
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Suganya,

That depends what the assignment requests you do in the case of an exception halfway. There is not nearly enough information to answer that question. Functionally, are these records viewed as a coherent collection or as individual values? Are the expendable? Are the operations critical?

The answer is to ask more questions.

Kees Jan
 
Suganya Purushothaman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

Are these records viewed as a coherent collection or as individual values?
Individual values

Are the expendable?
Yes

Are the operations critical?
Yes
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Suganya,

With this extra information I would say you have to set up exception handling to handle two cases. One is a hard failure (eg unable to communicate with the database). You handle that one by cleaning up all resources and logging the error on ERROR level.

In the second case; a failure that is specific to one record (data format or out of range) you log the exception on WARN level and clean up the resources associated with the current record. Then proceed to process the next record.

Kees Jan
 
Anish Kuti
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know whether I have understand your question correctly or not ..
But this would be same as normal java programming technique .. You need to put exception handling for the any piece of code you will write down..
I don't see any special things you need to do here ..
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"kanis Knocks " please check your PMs .
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!