NOTE: tnt4j-streams-ibm-b2bi
version 2.x
migrated to Java 11.
Latest Java 8 compliant tnt4j-streams-ibm-b2bi
version is 1.0.x
.
NOTE: tnt4j-streams-ibm-b2bi
version 1.0.26
migrated logger to log4j2
. In case you have changed default tnt4j-streams-ibm-b2bi
logger configuration using previous tnt4j-streams-ibm-b2bi
versions, please check new logger configuration
file log4j2.xml.
Log4j2
supports configuration defined inXML
,JSON
,YAML
andproperties
formats (NOTE:Log4j2
XML
andproperties
formats differs from ones used byLog4j12
). PreviousLog4j12
log4j.properties
file defined configuration shall be migrated into one of these new configuration definition formats.Log4j2
changed configuration file definition System property name fromlog4j.configuration
tolog4j2.configurationFile
.- See Log4j 2.x migration guide and Log4j 2.x configuration reference for more details
Log4j2
used asynchronous logging techniques noticeably increases application performance comparing toLog4j12
. See Log4j 2.x Asynchronous Logging Performance report as reference.
TNT4J Streams for IBM Sterling B2B Integrator.
TNT4J-Streams-IBM-B2Bi is extension of TNT4J-Streams to give ability of streaming IBM Sterling B2B Integrator events as activity events to meshIQ.
TNT4J-Streams-IBM-B2Bi is under Apache v2.0 license.
This document covers just information specific to TNT4J-Streams-IBM-B2Bi project. Detailed information on TNT4J-Streams can be found in README document.
- Plugs into IBM Sterling B2B Integrator as
com.sterlingcommerce.woodstock.event.EventListener
.
Many components in the B2Bi/SFG system generate events during the course of normal processing. In the case of SFG, all the visibility data shown in the SFG tracking UI is raised as event data and sent to jKoolCloud via an event listener. Each event is sent through an in-memory concurrent queue data structure.
Protocol adapters also generate events during connect, disconnect and file transfer.
- Select File->Import...->Maven->Existing Maven Projects
- Click 'Next'
- In 'Root directory' field select path of directory where you have downloaded (checked out from git) TNT4J-Streams project
- Click 'OK'
- Dialog fills in with project modules details
- Click 'Finish'
Also see TNT4J-Streams README document chapter 'Running TNT4J-Streams'.
- As API integrated into IBM Sterling B2B Integrator
-
Build a jar file containing the implementation (including the complete package directory structure)
-
Run IBM Sterling B2B Integrator
InstallThirdParty.sh
to put the new jars and properties into the Sterling classpath. While installing, vendor isJKool
and version is1.0
. -
Once an event listener is created and made available on the classpath, a simple property change is needed to enable the event listener. Update IBM Sterling B2B Integrator configuration customer_overrides.properties to enable TNT4J-Streams-IBM-B2Bi listener:
Listener.Class.jkoolcloud=com.jkoolcloud.tnt4j.streams.custom.interceptors.castiron.B2BiSfgEventListener
Note: you can comment out this entry to disable the listener.
-
Write stream parsers configuration file. See 'Streams configuration' chapter for more details
-
Configure Java system properties for IBM Sterling B2B Integrator startup:
tnt4j.streams.config
- referring parser configuration. See./samples/B2Bi/tnt4j-streams-ibm-b2bi.properties
log4j2.configurationFile
- referring logger configuration. See `./config/log4j2.xmltnt4j.config
- referring TNT4J configuration. See./config/tnt4j.properties
NOTE: Do not forget to set cloud TOKEN value by changing propertyevent.sink.factory.Token
.
-
NOTE: in case listener does not start - check if tnt4j-streams-ibm-b2bi
jar is loaded, and configuration properties files are in
/SI/install/properties/jkool/1.0/
directory. There should be 3 of them: tnt4j.properties
, tnt4j-streams-ibm-b2bi.properties
and
log4j2.xml
.
You need to set up Sterling logger, failed to do so all log messages are forwarded to system.log.
You can configure logger in your customer_overrides.properties:
logService.jkool.logfilename=C:/IBM/SI/install/logs/jkool.log
logService.jkool.loglevel=ALL
- JDK 1.8+
- Apache Maven 3
- TNT4J-Streams
core
module in particular
All other required dependencies are defined in project pom.xml
file. If Maven is running online mode it should download these
defined dependencies automatically.
NOTE: If you have build and installed TNT4J-Streams into your local Maven repository, you don't need to install it manually.
Some of required and optional dependencies may be not available in public Maven Repository. In this
case we would recommend downloading those dependencies manually into lib
directory and install into local Maven repository by
running Maven script lib/pom.xml
using initialize
goal.
NOTE: TNT4J-Streams-IBM-B2Bi
project will be ready to build only when manually downloaded libraries will be installed to local Maven
repository.
What to download manually or copy from your existing IBM Sterling B2B Integrator installation:
- platform_ifcbase
- install_foundation (O)
Download the above libraries and place into the tnt4j-streams-ibm-b2bi/lib
directory like this:
lib
|- platform_ifcbase.jar
|- install_foundation.jar (O)
(O) marked libraries are optional
NOTE: also see TNT4J-Streams README document chapter 'Manually installed dependencies'.
- To build the project, run Maven goals
clean package
- To build the project and install to local repo, run Maven goals
clean install
- To make distributable release assemblies use one of profiles:
pack-bin
orpack-all
:- containing only binary distribution: run
mvn -P pack-bin
- containing binary, source and javadoc distribution: run
mvn -P pack-all
- containing only binary distribution: run
Release assemblies are built to build/
directory.
NOTE: sometimes Maven fails to correctly handle dependencies. If dependency configuration looks fine, but Maven still complains about
missing dependencies try to delete local Maven repository by hand: e.g., on MS Windows delete contents
of c:\Users\[username]\.m2\repository
directory.
So resuming build process quick "how to build" steps would be like this:
- download
platform_ifcbase.jar
andinstall_foundation.jar
totnt4j-streams-ibm-b2bi/lib
directory. - install manually managed dependencies from
tnt4j-streams-ibm-b2bi/lib
directory runningmvn initialize
. - if
tnt4j-streams
not built yet build it: runmvn clean install
for apom.xml
file located intnt4j-streams
directory. - now you can build
tnt4j-streams-ibm-b2bi
: runmvn clean install
for apom.xml
file located intnt4j-streams-ibm-b2bi
directory.
See 'Running TNT4J-Streams-IBM-B2Bi' chapter section 'TNT4J-Streams-IBM-B2Bi can be run'.
Maven tests run is disabled by default. To enable Maven to run tests set Maven command line argument
-DskipTests=false
.
- in
ibm-b2bi
module run JUnit test suite namedAllB2BiStreamTests
It's handy to check parser configuration before deploying it to Sterling machine. To do so run runTest.bat/runTest.sh
and check the logs
generated either jKoolCloud to see that listener behaves like expected. Ensure that you've changed TOKEN in tnt4j.properties
. Test events
situated in samples/B2Bi/events
directory. You could add or change these as you like. Edit bat/sh
script if your environment
configuration properties values are different.