The X9Ware SDK incorporates X9Utilities within its overall framework, and specifically from the perspective of a Java application. SDK customers can invoke X9Utilities in one of two ways:
- From a Java program that you develop, which invokes the X9Utilities classes within the SDK, using the SDK jar itself. When used in this manner, you are invoking utility functions from your own application program. This allows you to incorporate these proven functions directly into your application, but also requires knowledge of the overall operation of X9Utilities and how you can integrate it into your application. We have designed X9UtilMain in such a manner to make this possible.
- Using your JVM, our SDK jar, and javaw.exe, which essentially is running X9Utilities on a command line basis. It is important to note that we do not provide the X9Utilities installers as part of the freely embedded offering; you must run using the SDK jar itself. The X9Utilities installer is a separate product and must be licensed separately. This distinction emphasizes that while the SDK is a tool that can be used by Java developers to embed our utility functions within their programs, X9Utilities remains as a separate product. If you need the X9Utilities installer itself, then it must be purchased separately (we will provide a bundled discount).
The X9Ware SDK Includes X9Utilities, which consists of the Java classes that are used to build and implement our X9Utilities product. Hence SDK applications can directly invoke X9Utilities functions, as documented in the X9Utilities User Guide. These functions would typically be invoked through the X9Utilities main class, which is X9UtilMain. When invoked in such a manner, these functions will perform exactly as they do for X9Utilities. The only significant difference is that the system exit is not performed on completion of the X9Utilities run. A system log will still be created for each uniquely invoked run. Here are several more details around these capabilities:
- This embedded functionality would typically be invoked through X9UtilMain, similar to how X9Utilities is externally launched from the command line.
- It is also possible to directly invoke individual functions using the specific functional class(es) needed to execute that function, along with the X9UtilWorker helper class.
- Our implementation allows you to utilize SLF4J to specify your own logging framework, or use our default JUL (JDK) logger.
- In this usage scenario, you have X9Utilities on a Java “class” basis, meaning that you can invoke these functions from your Java applications. You can also run X9Utilities with a JVM using javaw.exe. However, we do not provide our X9Utilities installer, which remains as a separate product. If you need to use our X9Utilties installers (Windows, Jar, etc) then you will need to purchase a copy of X9Utilities. We will provide a bundled discount when this option is needed.
- This embedded version of X9Utilities does not include the utilities console. This is more of a technical issue, where the utilities console has a baseline requirement for Java 11 and not Java 8. Because of that, our build process for the utilities console flows through a different path. The utilities console is provided with X9Utilities itself, but not with the SDK.
All classes that comprise the X9Utilities product (other than the utilities console) are encapsulated within the SDK itself, and are exposed as part of the public SDK API. Consequently, a Java program can utilize these classes programatically (by that we mean from a Java program), either as individual utility functions, or by launching them through the main utility class.
The X9Utilities main class allows you to implement your preferred logging environment, through the SLF4J logging facade. For instance, you can use Log4J or LogBack, and not be tied to the JDK logger as is utilized by our distributed batch utilities product. Moreover, you have the flexibility to invoke X9Utilities multiple times within a single run unit or thread, enabling you to open the log, invoke one or more utility functions, monitor exit status, and make decisions regarding how to proceed with processing. For example, with this type of design, you could invoke a merge followed by an export. Using these proven tools, you can easily integrate your application code with one or more utility functions to build a more comprehensive solution tailored to your needs.
Use of specific X9Utilities functions within your applications may simplify your development process and shorten your development cycle. However, when you leverage these capabilities, you will need to be aware of how these classes are organized, and will be responsible for the implementation testing necessary to ensure compatibility within your runtime environment.
The high level code for X9Utilities is broken into several core classes:
- X9UtilMain contains the main() class and is responsible for initiation and termination and extends X9UtilBatch.
- X9UtilBatch implements common functions. All methods are public so they can be overridden as needed.
- X9UtilWorkUnit represents a single unit of work as performed within X9Utilities. Each worker function (write, export, validate, merge, compare, etc) is implemented as an independent class. These classes can be invoked directly or through X9UtilMain.
- This implementation is reusable, meaning that you can execute multiple and varying utility functions from your application.
- This implementation is thread safe, subject to your application being appropriately designed.
X9Ware does not guarantee that the technical design of these classes will remain the same. There may be significant change or even complete redesigns over a period of time. You need to be aware that this possibility does exist and may result in future work on your part.