@Override public void run() { try { ASCIIChannel asciiChannel = new ASCIIChannel(); asciiChannel.setHost("localhost"); asciiChannel.setPort(11111); asciiChannel.setPackager(packager); asciiChannel.connect(); asciiChannel.send(isoMsg); asciiChannel.getLogger(); ISOMsg isoResposta = asciiChannel.receive(); //the error occurs here asciiChannel.disconnect();
System.out.println(logISOMsg(isoResposta, transactionMap.get(isoMsg.getMTI()), true)); } catch (IOException e) { System.out.println("IOE: " + e); //error here } catch (ISOException e) { System.out.println("ISOE: " + e); } }
public void getMultiResponse(){ ExecutorService executor = Executors.newFixedThreadPool(20);
for (int i = 0; i < 20; i++) { ClientRunnable worker = new ClientRunnable(isoMsg); executor.execute(worker); } executor.shutdown(); // Wait until all threads are finish while (!executor.isTerminated()) {
}
System.out.println("\nFinished all threads"); }
<?xml version="1.0" encoding="UTF-8"?>
<server class="org.jpos.q2.iso.QServer" logger="Q2" name="iso-server"> <attr name="port" type="java.lang.Integer">11111</attr> <property name="space" value="tspace:default" /> <property name="queue" value="ROL.TXN" /> <property name="debug" value="true" />
<channel class="org.jpos.iso.channel.ASCIIChannel" logger="Q2" packager="org.jpos.iso.packager.ISO87APackager" realm="ascii-channel"> <property name="packager-config" value="cfg/packager/iso87ascii.xml" /> <property name="debug" value="true" /> <property name="timeout" value="60000" /> <in>from-default</in> <out>to-default</out> </channel>
<request-listener name="isolistener" class="isogateway.listener.RequestListener" logger="Q2" realm="request-listener"> <property name="space" value="tspace:default" /> <property name="queue" value="ROL.TXN" /> <property name="debug" value="true" /> </request-listener>
</server>
<txnmgr name="Txn" logger="Q2" class="org.jpos.transaction.TransactionManager" realm="transaction-manager"> <property name="space" value="tspace:default" /> <property name="queue" value="ROL.TXN" /> <property name="sessions" value="40" /> <property name="debug" value="true" />
<participant class="isogateway.transaction.Switch" logger="Q2" realm="switch" > ... </participant>
<group name="AutorizacaoBloqueio"> ... </group>
</txnmgr>
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5a3f5fe4-2a7b-48de-a814-9bb3e94b13ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/5a3f5fe4-2a7b-48de-a814-9bb3e94b13ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
Join us in IRC at http://webchat.freenode.net/?channels=jpos
You received this message because you are subscribed to the "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users
---
You received this message because you are subscribed to a topic in the Google Groups "jPOS Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jpos-users/7MimyOv6W_k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jpos-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAAgSK%3DmJUcWceBo7xnqkExsy%3DBnaXrr1wDWeuv7q27UakoULtg%40mail.gmail.com.
try { db.open(); //line 29: db.session().getTransaction().begin(); //error occurs here
AccessLog accessLog = new AccessLog(); .....
logId = (Long) db.session().save(accessLog);
db.session().getTransaction().commit(); } catch (Exception e) { db.session().getTransaction().rollback(); e.printStackTrace(); } finally { db.close(); }
<log realm="close" at="Thu Oct 30 15:10:23 BRST 2014.499" lifespan="31ms"> <error> <exception name="null"> java.lang.NullPointerException at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:155) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:91) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:55) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1218) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:421) at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177) at org.jpos.transaction.Close.closeDB(Close.java:50) at org.jpos.transaction.Close.commit(Close.java:36) at org.jpos.transaction.TransactionManager.commit(TransactionManager.java:484) at org.jpos.transaction.TransactionManager.commit(TransactionManager.java:425) at org.jpos.transaction.TransactionManager.run(TransactionManager.java:268) at java.lang.Thread.run(Thread.java:662) </exception> </error></log>
final void checkForComodification() { if (modCount != expectedModCount) throw new ConcurrentModificationException(); }