trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhu, Wen-Jun" <>
Subject 答复: Where is the session?
Date Wed, 24 Jan 2018 06:34:03 GMT

Actually I want to connect to a server when a connection from trafci is made in mxosrvr,.
And then close it when the connection is down.

As far as I can see, Sandhya's ContextCli::beginSession fits me well.


Wenjun Zhu.

发件人: Anoop Sharma [] 
发送时间: 2018年1月24日 13:31
主题: RE: Where is the session?


Is this only for when a connection is made to the master executor(mxosrvr) or does it also
apply when a child process (esp, udr server, arkcmp, ...) are started as well?

Is this for trafci only or for other clients as well, like odbc/jdbc apps, or sqlci or T2/T4?

Is this for the very first context that is created or also when other contexts are created/connected
as well through switchContext?

Will whatever action is being taken at beginSession be undone at endSession time when a session

Is this for first connection only by a particular client or does it need to be done whenever
a new session is reconnected by the same client?

Will be good if you can provide some details on what action need to be taken or what the context
is so a more relevant answer can be provided.


-----Original Message-----
From: Sandhya Sundaresan []
Sent: Tuesday, January 23, 2018 9:10 PM
Subject: RE: Where is the session?

Hi Wenjun,
  So you want to add code in the CLI layer to do something when a session is setup ? 
If so , set a breakpoint at : ContextCli::beginSession .  

-----Original Message-----
From: Zhu, Wen-Jun []
Sent: Tuesday, January 23, 2018 8:13 PM
Subject: Where is the session?


I'd like to do something when a session opens, i.e., when a client(like trafci) connects to
the Trafodion server.

I thought it was class ContextCli, as the following stacks showed:
#0  ContextCli::ContextCli (this=0x7f3286f97260, cliGlobals=0x2b0f2c0) at ../cli/Context.cpp:175
#1  0x00007f329afc1f2d in CliGlobals::init (this=0x2b0f2c0, espProcess=0, statsGlobals=0x0)
at ../cli/Globals.cpp:241
#2  0x00007f329afc154b in CliGlobals::CliGlobals (this=0x2b0f2c0, espProcess=0) at ../cli/Globals.cpp:113
#3  0x00007f329afc2a8f in CliGlobals::createCliGlobals (espProcess=0) at ../cli/Globals.cpp:477
#4  0x00007f329affd116 in CliNonPrivPrologue () at ../cli/CliExtern.cpp:891
#5  0x00007f329affd62c in SQL_EXEC_ClearDiagnostics (statement_id=0x0) at ../cli/CliExtern.cpp:1162
#6  0x00007f329d90d44f in SRVR::WSQL_EXEC_ClearDiagnostics (statement_id=0x0) at SQLWrapper.cpp:141
#7  0x0000000000585e70 in odbc_SQLSvc_InitializeDialogue_ame_ (objtag_=0x2afb820, call_id_=0x2afb878,
userDesc=0x7f3287a01750, inContext=0x7f3287a00bb0, dialo
gueId=63314812) at SrvrConnect.cpp:2170
#8  0x0000000000523e6d in SQLCONNECT_IOMessage (objtag_=0x2afb820, call_id_=0x2afb878) at
#9  0x00000000005262fd in DISPATCH_TCPIPRequest (objtag_=0x2afb820, call_id_=0x2afb878, operation_id=3001)
at Interface/odbcs_srvr.cpp:1865
#10 0x0000000000467d68 in BUILD_TCPIP_REQUEST (pnode=0x2afb820) at ../Common/TCPIPSystemSrvr.cpp:606
#11 0x0000000000467caf in PROCESS_TCPIP_REQUEST (pnode=0x2afb820) at ../Common/TCPIPSystemSrvr.cpp:584
#12 0x00000000004b7370 in CNSKListenerSrvr::CheckTCPIPRequest (this=0x29a91a0, ipnode=0x2afb820)
at Interface/Listener_srvr.cpp:64
#13 0x00000000004c928e in CNSKListenerSrvr::tcpip_listener (arg=0x29a91a0) at Interface/linux/Listener_srvr_ps.cpp:452
#14 0x00007f329b29166e in sb_thread_sthr_disp (pp_arg=0x2ad24f0) at threadl.cpp:270
#15 0x00007f329e023aa1 in start_thread () from /lib64/
#16 0x00007f329b594bcd in clone () from /lib64/ And
#0  ContextCli::ContextCli (this=0x7f3286f9d200, cliGlobals=0x2b0f2c0) at ../cli/Context.cpp:175
#1  0x00007f329afc2e26 in CliGlobals::createContext (this=0x2b0f2c0, newContext=@0x7f3275acd508)
at ../cli/Globals.cpp:524
#2  0x00007f329af600e2 in SQLCLI_CreateContext (cliGlobals=0x2b0f2c0, contextHandle=0x7f3275acdb8c,
sqlAuthId=0x0, mustBeZero=0) at ../cli/Cli.cpp:1201
#3  0x00007f329affd835 in SQL_EXEC_CreateContext (context_handle=0x7f3275acdb8c, sqlAuthId=0x0,
forFutureUse=0) at ../cli/CliExtern.cpp:1261
#4  0x00007f329d90d5ea in SRVR::WSQL_EXEC_CreateContext (context_handle=0x7f3275acdb8c, sqlAuthId=0x0,
future=0) at SQLWrapper.cpp:178
#5  0x000000000057c470 in SessionWatchDog (arg=0x0) at SrvrConnect.cpp:376
#6  0x00007f329e023aa1 in start_thread () from /lib64/
#7  0x00007f329b594bcd in clone () from /lib64/

But it is created only for the first time. So it is not the place to handle the session, right?

So my question is, where dose the session-handling class reside?


Wenjun Zhu

View raw message