[jpos-users] Printing actual thread pool active connections to the log

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jpos-users] Printing actual thread pool active connections to the log

Titus Rakkesh
Dear Friends,
      We are using JPos for one of our project. We are using

ISOServer server = new ISOServer(port, channel, new ThreadPool(10, 100));
server.addISORequestListener(new OurISOServer());
new Thread(server).start();

and implementing our txn flow in the following method,

public boolean process(ISOSource source, ISOMsg m) {
        long initTime = System.currentTimeMillis();
        String messageMTI = null;
        ISOMsg request = null;
        try {
            request = (ISOMsg) m.clone();
            messageMTI = request.getMTI();
            if (messageMTI.equals("0800")) {
-------
------
------
------
}


How we can print the current Active Thread Pool Connections available in the log, before each transaction?

Thanks,
Rakkesh

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CABm7V63%3DhXEcX-13pxstudUJAu_EfKx4pq3yhAvn_abd%2BXqSeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [jpos-users] Printing actual thread pool active connections to the log

Andrés Alcarraz
Since you are manually creating the components instead of using Q2 nothing prevents you to set the ThreadPool as an attribute to your ISORequestListener.

A no elegant at all solution in your environment would be to set the ThreadPool as a field of your RequestListener and use the method getActiveCount().



Andrés Alcarraz

2017-01-31 8:48 GMT-03:00 Titus Rakkesh <[hidden email]>:
Dear Friends,
      We are using JPos for one of our project. We are using

ISOServer server = new ISOServer(port, channel, new ThreadPool(10, 100));
server.addISORequestListener(new OurISOServer());
new Thread(server).start();

and implementing our txn flow in the following method,

public boolean process(ISOSource source, ISOMsg m) {
        long initTime = System.currentTimeMillis();
        String messageMTI = null;
        ISOMsg request = null;
        try {
            request = (ISOMsg) m.clone();
            messageMTI = request.getMTI();
            if (messageMTI.equals("0800")) {
-------
------
------
------
}


How we can print the current Active Thread Pool Connections available in the log, before each transaction?

Thanks,
Rakkesh

--
--
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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CABm7V63%3DhXEcX-13pxstudUJAu_EfKx4pq3yhAvn_abd%2BXqSeQ%40mail.gmail.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: [hidden email]
---
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAACHDe2HVB_wbQMGqSDYMCjwTV5t%2BwrQcdcWcq56pNm02D_U4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...