// remove the old generated elements and any // white space before the old nodes List<Node> nodesToDelete = new ArrayList<Node>(); NodeList children = existingRootElement.getChildNodes(); int length = children.getLength(); for (int i = 0; i < length; i++) { Node node = children.item(i); if (isGeneratedNode(node)) { nodesToDelete.add(node); } else if (isWhiteSpace(node) && isGeneratedNode(children.item(i + 1))) { nodesToDelete.add(node); } }
if (node != null && node.getNodeType() == Node.ELEMENT_NODE) { Element element = (Element) node; String id = element.getAttribute("id"); //$NON-NLS-1$ if (id != null) { for (String prefix : MergeConstants.OLD_XML_ELEMENT_PREFIXES) { if (id.startsWith(prefix)) { rc = true; break; } } }
if (rc == false) { // check for new node format - if the first non-whitespace node // is an XML comment, and the comment includes // one of the old element tags, // then it is a generated node NodeList children = node.getChildNodes(); int length = children.getLength(); for (int i = 0; i < length; i++) { Node childNode = children.item(i); if (isWhiteSpace(childNode)) { continue; } else if (childNode.getNodeType() == Node.COMMENT_NODE) { Comment comment = (Comment) childNode; String commentData = comment.getData(); for (String tag : MergeConstants.OLD_ELEMENT_TAGS) { if (commentData.contains(tag)) { rc = true; break; } } } else { break; } } } }
return rc; }
在 rc==false 的情况下,有如下关键代码:
1 2 3 4 5 6
for (String tag : MergeConstants.OLD_ELEMENT_TAGS) { if (commentData.contains(tag)) { rc = true; break; } }
vi etc/security/limits.conf #加入以下内容 #for oracle oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
vi /etc/pam.d/login #使limits.conf配置立即生效 session required pam_limits.so
vi /etc/profile #加入以下内容 #for oracle if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi
The following configuration scripts need to be executed as the "root" user. #!/bin/sh #Root scripts to run
/usr/oracle/product/11.2.0/root.sh To execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts 4. Return to this window and hit "Enter" key to continue