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.

Working with Messaging Gateway<br />

describes how to monitor the Messaging Gateway agent. An example configuration<br />

is provided to illustrate propagating messages from an AQ queue with payload<br />

type RAW to an MQSeries queue. All commands in the examples must be run as a<br />

user who has been granted MGW_ADMINISTRATOR_ROLE, except for the commands<br />

to create transformations.<br />

Managing the Messaging Gateway Agent<br />

The Messaging Gateway agent runs as a process external to the database. To access<br />

<strong>Advanced</strong> <strong>Queuing</strong> and the Messaging Gateway administration packages, the<br />

Messaging Gateway agent needs to establish connections back to the database.<br />

Before starting, configuration information must be registered, including information<br />

used to connect to the database and set resource limits.<br />

Configuration<br />

The DBMS_MGWADM.DB_CONNECT_INFO procedure is used to configure Messaging<br />

Gateway with the name and password of the user that the Messaging Gateway<br />

agent will use for database connections, and the database connect string used to<br />

make the connection. The user must have been granted MGW_AGENT_ROLE before<br />

the Messaging Gateway agent can be started. If the database connect string is not<br />

specified, local connections are used by the Messaging Gateway agent.<br />

You can also call DBMS_MGWADM.DB_CONNECT_INFO to set new connection<br />

information when the Messaging Gateway agent is running.<br />

Setting New Connection Information: Example<br />

SQL> exec dbms_mgwadm.db_connect_info(‘mgwagent’, ‘mgwagent_password’,<br />

‘mydatabase’)<br />

The maximum number of connections in a connection pool available for the<br />

Messaging Gateway agent to connect to the database and the heap size, in<br />

megabytes, of the Messaging Gateway agent process can be set using DBMS_<br />

MGWADM.ALTER_AGENT. The number of connections in the connection pool can<br />

impact performance. The default values are 1 connection and 64 MB of memory.<br />

The following sets the number of database connections to 2 and the heap size to<br />

64M.<br />

SQL> exec dbms_mgwadm.alter_agent(2, 64)<br />

You can alter the maximum number of connections when the Messaging Gateway<br />

agent is running, but the value can only be increased. The maximum memory<br />

Messaging Gateway 18-13

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

Saved successfully!

Ooh no, something went wrong!