Oracle9i Application Developer's Guide - Advanced Queuing Release 1 (9.0.1) Part Number A88890-02 |
|
JMS Administrative Interface: Basic Operations, 8 of 40
Register a queue/topic connection factory through LDAP with JDBC connection parameters to LDAP.
registerConnectionFactory
is a static method. To successfully register the connection factory, the hashtable passed to registerConnectionFactory
must contain all the information to establish a valid connection to the LDAP server. Furthermore, the connection must have write access to the connection factory entries in the LDAP server (which requires the LDAP user to be either the database itself or be granted global_aq_user_role
). After registration, look up the connection factory using JNDI.
See Java (JDBC): Oracle9i Supplied Java Packages Reference, oracle.jms, AQjmsFactory.registerConnectionFactory.
Hashtable env = new Hashtable(5, 0.75f); /* 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("searchbase", "cn=db1,cn=Oraclecontext,cn=acme,cn=com"); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=db1aqadmin,cn=acme,cn=com"); env.put(Context.SECURITY_CREDENTIALS, "welcome"); AQjmsFactory.registerConnectionFactory(env, "queue_conn1", "sun-123", "db1", 1521, "thin", "queue");
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|