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红皮书。