use of channel_adapter.xml file

91 views
Skip to first unread message

pradnya k

unread,
May 3, 2013, 6:36:52 AM5/3/13
to jpos-...@googlegroups.com
hello,
i want to use  channel_adapter.xml file in my code . how to use this ip n port in source file so that i am able to connect to server.
thanks for the help in advance. below is the file of channel adapter

<channel-adaptor name='sample-channel-adaptor'
class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.ASCIIChannel" logger="Q2"
packager="org.jpos.iso.packager.GenericPackager"
header="ISO016000055">
<property name="host" value="192.168.0.1" />
<property name="port" value="4444" />
<property name="packager-config" value="cfg/iso87ascii.xml" />
</channel>
<in>sample-send</in>
<out>sample-receive</out>
<reconnect-delay>5000</reconnect-delay>
<space>tspace:default</space>
</channel-adaptor>

chhil

unread,
May 3, 2013, 6:40:46 AM5/3/13
to jpos-...@googlegroups.com
You dont have to worry about connecting the framework takes care of this for you by reading the deployed file.

If deployed does not make sense, read the programmers guide.

-chhil

--
--
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 "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.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Victor Salaman

unread,
May 3, 2013, 6:41:20 AM5/3/13
to jpos-...@googlegroups.com
Hi:

Have you purchased the programmer's guide?


/V

pradnya k

unread,
May 3, 2013, 8:18:35 AM5/3/13
to jpos-...@googlegroups.com
hi,
thanks for the reply. actually i wanted to ask , how to use channel adpter here so that i dont need to hardcode ip n port like below in my code,
  channel = new BASE24Channel("10.0.1.20", 8000, new GenericPackager(
                                "base24.xml"));
i have read jpos programmers guide , but still i m stuckd at this point.

thanks for help in advance

chhil

unread,
May 3, 2013, 8:26:52 AM5/3/13
to jpos-...@googlegroups.com
If its deployed you can use the static nameregistrar object to get the ChannelAdaptor by name and look at the api to see whats is available.

-chhil

Alejandro Revilla

unread,
May 3, 2013, 8:52:13 AM5/3/13
to jpos-...@googlegroups.com

You usually use a channel adaptor in combination with a MUX (defined in another descriptor). The ChannelAdaptor and the MUX speak over lousy coupled Space queues (those that you define in their 'in' and 'out' elements).

You can locate the MUX using the NameRegistrar from your code.

So once you have Q2 running, with a MUX and a ChannelAdaptor, you basically use code like this:

MUX mux = (MUX) NameRegistrar.get("mux.mymux");
ISOMsg response = mux.request(requestMsg, timeout);

--
@apr

Martha Gani

unread,
May 13, 2013, 6:23:09 AM5/13/13
to jpos-...@googlegroups.com

What's the current version of this document ?
Thanks



From: Victor Salaman <vsal...@gmail.com>
To: jpos-...@googlegroups.com
Sent: Friday, May 3, 2013 5:41 PM
Subject: Re: [jpos-users] use of channel_adapter.xml file

Alejandro Revilla

unread,
May 13, 2013, 4:32:00 PM5/13/13
to jpos-...@googlegroups.com
Document is kind of old, covers version 1.6.7. There has been many changes since then (see http://jpos.org/wiki/ChangeLog) but the main components and concepts (ISOMsg, ISOFields, ISOComponents, MUXes, Channels, Servers, Spaces, TransactionManager) remains mostly the same, so IMO it's still a good read.

I'm working in a totally new document that covers 1.9.0 series with the new Gradle based build system, but it's taking time ...

--
@apr

Reply all
Reply to author
Forward
0 new messages