File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Data / File replication in websphere cluster environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Data / File replication in websphere cluster environment" Watch "Data / File replication in websphere cluster environment" New topic
Author

Data / File replication in websphere cluster environment

Akshay D Joshi
Greenhorn

Joined: Aug 04, 2011
Posts: 9
I have a web application in which i write a data (user wise) in txt file and dispaly it to user (i don't want to store in database).

when i deployed my application in cluster environment , the application directory is created at each node say node1 and node2.

The cluster members are in memory-to-memory replication mode.

When i run application , assume that my request goes to node 1 server. I am working on this node server so i visit the page which saves data in txt file . I save the data.
Now the txt file is saved in directory of node 1 server.

now suppose that i stops node 1 server while working ,so automatically my request goes to node 2 server.
now when i visit the same page i get a balnk data as file is not created in node 2 server directory.so i get confused that i had saved data,now where is it?
So i again save the data .now the file is created again at node 2 server.

I want a configuration in websphere so whenever i save the data , the txt file should be created on both node servers ,so i always get the latest one.

Kindly give me a solution.
Anton Novopashin
Greenhorn

Joined: Feb 25, 2008
Posts: 19
Hi,
I think you need to understand how WebSphere cluster works.
You have unclear application design, because why you need to create file and then read it and show this data (something wrong here).
First of all you should use shared directory for both nodes.

See J2EE Connector Architecture (JCA) 1.5 standard - this is good decision for Flat File processing. (JCA Adapters are perfectly solutions for WebSphere cluster).

When i run application , assume that my request goes to node 1 server. I am working on this node server so i visit the page which saves data in txt file . I save the data.
Now the txt file is saved in directory of node 1 server.

This statement is not correct because not all resources couldn't be retried.


OCJP (1Z0-851).
Integration Developer (000-607).
WAS Admin (000-377).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data / File replication in websphere cluster environment