通常,Solace API版本包含在Solace jar的名称中。例如:sol-jcsmp-7.0.0.63.jar。
在Solace jar的内部,META-INF目录中还会有一个清单文件,其中包含版本信息。例如:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.7.0_17-b02 (Oracle Corporation)
Name: com/solacesystems/jcsmp
Specification-Title: Solace Systems Messaging API for Java
Specification-Version: 7.0.0.63
Specification-Vendor: Solace Systems, Inc.
Implementation-Title: com.solacesystems.jcsmp
Implementation-Version: 7.0.0.63
Implementation-Vendor: Solace Systems, Inc.
此外,还可以对应用程序来获得安慰API版本程序如下:
JCSMPRuntime.onlyInstance().getVersion().getSwVersion()
所以会有点依赖于你的应用程序是如何包装它的这些方法将是最合适的。