• Post Reply Bookmark Topic Watch Topic
  • New Topic

File creation Java program to run in multiple servers  RSS feed

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

I have written a usual Java program to create a XML file in a directory say C:\Testing. This program works well as expected and created XML without any issues.
Now this is all fine but when it comes to production, we have 4 PROD servers and when this action is invoked, will it create file only in the server where this thread is executed or will it create in all 4 PROD servers?

If it will not run in multiple servers, what I have to include to make it happen?
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Narmadha Ranganathan wrote:
Now this is all fine but when it comes to production, we have 4 PROD servers and when this action is invoked, will it create file only in the server where this thread is executed or will it create in all 4 PROD servers?


Well, that depends on how the servers are configured. Are the 4 file systems network mounted, so that changes to one file system changes all four file systems? Or are they independent file systems?  This questions should be asked to your network / system administrator, as we can't answer, since we don't know how you are configured.

Henry
 
Narmadha Ranganathan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I'll get in touch with the environments team for it and get back. In other case, will it be possible to run the same on all 4 PROD servers.?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Narmadha Ranganathan wrote:I'll get in touch with the environments team for it and get back. In other case, will it be possible to run the same on all 4 PROD servers.?


This follow up question should also probably be best answered by your network / system administrators?  How are the machines connected?  What services are available? telnet? ssh? etc.  Do you have the JRE installed on all the machines?

Depending on what is installed, you can probably use whatever services, so that one Java application can start a remote Java application. Or more likely, write a script that will use the available services to start multiple copies of the application as needed.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!