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.

Enqueuing and Dequeuing Of Messages<br />

if (rset2.next())<br />

{<br />

/* Get message contents */<br />

sPayl2 = (LobMessage)rset2.getCustomDatum(1,<br />

((CustomDatumFactory)LobMessage.getFactory()));<br />

/* Get BLOB locator */<br />

b2 = sPayl2.getData();<br />

/* Popuate the BLOB */<br />

if (b2 == null)<br />

{<br />

System.out.println("Blob select null");<br />

}<br />

if((i%3)==0)<br />

{<br />

b_len = b2.putBytes(1000,b_array);<br />

}<br />

else<br />

{<br />

b_len = b2.putBytes(1,b_array);<br />

}<br />

/* Get CLOB locator */<br />

c2 = sPayl2.getCdata();<br />

/* Populate the CLOB */<br />

if (c2 == null)<br />

{<br />

System.out.println("Clob select null");<br />

}<br />

if((i%4)==0)<br />

{<br />

c_len = c2.putChars(2500,c_array);<br />

}<br />

else<br />

{<br />

c_len = c2.putChars(1,c_array);<br />

}<br />

}<br />

}<br />

catch (Exception ex)<br />

{<br />

System.out.println("Blob or Clob exception: " + ex);<br />

}<br />

A-60 <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!