Oracle9i Application Developer's Guide - Advanced Queuing Release 1 (9.0.1) Part Number A88890-02 |
|
JMS Administrative Interface: Basic Operations, 18 of 40
Get a queue/topic connection factory from LDAP.
Hashtable env = new Hashtable(5, 0.75f); DirContext ctx; queueConnectionFactory qc_fact; /* the following statements set in hashtable env: * service provider package * the URL of the ldap server * the distinguished name of the database server * the authentication method (simple) * the LDAP user name * the LDAP user password */ env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://sun-456:389"); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=db1aquser1,cn=acme,cn=com"); env.put(Context.SECURITY_CREDENTIALS, "welcome"); ctx = new InitialDirContext(env); ctx = (DirContext)ctx.lookup("cn=OracleDBConnections,cn=db1,cn=Oraclecontext,cn=acme,c n=com"); qc_fact = (queueConnectionFactory)ctx.lookup("cn=queue_conn1");
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|