This file contains hidden or 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
public class CustomerCreate extends RestActionSupport { | |
private final String name = "304.301.CUSTOMER"; | |
@Override | |
protected Map<String, Object> doExecute(DB db, JPublishContext jpc, Configuration c) throws BLException, ISOException { | |
final ISOMsg request = new ISOMsg("2304"); | |
final Date date = new Date(); | |
request.set(7, getDate(date)); | |
request.set(11, getStan()); |
This file contains hidden or 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
diff --git a/jpos/src/main/java/org/jpos/q2/iso/QMUX.java b/jpos/src/main/java/org/jpos/q2/iso/QMUX.java | |
index cedffdc..1dacefa 100644 | |
--- a/jpos/src/main/java/org/jpos/q2/iso/QMUX.java | |
+++ b/jpos/src/main/java/org/jpos/q2/iso/QMUX.java | |
@@ -271,6 +271,8 @@ public class QMUX | |
if (timeout > 0) | |
DefaultTimer.getTimer().schedule (ar, timeout); | |
} | |
+ if (sp.rdp (req)) | |
+ throw new ISOException ("Duplicate key " + req + " detected"); |
This file contains hidden or 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
We found an issue when running it on OS X, we get this exception: | |
java.util.zip.ZipException: error in opening zip file | |
at java.util.zip.ZipFile.open(Native Method) | |
at java.util.zip.ZipFile.<init>(ZipFile.java:114) | |
at java.util.jar.JarFile.<init>(JarFile.java:135) | |
at java.util.jar.JarFile.<init>(JarFile.java:99) | |
at jline.ClassNameCompletor.getClassNames(ClassNameCompletor.java:89) | |
at jline.ClassNameCompletor.<init>(ClassNameCompletor.java:33) |
This file contains hidden or 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
01 00000003 Preparing org.jpos.jpts.PrepareContext | |
01 00000003 Preparing org.jpos.transaction.Open | |
00 00000004 Preparing org.jpos.jpts.PrepareContext | |
00 00000004 Preparing org.jpos.transaction.Open | |
02 00000005 Preparing org.jpos.jpts.PrepareContext | |
02 00000005 Preparing org.jpos.transaction.Open | |
03 00000006 Preparing org.jpos.jpts.PrepareContext | |
03 00000006 Preparing org.jpos.transaction.Open |
This file contains hidden or 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
<profiler> | |
PACK tps=51505, peak=51505, avg=34402.50 [2281.8/2281.8] | |
UNPACK tps=43221, peak=43221, avg=21610.50 [1989.6/4271.4] | |
PACK/UNPACK tps=26035, peak=26687, avg=22932.25 [3807.2/8078.6] | |
UPDATE/PACK/UNPACK tps=17016, peak=17016, avg=16471.67 [6679.7/14758.4] | |
end [14758.4/14758.4] | |
</profiler> |
This file contains hidden or 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
public class Util { | |
/** | |
* DES Keys use the LSB as the odd parity bit. This method can | |
* be used enforce correct parity. | |
* | |
* @param bytes the byte array to set the odd parity on. | |
*/ | |
public static void adjustDESParity (byte[] bytes) { | |
for (int i = 0; i < bytes.length; i++) { |
This file contains hidden or 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
private void closeSocket() throws IOException { | |
Socket s = null; | |
synchronized (this) { | |
if (socket != null) { | |
s = socket; // we don't want more than one thread | |
socket = null; // attempting to close the socket | |
} | |
} | |
if (s != null) { | |
try { |
This file contains hidden or 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
#!/bin/bash | |
echo -n `pwd` | pbcopy |
This file contains hidden or 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
#!/bin/bash | |
if [ "$1"x == "x" ]; then | |
echo "Wrong number of parameters. Usage: $0 projectname"; | |
exit 1 | |
fi | |
mkdir $1 || exit 1 | |
echo "Creating directory $1" | |
svn add $1 |
This file contains hidden or 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
#!/bin/bash | |
cd $HOME/git/jpos | |
mvn -Dmaven.test.skip=true clean package | |
cd jpos/target | |
tar zxf jpos-1.8.0.tar.gz | |
cd jpos-1.8.0 | |
exec bin/q2 |