ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » MQ and Oracle with managed code

Post new topic  Reply to topic
 MQ and Oracle with managed code « View previous topic :: View next topic » 
Author Message
venci
PostPosted: Mon Jan 22, 2007 5:03 am    Post subject: MQ and Oracle with managed code Reply with quote

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
View user's profile Send private message
mvic
PostPosted: Mon Jan 22, 2007 12:42 pm    Post subject: Re: MQ and Oracle with managed code Reply with quote

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
View user's profile Send private message
venci
PostPosted: Mon Jan 22, 2007 11:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
mvic
PostPosted: Tue Jan 23, 2007 2:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQ and Oracle with managed code
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.