通常,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()
所以會有點依賴於你的應用程序是如何包裝它的這些方法將是最合適的。