Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to connect to server by java programme?

 
ravi kumar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I developed one application to get the File Receiving time from one Unix server(172.16.66.52).
In My programme
First I connected to one database(172.16.66.51) and selected some files based on some conditions.
Also I Connected to another database(10.68.169.130) and I inserted above files with file arrived time.
I wrote one codition in this programme that this application should run between sepecified time only.

Finally I ran this programme in Unix Server(172.16.66.52) (by using .sh file)file_arrived_time(i.e., file.lastModified()) and programme will run based on this server timming.
But Now My problem is I want to Run this programme in another server(10.68.169.129) and it should follow that servers(172.16.66.52) timming.
I am using DB2 for this.
Any one can please tell me ths solution for this.
Waiting for your valuble reply.
THANKS IN ADVANCE...
-RAVI KUMAR
 
Ibrahim Yahia
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ran,

If I understand what you want, you want one application to run on some host and to comply with timing for another host. If that's it, you can use many of java technology features, the simplest way is to use Socket and ServerSocket, you can write a simple ServerSocket application runs on the host that you want it's time (i.e. 172.16.66.52), then write some Socket code in your application that runs on (10.68.169.129) to connect with the ServerSocket application and get time from it. you can use other features like RMI, Servlet ...etc, but I think it will be costly on servers.
 
ravi kumar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ibrahim,
Thanks a lot for your reply.But I am not supposed to run any application in that server(17.66.16.52).And I wrote that application in core java.Can you please give me any suggession for that.
-ravi kumar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!