Batch File Listener on Jboss AS
- MasterL
- Topic Author
- Visitor
I have been trying to set up a batch file listener in jboss/T24 R11 (Model Bank) with no success.
The instructions I have, in summary are:
1. Create a t24ConnectionFactory in the t24-ds.xml
(I copied an existing one and changed the host and port numbers.)
<jndi-name>jca/t24ConnectionFactory</jndi-name>
<rar-name>tocfT24ra-ra.rar</rar-name>
<connection-definition>com.temenos.tocf.t24ra.T24ConnectionFactory</connection-definition>
<config-property name="hosts" type="java.lang.String">127.0.0.1</config-property>
<config-property name="ports" type="java.lang.String">9696</config-property>
....
<config-property name="envVariables" type="java.lang.String">OFS_SOURCE=BFL.PROCESS</config-property>
2. Create t24OFSQueue and t24OFSReplyQueue created in the t24-destinations-service.xml - Done
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSQueue">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=t24OFSReplyQueue">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
3. Edit tcserver.xml present under the tocfplugin-ra.rar - Done (Left it as is. Looks like it was already well set up as per instructions)
4. Activate Listener in tocflistener-ejb.jar - Done. Again, no modifications, was ok as is
5: Start jagent and place file(s) in the OFS Request Folder (as set up in the listener config)
I put the file in the ofsrequest folder and the jboss log showed some activity:
13:09:09,615 INFO [STDOUT] 13:09:09,615 INFO [batchfilelistener] Processing
file 'C:\Temenos\ModelBank-R11\3rdParty\jboss\temp\sv\ofsrequests\ENQ3.tpr'
That's as far as it goes :(
However, the file was moved to the ofsresponse folder with the error "OFSERROR_TIMEOUT"
My concern is that there is nowhere in the setup files that I mention the connection factory that I set up in the t24-ds.xml.
In the (older) tcserver setup, at least in tcserver.xml you do mention the path to tSS and the OFS.SOURCE record to use. In the jboss/tocf setup, the connection is through jbase_agent. I think there should be a place where I mention at least the jdni name (jca/t24ConnectionFactory) for the listener to know which host, port and OFS.SOURCE record to use. Right??
Env: jboss 4.3 GA
jbase - TAFC R11
T24 - R11 Model Bank
OFS.SOURCE: BFL.PROCESS
SOURCE.NAME....... BFL.PROCESS
1 DESCRIPTION....... File Listener Process
2 SOURCE.TYPE....... TELNET
3. 1 LOGIN.ID....... ANY
14 LOG.DETAIL.LEVEL.. NONE
24 SYNTAX.TYPE....... OFS
26 GENERIC.USER...... INPUTTER
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
- Posts: 2859
- Thank you received: 649
- location of tcserver.xml present under the tocfplugin-ra.rar (not something like \TCServer\conf\tcserver.xml ?)
- the LISTENER should point to an ADAPTER, what is defined there ?
Please Log in or Create an account to join the conversation.
- MasterL
- Topic Author
- Visitor
<!-- Adapter definition -->
<ADAPTER id="T24.BFL" type="TOCF" active="true">
<MAX_SESSION>5</MAX_SESSION>
<MIN_SESSION>5</MIN_SESSION>
<TIMEOUT>60</TIMEOUT>
</ADAPTER>
<!-- Listener definition -->
<LISTENER id="BFL" type="batchfilelistener" active="true">
<ADAPTERID>T24.BFL</ADAPTERID>
<DIR_IN>C:\Temenos\ModelBank-R11\3rdParty\jboss\temp\sv\ofsrequests</DIR_IN>
<DIR_OUT>C:\Temenos\ModelBank-R11\3rdParty\jboss\temp\sv\ofsresponses</DIR_OUT>
<DIR_ERR>C:\Temenos\ModelBank-R11\3rdParty\jboss\temp\sv\ofserrors</DIR_ERR>
<MAX_PROCESS>0</MAX_PROCESS>
<EXTENSION_INDEX>idx</EXTENSION_INDEX>
<EXTENSION_TOPROCESS>tpr</EXTENSION_TOPROCESS>
<EXTENSION_PROCESSED>pro</EXTENSION_PROCESSED>
<EXTENSION_ERROR>err</EXTENSION_ERROR>
<EXTENSION_RESPONSE>rsp</EXTENSION_RESPONSE>
<REQ_SEPARATOR>lf</REQ_SEPARATOR>
<SORT_DIRECTORY>true</SORT_DIRECTORY>
<DELETE_SOURCE>true</DELETE_SOURCE>
</LISTENER>
You can see here we dont define the connection to T24. Or the OFS.SOURCE parameter to use. This is what I believe I am missing - if I knew where to make the link between the two
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
- Posts: 2859
- Thank you received: 649
Don't you have a documentation in your TCServer\docs\plug-ins , e.g. PI-TOCFadapter.pdf
Please Log in or Create an account to join the conversation.
- MasterL
- Topic Author
- Visitor
I just cant see where I went wrong
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
- Posts: 2859
- Thank you received: 649
Please Log in or Create an account to join the conversation.
- MasterL
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
- Posts: 2859
- Thank you received: 649
When you google for type="TOCF" you'll find an example on pastie.org
Please Log in or Create an account to join the conversation.
- MasterL
- Topic Author
- Visitor
Jboss will be running on a separate machine. The whole point of TOCF was for the connectivity be via the jbase agent as opposed to tSS
Please Log in or Create an account to join the conversation.
- armin
- Offline
- Elite Member
- “So long - and thanks for all the fish!”
- Posts: 300
- Thank you received: 57
Please Log in or Create an account to join the conversation.
- MasterL
- Topic Author
- Visitor
I was hoping there is someone out (t)here who has a working environment utilising TOCF file and bacth file listeners on jboss. It doesn't necessarily have to be on jboss though; Websphere, etc can suffice since the initial setup will be similar irrespective of the AS, I presume.
Please Log in or Create an account to join the conversation.
- jpb
- Offline
- Moderator
- retired
- Posts: 2859
- Thank you received: 649
for <jndi-name>jca/t24ConnectionFactoryBFL</jndi-name>
<tx-connection-factory>
<jndi-name>jca/t24ConnectionFactoryBFL</jndi-name>
<rar-name>jremote-ra.rar</rar-name>
<connection-definition>com.jbase.jremote.JConnectionFactory</connection-definition>
<config-property name="host" type="java.lang.String">127.0.0.1</config-property>
<config-property name="port" type="int">20004</config-property>
<!-- If the agent is accepting SSL connections you can enable SSL -->
<config-property name="SSL" type="java.lang.String">false</config-property>
<!-- Enable compression if required -->
<config-property name="compression" type="java.lang.Boolean">false</config-property>
<config-property name="compression_threshold" type="int">1024</config-property>
<!-- configure environment variables -->
<config-property name="envVariables" type="java.lang.String">OFS_SOURCE=TELNET</config-property>
</tx-connection-factory>
</connection-factories>
Please Log in or Create an account to join the conversation.
- VigneshGautam
- Visitor
My concern is that there is nowhere in the setup files that I mention the connection factory that I set up in the t24-ds.xml.
This because you are relying on the preexisting connection factory which is already made available to be used for such setups.
Go to jboss\server\default\deploy\tocfee.ear\tocfOFSmessage-ejb.jar\META-INF\jboss.xml and you will find your connection factory smiling at you.
Since you already mention that you have followed all the procedure to setup the connection, just check if your OFS SOURCE is faithful enough to you.
From jShell, type
->tSS BFL.PROCESS
Now shoot some OFS messages and expect not to be shouted back at.
Please Log in or Create an account to join the conversation.
- MasterL
- Topic Author
- Visitor
The document(s) I was following were missing the OFSMessage-ejb editing stage.
I can happily report that I am now sorted. Thank you so much!!
Please Log in or Create an account to join the conversation.