第一季度)
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);
第二季度)
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 的答案。最好将绑定文件保存在共享驱动器上,以便多个客户端应用程序可以访问。
第三季度)
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 的答案。
第四季度)
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 绑定和服务器连接通道不相同。
请通读 IBM MQ 的在线文档以及 MQ 红皮书。