|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ and Oracle with managed code |
« View previous topic :: View next topic » |
Author |
Message
|
venci |
Posted: Mon Jan 22, 2007 5:03 am Post subject: MQ and Oracle with managed code |
|
|
Newbie
Joined: 11 Jan 2007 Posts: 4 Location: Sofia,Bulgaria, EU
|
Hello guys,
I setup Oracle and MQ for XA protocol though registry XAResourceManager stanza. I made few transactions through ESQL oracle precompiler and in C with OCI through xaoEnv and xaoSvcCtx .Everything is fine.Now I want to migrate to .net
I don't know how to reference connection object created after starting global unit of work with begin method. I can see that Oracle server is contacted from my thread. I just cant find that connection.
Please help |
|
Back to top |
|
 |
mvic |
Posted: Mon Jan 22, 2007 12:42 pm Post subject: Re: MQ and Oracle with managed code |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
venci wrote: |
I can see that Oracle server is contacted from my thread. I just cant find that connection.
Please help |
Please would you provide more details? How do you see the server is "contacted" ? How / where did you look to find the connection? How does it appear different between C/SQL and .NET ? |
|
Back to top |
|
 |
venci |
Posted: Mon Jan 22, 2007 11:49 pm Post subject: |
|
|
Newbie
Joined: 11 Jan 2007 Posts: 4 Location: Sofia,Bulgaria, EU
|
this is my code is C
Code: |
/* Start a new transaction */
MQBEGIN (hConn, &bo, &lCompCode, &lReason);
/* Open the queue */
MQOPEN(hConn, &od, lOptions, &hObj, &lCompCode, &lReason);
/* Obtain the environment handle for the XA connection */
envhp = xaoEnv("dbname");
/* Obtain the service context handle for the XA connection */
svchp = xaoSvcCtx("dbname");
/* Allocate a SQL statement handle */
status = OCIHandleAlloc((dvoid*)envhp, (dvoid**)&stmthp, OCI_HTYPE_STMT,
(size_t)0, (dvoid **)0);
/* Execute the statement */
status = OCIStmtExecute(svchp, stmthp, errhp, (ub4)1, (ub4)0,
(CONST OCISnapshot*)NULL, (OCISnapshot*)NULL, OCI_DEFAULT);
|
when you call MQBegin QM establishes connection with my Oracle server.
I can see it through netstat and SYS.V$Session view in oracle.
V$Session provides client thread and process ID.
My question is how can I get this connection without those pesky OCI
calls from C# ? Something like in java qmgr.getJDBCConnection and OracleXADataSource ds ? What is their equivalent in C# ?
Thanks for any help, |
|
Back to top |
|
 |
mvic |
Posted: Tue Jan 23, 2007 2:49 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
venci wrote: |
My question is how can I get this connection without those pesky OCI
calls from C# ? Something like in java qmgr.getJDBCConnection and OracleXADataSource ds ? What is their equivalent in C# ?
Thanks for any help, |
You may need to search the Oracle manuals and/or ask on an Oracle forum for an answer I think. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|