Jpos server event when client connct

46 views
Skip to first unread message

soltani...@gmail.com

unread,
Jun 6, 2026, 4:35:31 AM (7 days ago) Jun 6
to jPOS Users
Hi
I am listening on port 9876 for ATMs as a server.
I want to get an event when an ATM establishes a TCP connection, not only when it sends a message. Is there a way in jPOS to detect when a client (ATM) connects to the server socket?
____________________________
public class AtmListener extends BaseChannel implements ISORequestListener, LogSource, Configurable  {
    public boolean process(ISOSource isoSource, ISOMsg isoMsg) {
        try {
            AtmNdc ndcMsg = (AtmNdc) isoMsg;
            TransactionManager transactionManager = TransactionManager.getTransactionManager();

            BaseChannel channel = (BaseChannel) isoSource;
            Socket socket = channel.getSocket();
            String clientIP = socket.getInetAddress().getHostAddress();
            TransactionContext context = transactionManager.createTransactionContext(ndcMsg);

            if (context == null) {
                logger.info("Empty NDC message form ATM received!");
                return true;
            }
    }
-------------------------------------
<server name="atm-ndc-server" class="org.jpos.q2.iso.QServer" logger="Q2">
<attr name="port" type="java.lang.Integer">9876</attr>
<attr name="minSessions" type="java.lang.Integer">100</attr>
<attr name="maxSessions" type="java.lang.Integer">1000</attr>
<channel name="atm.channel" class="com.en.datavsn.EFTswitch.atm.AtmChannel" packager="org.jpos.iso.packager.VAPSMSPackager" logger="Q2">
<property name="schema" value="file:./q2/cfg/ndc-"/>
</channel>
<request-listener
class="com.en.datavsn.EFTswitch.atm.AtmListener" logger="Q2">
<property name="space" value="TRANSACTION.SPACE" />
<property name="queue" value="TRANSACTION.NDCREQUEST" />
<property name="res

Barzilai Spinak

unread,
Jun 6, 2026, 8:01:37 AM (7 days ago) Jun 6
to jpos-...@googlegroups.com
Try using connection-listeners to add an ISOServerEventListener

--
--
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
---
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 visit https://groups.google.com/d/msgid/jpos-users/82e41a70-bc8d-4f5e-91e2-6749435f572cn%40googlegroups.com.


--
Barzilai Spinak
Transactility, Inc.
www.transactility.com
"Commercial licensing and support for the jPOS.org project"

soltani...@gmail.com

unread,
Jun 7, 2026, 1:45:07 AM (6 days ago) Jun 7
to jPOS Users
Thank you

My jPOS version is 1.9 and it doesn’t have this event. Is there any other workaround?

Alejandro Revilla

unread,
Jun 7, 2026, 3:23:37 AM (6 days ago) Jun 7
to jpos-...@googlegroups.com
Easiest solution is to upgrade to the latest 2, or even 3 series. 



soltani...@gmail.com

unread,
Jun 7, 2026, 3:44:57 AM (6 days ago) Jun 7
to jPOS Users
Thank yo so much
Reply all
Reply to author
Forward
0 new messages