Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Making Connections

 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have to write a servlet, or a Java class which calls 2 databases and selects some values from 2 tables.
That is, when I come to that servlet, at first the servlet has to Select values x,y and Z from table A. Then this servlet has to select values r,t,y from table B.
But table A and table B exist in two databases ans at 2 locations. I am getting connections to the 2 locations, so it is okay.
But my qn is can I do this in a single servlet ?
Thanks,
Any suggestions welcome
Maya
 
Manoj Singh
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can ! you just have to use two different Connection objects .
 
Shreya Menon
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Manoj.
Maya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic