01.01.2013 Views

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

CICS Transaction Gateway V5 The WebSphere ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

set CCI trace<br />

switch (trace)<br />

{<br />

case 0 :<br />

mcf.setTraceLevel(new Integer(mcf.RAS_TRACE_OFF));<br />

break;<br />

case 1 :<br />

mcf.setTraceLevel(new Integer(mcf.RAS_TRACE_ERROR_EXCEPTION));<br />

break;<br />

case 2 :<br />

mcf.setTraceLevel(new Integer(mcf.RAS_TRACE_ENTRY_EXIT));<br />

break;<br />

case 3 :<br />

mcf.setTraceLevel(new Integer(mcf.RAS_TRACE_INTERNAL));<br />

break;<br />

default :<br />

}<br />

// set trace output to stderr<br />

mcf.setLogWriter(new PrintWriter(System.err));<br />

ConnectionFactory cf = (ConnectionFactory) mcf.createConnectionFactory();<br />

eciConn = cf.getConnection();<br />

eciInt = eciConn.createInteraction();<br />

Figure B-41 Setting CCI trace and getting a Connection and Interaction<br />

<strong>The</strong> final method in our session bean is dropConnection(), which closes our<br />

connection to <strong>CICS</strong>. As shown in Figure B-42 on page 376 we call the close()<br />

method on the Connection and Interaction, then set the references to null.<br />

Appendix B. Sample applications 375

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

Saved successfully!

Ooh no, something went wrong!