Skip to main content

Problem:

  • Product Name: VisiBroker
  • Product Version: 7.0 and 8.0
  • Product Component: VisiTransact / POA-Managed Transaction
  • Platform/OS Version: All

How do you enable debug logs when you need to know more details on the assembly process when PMT is using XA/Open API to configure database connection? See “XA resources configuration” on page 160 of VisiTransact Guide for more information.

Resolution:

Set the following "vbroker.cam.assembler.verbose=true" when running your server.

When VisiTransact with PMT is enabled, create_POA() will open the XA resource as specified in "vbroker.its.xadesc" property. It is an XML file to configure the database connection.

The following is a sample log snippet when setting "vbroker.cam.assembler.verbose=true":

 Tid# 1 Src# agent Msg# register provider to agent {* | /TEST_PMT_POA}
 Tid# 1 Src# agent Msg# register service /TEST_PMT_POA completed
 Tid# 1 Src# server Msg# Done creating poa with name TEST_PMT_POA.
<xa-resource
        name=default,
        xa-lib=null,
        xa-switch=xaosw,
        xa-conn-scope=thread,
        bqual=TEST_PMT_Branch
        <xa-connection name="dbTest" info="Oracle_XA Acc=P/test/??????????? SesTm=10 SqlNet=aaa.bbb.ccc DbgFl=0x07 Threads=true DB=db_TEST_DBName Loose_Coupling=true"/>
<xa-resource-alias name='TEST_PMT' xa-resource='default'/>
:
 Tid# 13 Src# se Msg# Make the threadpool perform work.
 Tid# 13 Src# se Msg# Starting a worker thread.
 Tid# 13 Src# server Msg# GIOP::Request recieved, performing request.
VISXAConn::Exception(op=xa_open, ret=-5)
Exception(type: XA_RSRC_ERR) XA resource error, [xa-resource name=default][xa-connection name=dbTest][xa_open() return code=-5], 10
 Tid# 13 Src# server Msg# CORBA_Exception, returning the exception in reply.
 Tid# 13 Src# connection Msg# Wrote 84 bytes, 0 bytes remaining. fd=25

In this example, when create_POA() is called, it parses the XML and displays it to the standard output. When a client was trying to connect to the server, the server got an exception with debug logs of the xa_open() error code -5 which is defined as:

#define XAER_INVAL -5 /* invalid arguments were given */

Refer to page 42 of XA Specification for more details.

 

#PMT
#VisiTransact
#debugging
#logging
#VisiBroker
#xa
#TransactionService
#Security