09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Registering a Queue/Topic Connection Factory Through the Database—with JDBC Connection Parameters<br />

Purpose<br />

Register a queue/topic connection factory through the database with JDBC<br />

connection parameters to LDAP.<br />

Usage Notes<br />

registerConnectionFactory is a static method. To successfully register the<br />

connection factory, the DB connection passed to registerConnectionFactory<br />

must be granted AQ_ADMINISTRATOR_ROLE. After registration, look up the<br />

connection factory using JNDI.<br />

Syntax<br />

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

AQjmsFactory.registerConnectionFactory.<br />

Example<br />

String url;<br />

java.sql.connection db_conn;<br />

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

db_conn = DriverManager.getConnection(url, "scott", "tiger");<br />

AQjmsFactory.registerConnectionFactory(db_conn, "queue_conn1", "sun-123",<br />

"db1", 1521, "thin", "queue");<br />

JMS Administrative Interface: Basic Operations 13-5

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

Saved successfully!

Ooh no, something went wrong!