Project

General

Profile

« Previous | Next » 

Revision 8959

Added by Jing Tao over 9 years ago

During the replication, the remote content will be saved without alteration.

View differences:

DocumentImpl.java
3033 3033
     *            the server which notify local server the force replication
3034 3034
     *            command
3035 3035
     */
3036
    public static String writeReplication(DBConnection conn, String xmlString,
3036
    public static String writeReplication(DBConnection conn, String xmlString, byte[] xmlBytes,
3037 3037
            String pub, Reader dtd, String action, String accnum, String user,
3038 3038
            String[] groups, String homeServer, String notifyServer,
3039 3039
            String ruleBase, boolean needValidation, String tableName, 
......
3095 3095
                isRevision = true;
3096 3096
            }
3097 3097
            // detect encoding
3098
            XmlStreamReader xsr = new XmlStreamReader(new ByteArrayInputStream(xmlString.getBytes()));
3098
            //XmlStreamReader xsr = new XmlStreamReader(new ByteArrayInputStream(xmlString.getBytes()));
3099
            XmlStreamReader xsr = new XmlStreamReader(new ByteArrayInputStream(xmlBytes));
3099 3100
	        String encoding = xsr.getEncoding();
3100 3101
	        
3101 3102
	        // no need to write the EML-contained access rules for replication
......
3112 3113
            conn.setAutoCommit(true);
3113 3114
            
3114 3115
            // Write the file to disk
3115
            byte[] bytes = xmlString.getBytes(encoding);
3116
        	writeToFileSystem(bytes, accnum);
3116
            //byte[] bytes = xmlString.getBytes(encoding);
3117
        	writeToFileSystem(xmlBytes, accnum);
3117 3118
            
3118 3119
            // write to xml_node complete. start the indexing thread.
3119 3120
            // this only for xml_documents

Also available in: Unified diff