BaseChannel setConfiguration();

60 views
Skip to first unread message

Fabio Arias

unread,
Nov 23, 2009, 1:18:27 PM11/23/09
to jpos-...@googlegroups.com
Good Day Friends, i need to know how i can use the method setConfiguration de BaseChannel for to set the timeOutConnection.

Thanks A Lot


Fabio Hernando Arias Vera
Cel. +57 320 8494130

Ogden Nash  - "The trouble with a kitten is that when it grows up, it's always a cat."

Alejandro Revilla

unread,
Nov 23, 2009, 2:31:09 PM11/23/09
to jpos-...@googlegroups.com
Fabio,

If you are using Q2, you just need to add a property 'timeout' in your channel configuration.

If you are not using Q2 and you want to set the timeout in a BaseChannel derived channel, you can call its setTimeout method.

If you, on the other hand, like self punishment, you can create a Configuration object, add a 'timeout' property to it, and then call setConfiguration on your BaseChannel.

Hope this helps.

Fabio Arias

unread,
Nov 23, 2009, 4:36:27 PM11/23/09
to jpos-...@googlegroups.com
Alejandro muy buenas tardes, mira la propiedad que necesito setear es esta connectTimeout, necesito que mi socket sea no bloqueante, ya que el sistema operativo me un tiempo de 3min 09 seg antes de decirme que no se pudo conectar.

Te agradezco lo que puedas ayudarme.


Fabio Hernando Arias Vera
Cel. +57 320 8494130
Sent from Bogotá, Cundinamarca, Colombia
Charles de Gaulle  - "The better I get to know men, the more I find myself loving dogs."

2009/11/23 Alejandro Revilla <a...@jpos.org>
--
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

Alejandro Revilla

unread,
Nov 23, 2009, 6:53:26 PM11/23/09
to jpos-...@googlegroups.com
Then you need to use the property 'connect-timeout', but we could add a setConnectTimeout (similar to setTimeout) if you wish.

Fabio Arias

unread,
Nov 23, 2009, 7:07:10 PM11/23/09
to jpos-...@googlegroups.com
Do u have some example?

Thanks Alejandro...


Fabio Hernando Arias Vera
Cel. +57 320 8494130
Sent from Bogotá, Cundinamarca, Colombia
Ted Turner  - "Sports is like a war without the killing."

2009/11/23 Alejandro Revilla <a...@jpos.org>

Alejandro Revilla

unread,
Nov 24, 2009, 5:55:15 PM11/24/09
to jpos-...@googlegroups.com
import java.util.Properties;
import org.jpos.core.Configuration;

import org.jpos.core.SimpleConfiguration;

Propertoes props = new Properties ();
props.put ("connect-timeout", "3000");
Configuration cfg = new SimpleConfiguration (props);
((Configurable)channel).setConfiguration (cfg);

But once again, you'd do yourself a favor if you consider using Q2.

This document can help: http://jpos.org/doc/jPOS-Project-Guide.pdf
Reply all
Reply to author
Forward
0 new messages