You can call mux.isConnected() before trying. That works if you have set de ready property as in the next example borrowed from the excellent must read jpos programmer's guide:
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="mymux"> <in>your-channel-receive</in> (1) <out>your-channel-send</out> (2) <ready>your-channel.ready</ready> (3) </mux>
(3) In order to provide a usable MUX.isConnected() method, the MUX needs to have a way to know if the underlying channel, loosely connected through the in/out queues is actually connected. The channel adaptor sets an entry in the space named after the channel’s name with the extension .ready as true when connected, so the optional ready element has to match that name. If a <ready> element isn’t present, MUX.isConnected() will always return true.
--
--
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 post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/87353b89-99ea-4527-baa5-72f2cd4a979c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Amit:
You can call mux.isConnected() before trying. That works if you have set de ready property as in the next example borrowed from the excellent must read jpos programmer's guide:
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="mymux"> <in>your-channel-receive</in> (1) <out>your-channel-send</out> (2) <ready>your-channel.ready</ready> (3) </mux>
(3) In order to provide a usable MUX.isConnected() method, the MUX needs to have a way to know if the underlying channel, loosely connected through the in/out queues is actually connected. The channel adaptor sets an entry in the space named after the channel’s name with the extension .ready as true when connected, so the optional ready element has to match that name. If a <ready> element isn’t present, MUX.isConnected() will always return true.
Hi,