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.

end;<br />

Working with Messaging Gateway<br />

Messaging Gateway does not impose a restriction on the number of links that you<br />

can configure.<br />

Altering a Messaging Gateway Link<br />

Some link information can be altered. For an MQSeries link, the max_<br />

connections, username, password, inbound_log_queue, and outbound_<br />

log_queue properties can be altered after creation. In the following example, the<br />

‘mqlink’ link created in "Creating a Messaging Gateway Link" is altered so that<br />

the max_connections and password properties are changed.<br />

If the type of a property is VARCHAR2, a value of DBMS_MGWADM.NO_CHANGE leaves<br />

the property unchanged. For properties of other types, a value of NULL leaves the<br />

property unchanged. Use the mgw_mqseries_properties.alter_construct<br />

function when altering an MQSeries link. This sets the appropriate values<br />

automatically. Then set the values that need to be changed.<br />

declare<br />

v_options sys.mgw_properties;<br />

v_prop sys.mgw_mqseries_properties;<br />

begin<br />

-- Alter certain MQSeries properties used for MQSeries.<br />

v_prop := sys.mgw_mqseries_properties.alter_construct();<br />

v_prop.max_connections := 2; -- max_connections increased<br />

v_prop.password := ‘newpasswd'; -- change password given to queue manager<br />

dbms_mgwadm.alter_msgsystem_link(<br />

linkname => 'mqlink', -- link name<br />

properties => v_prop, -- MQSeries driver properties<br />

-- options will not be changed<br />

comment => ‘link to queue manager, my.queue.manager. on my.host ‘);<br />

-- add comment<br />

end;<br />

You can alter link information when the Messaging Gateway agent is running or<br />

when it is not.<br />

See Also: <strong>Oracle</strong>9i Supplied PL/SQL Packages and Types Reference,<br />

DBMS_MGWADM, for restrictions on changes when the Messaging<br />

Gateway agent is running<br />

Messaging Gateway 18-17

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

Saved successfully!

Ooh no, something went wrong!