Revision 573
Added by berkley over 23 years ago
DocumentImpl.java | ||
---|---|---|
735 | 735 |
public static String write( Connection conn, Reader xml, Reader acl, |
736 | 736 |
String action, String docid, String user, |
737 | 737 |
String group, int serverCode ) |
738 |
throws Exception { |
|
738 |
throws Exception |
|
739 |
{ |
|
740 |
System.out.println("in write!!!!"); |
|
741 |
MetaCatUtil util = new MetaCatUtil(); |
|
739 | 742 |
// Determine if the docid is OK for INSERT or UPDATE |
740 | 743 |
AccessionNumber ac = new AccessionNumber(conn); |
741 | 744 |
String newdocid = ac.generate(docid, action); |
... | ... | |
790 | 793 |
//after inserting the document locally, tell the document's home server |
791 | 794 |
//to come get a copy from here. |
792 | 795 |
URL comeAndGetIt = new URL("http://" + server + |
793 |
"?action=forcereplicate&"); |
|
796 |
"?action=forcereplicate&server=" + |
|
797 |
util.getOption("server") + |
|
798 |
util.getOption("replicationpath")); |
|
799 |
System.out.println("documentimpl url: " + comeAndGetIt.toString()); |
|
794 | 800 |
String message = MetacatReplication.getURLContent(comeAndGetIt); |
795 | 801 |
|
796 | 802 |
if ( (docid != null) && !(newdocid.equals(docid)) ) |
Also available in: Unified diff
added more replication/file locking functionality.