Q1)
How can I use this .bindings file into my client application system?
的.bindings文件必須放在可通過客戶端系統訪問文件服務器上。例如,將.bindings文件放在文件服務器MyFileSvr的D:\ JNDI-Directory文件夾中。然後在你的客戶端機器上D:\文件夾必須作爲驅動器裝入,例如F驅動器。然後在你的應用程序,您可以參考.bindings文件
// Instantiate the initial context
String contextFactory = "com.sun.jndi.fscontext.RefFSContextFactory";
Hashtable<String, String> environment = new Hashtable<String, String>();
environment.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory);
environment.put(Context.PROVIDER_URL, "file:/F:/JNDI-Directory");
Context context = new InitialDirContext(environment);
System.out.println("Initial context found!");
// Lookup the connection factory
JmsConnectionFactory cf = (JmsConnectionFactory) context.lookup(connectionFactoryFromJndi);
Q2)
Should the Client Application system contain the JMS Administerator to create the .bindings in the same system?or .bindings alone should be imported to the client system?
見上面Q1答案。將綁定文件保留在共享驅動器上以便多個客戶端應用程序可以訪問是一種很好的做法。
Q3)
If Filesystem is used,then a path specifying the .binding is given as Provider url.This provider url (EG: F:/JMS) seems to be the path present in JMS Provider system.If .bindings file imported in client system,then how the client can recognise the path of .bindings file?
再次看到Q1回答。
Q4)
And What is the purpose of having ServerConnection channel in the Connection Factories definition when MQClient mode is used? When the JMS client connects through JNDI bindings ,why Server Connection channel is required?
甲服務器連接通道限定用於MQ客戶端應用程序所要求的性能(JMS或其它)連接到一臺IBM MQ隊列管理器。在JNDI綁定連接工廠對象將有,除其他外,下面爲應用程序定義爲連接到一臺IBM MQ隊列管理器
1)主機名,其中隊列管理器正在運行
2)端口,其中隊列管理器正在監聽
3)服務器連接通道名稱。
4)隊列管理器名稱。
底線JNDI綁定和服務器連接通道不相同。
請仔細閱讀在線文檔以及MQ紅皮書。