Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Query regarding using HTTPClient

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello everybody

I am having a query , hoping answers from you

I have my database installed on to the RemoteServer .

Can i use HTTPClient to know the status of the DataBase which installed on to the Remote machine ??

Welcomes your ideas.
 
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any process on the remote server that can listen to HTTP requests, maybe a web server or servlet container? If so, it may be possible to enable it to query the DB and return the status in the HTTP response.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing exists there .

So i think HTTPClient doesn't suit here as no one is listening.

Can't i use URLConnection(i don't know) OR java has provided any such alternative for this ??
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URLConnection also uses HTTP. You need to use a protocol that is supported by the server. For a database, why not use JDBC?
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you give me idea on how JDBC suppourts this ??
 
Ulf Dittmer
Rancher
Posts: 43011
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Supports *what*, exactly? If you can connect to the DB, then you can run any query that determines whatever you define as "status". If you can't connect, well, then things are not so good...
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i mean to ask is that

For this i need to the Remote Machine know on which the DataBase server has been setup know

1. Ping the IP address of the Remote machine and then check with port of it and then access the DB data.(Correct me if i am wrong )
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!