09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Unregistering a Queue/Topic Connection Factory in LDAP Through LDAP<br />

must contain all the information to establish a valid connection to the LDAP server.<br />

Furthermore, the connection must have write access to the connection factory<br />

entries in the LDAP server (which requires the LDAP user to be either the database<br />

itself or be granted global_aq_user_role).<br />

Syntax<br />

See Java (JDBC): <strong>Oracle</strong>9i Supplied Java Packages Reference oracle.jms,<br />

AQjmsFactory.unregisterConnectionFactory.<br />

Example<br />

String url;<br />

Hashtable env = new Hashtable(5, 0.75f);<br />

/* the following statements set in hashtable env:<br />

* service provider package<br />

* the URL of the ldap server<br />

* the distinguished name of the database server<br />

* the authentication method (simple)<br />

* the LDAP user name<br />

* the LDAP user password<br />

*/<br />

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");<br />

env.put(Context.PROVIDER_URL, "ldap://sun-456:389");<br />

env.put("searchbase", "cn=db1,cn=<strong>Oracle</strong>context,cn=acme,cn=com");<br />

env.put(Context.SECURITY_AUTHENTICATION, "simple");<br />

env.put(Context.SECURITY_PRINCIPAL, "cn=db1aqadmin,cn=acme,cn=com");<br />

env.put(Context.SECURITY_CREDENTIALS, "welcome");<br />

url = "jdbc:oracle:thin:@sun-123:1521:db1";<br />

AQjmsFactory.unregisterConnectionFactory(env, "queue_conn1");<br />

13-16 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!