With the latest release of the binary scanner, two new enhancements are available that can help application developers and administrators outside the scope of a migration. Have you developed a new application for Liberty or moved one over from another application server and are wondering what features you need to configure in the
server.xml file? Or maybe you are supporting a legacy application that has grown over time and you have no idea what is in it and what problems are lurking? Intrigued? Keep reading to see how the binary scanner can help you.
Need help configuring your Liberty server?
Use the featureList action provided by the binary scanner as shown here:
java -jar binaryAppScanner.jar /apps/myApp.ear --featureList
That command produces a Liberty server configuration file named
myApp.ear_FeatureList.xml in the current directory. You can run the command against a single
.war file, or against a folder containing multiple files of those types. The generated file contains the features required by the application based on scanning the
.class files and deployment descriptors. The file contents look similar to the following:
<server description="Feature list generated by binaryAppScanner"> <featureManager> <!--The following features are available in all editions of Liberty.--> <feature>ejbLite-3.2</feature> <feature>javaMail-1.5</feature> <feature>jdbc-4.1</feature> <feature>jndi-1.0</feature> <feature>jpa-2.1</feature> <feature>jsp-2.3</feature> <feature>servlet-3.1</feature> <!--The following features are available in Liberty base and above.--> <feature>ejbRemote-3.2</feature> </featureManager> </server>
You can reference the file in your Liberty
server.xml file using the
<include> element, or just copy the contents over.
Have no idea what is in your application?
Use the inventory action as follows:
java -jar binaryAppScanner.jar /apps/myApp.war --inventory
This command generates an Application Inventory Report detailing the structure and content of your application. Furthermore, it identifies potential deployment problems related to issues such as:
- Duplicate classes within the application
- Java EE or SE classes that are packaged with the application
- Open Source Software (OSS) classes that are packaged with the application
- WebSphere classes that are packaged with the application
- Unused archives that are packaged with the application
- Dependent classes that are not packaged with the application
If you are updating your application or moving your application (different application server, hardware or operating system), consider using the inventory report to detect potential problems before deploying your application. Save yourself some time and trouble. If you’ve already deployed your application and are having some issues, it’s not too late to give this tool a try. Here is an excerpt from an inventory report identifying WebSphere classes packaged with the application:
Let us know how these enhancements help you, and what else you would like to see. We always welcome feedback!