AdminObjectFinder.java example for IBM WebsphereMQ
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Use the following code to create an AdminObjectFinder.java file IBM WebsphereMQ:
|
Where:
- env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory")
- Specifies the name of the context factory class for WebSphereMQ.Note: This example assumes that JNDI .bindings file is placed at a physical location in the FileSystem and thus is referred to as RefFileSystemContextFactory. This .binding file contains attributes that are used to create a ConnectionFactory object and other JNDI resources. For WebSphereMQ, the attributes to create a connection factory resides in a .bindings file.
- env.put(Context.PROVIDER_URL, "file:/C:/JNDI")
- Specifies the location of the JNDI .bindings file. For WebSphereMQ, the location of .bindings file.
- env.put(Context.SECURITY_PRINCIPAL, "username"); env.put(Context.SECURITY_CREDENTIALS, "password")
- Specifies the security credentials to access the MQService.
Note:
- The jmsfromABL.AdminObjectFinder name is mandatory in the class file.
- The class and the get...() methods must be declared as a public element.