...
| Code Block |
|---|
PoolingConnectionFactory myConnectionFactory = new PoolingConnectionFactory ();
...
myConnectionFactory.getDriverProperties().setProperty("name", "QueueConnectionFactory@router1");
myConnectionFactory.getDriverProperties().setProperty("initialContextFactory", "com.swiftmq.jndi.InitialContextFactoryImpl");
myConnectionFactory.getDriverProperties().setProperty("providerUrl", "smqp://localhost:4001/timeout=10000");
// set JNDI username / password
myConnectionFactory.getDriverProperties().setProperty("securityPrincipal", "jndiUser");
myConnectionFactory.getDriverProperties().setProperty("securityCredentials", "jndiPassword");
...
|
Other JNDI properties
Some new properties have been added in BTM 2.0.1 There are some other properties to make the JndiXAConnectionFactory more flexible:
- urlPkgPrefixes Used Use it to set the Context#URL_PKG_PREFIXES.
- narrowJndiObject Used Use it to indicate if PortableRemoteObject.narow() should be applied on the object fetched from JNDI.
- extraJndiProperties Extra JNDI environment properties added the the InitialContext.
...