Manually sets the JNDI environment. Another option is to set a jndi.property file in the classpath. (mandatory).
Jms.bdh
JmsSetJndiEnvironment( in sKey : string, in SValue : string);
Parameter | Description |
---|---|
sKey | The key of the JNDI environment |
sValue | The value of the JNDI environment |
transaction TInit var hPerf : number; begin JavaCreateJavaVM(); hPerf := JavaLoadObject("silk/performer/SilkPerformer"); JavaSetObject(JAVA_STATIC_METHOD, hPerf); ghJmsSampleObj := JavaLoadObject("JmsSample"); JavaFreeObject(hPerf); JmsSetJndiEnvironment(JNDI_NAMING_FACTORY_INITIAL_KEY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory"); JmsSetJndiEnvironment("java.naming.provider.url", "tcp://demo.borland.com:61616"); JmsSetJndiEnvironment("queue.TestQueue", csQueue); JmsInit("ConnectionFactory"); end TInit;
JmsSample.bdf, JmsSample.java