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.

See Also:<br />

Purpose<br />

Create a queue connection with an open JDBC connection.<br />

Usage Notes<br />

This is a static method.<br />

Creating a Queue Connection with an Open JDBC Connection<br />

Table 14–1 for a list of JMS operational interface basic<br />

<br />

operations<br />

"Class - oracle.jms.AQjmsQueueConnectionFactory" on<br />

<br />

page B-52<br />

"Creating a Queue Connection with Username/Password" on<br />

<br />

page 14-3<br />

"Creating a Queue Connection with Default Connection<br />

<br />

Factory Parameters" on page 14-6<br />

"Creating a Queue Connection with an Open<br />

<br />

<strong>Oracle</strong>OCIConnection Pool" on page 14-7<br />

Syntax<br />

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

AQjmsQueueConnectionFactory.createQueueConnection<br />

Example 1<br />

This method may be used if the user wants to use an existing JDBC connection (say<br />

from a connection pool) for JMS operations. In this case JMS will not open a new<br />

connection, but instead use the supplied JDBC connection to create the JMS<br />

QueueConnection object.<br />

Connection db_conn; /* previously opened JDBC connection */<br />

QueueConnection qc_conn = AQjmsQueueConnectionFactory.createQueueConnection(db_<br />

conn);<br />

Example 2<br />

This method is the only way to create a JMS QueueConnection when using JMS<br />

from java stored procedures inside the database (JDBC Server driver)<br />

<strong>Oracle</strong>Driver ora = new <strong>Oracle</strong>Driver();<br />

QueueConnection qc_conn =<br />

JMS Operational Interface: Basic Operations (Point-to-Point) 14-5

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

Saved successfully!

Ooh no, something went wrong!