forked from apache/ofbiz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1541470 13f7…
…9535-47bb-0310-9956-ffa450edef68
- Loading branch information
1 parent
500f6b3
commit e60e809
Showing
21 changed files
with
258 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>ofbiz</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
<name>ofbizClean</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.rubypeople.rdt.core.rubybuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.rubypeople.rdt.core.rubynature</nature> | ||
</natures> | ||
<linkedResources> | ||
<link> | ||
<name>specialpurpose/pos/lib/jcl.jar</name> | ||
<type>2</type> | ||
<locationURI>zip:/?file:/D:/workspace/ofbizClean/specialpurpose/pos/lib/jcl.jar</locationURI> | ||
</link> | ||
</linkedResources> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
import org.apache.catalina.LifecycleException; | ||
import org.apache.catalina.Manager; | ||
import org.apache.catalina.connector.Connector; | ||
import org.apache.catalina.core.JreMemoryLeakPreventionListener; | ||
import org.apache.catalina.core.StandardContext; | ||
import org.apache.catalina.core.StandardEngine; | ||
import org.apache.catalina.core.StandardHost; | ||
|
@@ -205,7 +206,18 @@ public void init(String[] args, String name, String configFile) throws Container | |
if (useNaming) { | ||
tomcat.enableNaming(); | ||
} | ||
|
||
|
||
// https://tomcat.apache.org/tomcat-7.0-doc/config/listeners.html#JRE_Memory_Leak_Prevention_Listener_-_org.apache.catalina.core.JreMemoryLeakPreventionListener | ||
// <<The JRE Memory Leak Prevention Listener provides work-arounds for known places where the Java Runtime environment uses | ||
// the context class loader to load a singleton as this will cause a memory leak if a web application class loader happens | ||
// to be the context class loader at the time.>> | ||
// http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?view=annotate | ||
JreMemoryLeakPreventionListener jreMemoryLeakPreventionListener = new JreMemoryLeakPreventionListener(); | ||
// Mostly use default config, but some cases here | ||
jreMemoryLeakPreventionListener.setAppContextProtection(true); // True is the default for Java 1.6, use false for Java from 1.7.0_02 onwards (see sources above) | ||
jreMemoryLeakPreventionListener.setGcDaemonProtection(false); // False because of https://mail-archives.apache.org/mod_mbox/tomcat-users/201008.mbox/%[email protected]%3E | ||
jreMemoryLeakPreventionListener.setUrlCacheProtection(false); // False to keep the URLConnection cache, moot point | ||
|
||
// configure JNDI in the StandardServer | ||
StandardServer server = (StandardServer) tomcat.getServer(); | ||
try { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,4 @@ | |
example/build.xml | ||
"/> | ||
</project> | ||
<!-- ,solr/build.xml --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
jQuery(document).ready(function() { | ||
jQuery('#removePinTotalPaid').click(function(event) { | ||
pleaseWait('Y'); | ||
var param = 'clearPin=Y&clearCheck=N&clearGift=N&clearCredit=N'; | ||
jQuery.ajax({url: 'ClearPayment', | ||
data: param, | ||
type: 'post', | ||
async: false, | ||
success: function(data) { | ||
getResultOfPinClearPayment(data); | ||
}, | ||
error: function(data) { | ||
getResultOfPinClearPayment(data); | ||
} | ||
}); | ||
pleaseWait('N'); | ||
productToSearchFocus(); | ||
return false; | ||
}); | ||
|
||
jQuery('#amoutPin').keypress(function(event) { | ||
code = event.keyCode ? event.keyCode : event.which; | ||
if (code.toString() == 13) { | ||
payPinConfirm(); | ||
return false; | ||
} | ||
if (code.toString() == 27) { | ||
productToSearchFocus(); | ||
return false; | ||
} | ||
}); | ||
|
||
jQuery('#payPinConfirm').click(function(event) { | ||
payPinConfirm(); | ||
return false; | ||
}); | ||
|
||
jQuery('#payPinCancel').click(function(event) { | ||
productToSearchFocus(); | ||
return false; | ||
}); | ||
}); | ||
|
||
function payPinConfirm() { | ||
pleaseWait('Y'); | ||
var param = 'amoutPin=' + jQuery('#amoutPin').val(); | ||
jQuery.ajax({url: 'PayPin', | ||
data: param, | ||
type: 'post', | ||
async: false, | ||
success: function(data) { | ||
getResultOfPayPin(data); | ||
}, | ||
error: function(data) { | ||
getResultOfPayPin(data); | ||
} | ||
}); | ||
pleaseWait('N'); | ||
} | ||
|
||
function payPin(cleanErrors) { | ||
if (cleanErrors == undefined) { | ||
cleanErrors = "Y"; | ||
} | ||
if (cleanErrors == "Y") { | ||
hideOverlayDiv(); | ||
jQuery('#payPinFormServerError').html(""); | ||
jQuery('#amoutPin').val(""); | ||
} | ||
jQuery('#cashTotalDue').html(jQuery('#totalDueFormatted').val()); | ||
jQuery('#cashTotalPaid').html(jQuery('#totalPinFormatted').val()); | ||
jQuery('#payPin').show(); | ||
jQuery('#amoutPin').focus(); | ||
return false; | ||
} | ||
|
||
function getResultOfPayPin(data) { | ||
var serverError = getServerError(data); | ||
if (serverError != "") { | ||
jQuery('#payPinFormServerError').html(serverError); | ||
payPin('N'); | ||
} else { | ||
clearErrorMessages(); | ||
updateCart(); | ||
productToSearchFocus(); | ||
} | ||
} | ||
|
||
function getResultOfPinClearPayment(data) { | ||
var serverError = getServerError(data); | ||
if (serverError != "") { | ||
jQuery('#errors').fadeIn('slow', function() { | ||
jQuery('#errors').html(serverError); | ||
}); | ||
} else { | ||
clearErrorMessages(); | ||
updateCart(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.