• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Interview Questions

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose you are being interviewed for a Java developer position and you are asked the following questions. How would you answer them?

You have a Java application that executes SQL queries and you find out that one of the SQL queries is taking a long time to execute. How would you go about finding out why that SQL query is taking a long time to execute?

Clients are trying to send XML messages to your Java Web service, but they are getting connection refused errors. The server on which your Java Web service is deployed is actually running. Your clients are using the correct IP address or URL to connect with your Web service. The IP addresses of your clients have the permission to access your Web service. How would you find out why the clients are getting connection refused errors?
 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How would you answer them? The aim here is most likely to find out how you would approach problems like this. If you know the details of any potential solutions, great, but it's also about revealing how you approach problems generally.

For example, what kind of problems might cause your SQL query to respond slowly when executed from your Java application? What happens when you execute a SQL query via Java e.g. do you know how the process is broken up into stages in your Java app, on the app server (if any) and in the database? What else might be going on to impact your query's performance? How could you isolate and investigate these possible causes? What are the possible solutions that might fix these different problems?
 
Author
Posts: 27
5
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup, Chris has got this one. There's no right or wrong answer, it's simply gauging how you would react and your methods of problem solving.

For the XML one for example, my answer would be something like this: Check the logs. Search for "Exception" and "error", and have a poke around to see what's in there. Hopefully you've got some better support tooling (maybe splunk/geneos etc) which can show what's going on. Next, try the connection myself. If I can use a test client I can check to see if everything works as expected. If it does then it's probably a network/proxy issue assuming that I'm probably on the same network as the server at work. Depending on the demands of the application (are we losing millions of pounds?) I'd probably do a rolling restart, because as all developers know turning it off and on again normally works ;).

When actually answering this question though it would be an interactive discussion so this would probably get fleshed out a bit as we went through.
 
Alissa Horner
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sam Atkinson wrote:Yup, Chris has got this one. There's no right or wrong answer, it's simply gauging how you would react and your methods of problem solving.

For the XML one for example, my answer would be something like this: Check the logs. Search for "Exception" and "error", and have a poke around to see what's in there. Hopefully you've got some better support tooling (maybe splunk/geneos etc) which can show what's going on. Next, try the connection myself. If I can use a test client I can check to see if everything works as expected. If it does then it's probably a network/proxy issue assuming that I'm probably on the same network as the server at work. Depending on the demands of the application (are we losing millions of pounds?) I'd probably do a rolling restart, because as all developers know turning it off and on again normally works ;).

When actually answering this question though it would be an interactive discussion so this would probably get fleshed out a bit as we went through.



Thank you for your input. Is there a tool other than a test client that can check a network connection?
 
Ranch Hand
Posts: 135
5
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this out
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic