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 » how to write a fastpath application

Post new topic  Reply to topic
 how to write a fastpath application « View previous topic :: View next topic » 
Author Message
adder
PostPosted: Fri Apr 14, 2006 11:32 am    Post subject: how to write a fastpath application Reply with quote

Apprentice

Joined: 06 Dec 2005
Posts: 43

I just change code based on imqsput.cpp as following, but when I run this application, an connection error 2012 got, which is MQRC_ENVIRONMENT_ERROR. what other things need to do beside
mgr.setConnectOptions(MQCNO_FASTPATH_BINDING); thanks

Code:
mgr.setConnectOptions(MQCNO_FASTPATH_BINDING);
  if ( ! mgr.connect( ) ) {

    /* stop if it failed */
    printf( "ImqQueueManager::connect ended with reason code %d\n",
            (int)mgr.reasonCode( ) );
    exit( (int)mgr.reasonCode( ) );
  }


Last edited by adder on Fri Apr 14, 2006 1:24 pm; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
wschutz
PostPosted: Fri Apr 14, 2006 11:53 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Why do you want to do this? Generally speaking, its very dangerous to do fast_path binding . You do have to potential to destroy qmgr objects.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
adder
PostPosted: Fri Apr 14, 2006 12:20 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Dec 2005
Posts: 43

wschutz wrote:
Why do you want to do this? Generally speaking, its very dangerous to do fast_path binding . You do have to potential to destroy qmgr objects.


yes, I know that, but I just write some test application, I am sure no importance data in MQ. so don't worry about that, thanks
Back to top
View user's profile Send private message MSN Messenger
wschutz
PostPosted: Fri Apr 14, 2006 12:50 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Okay, as long as you understand that you could destory the qmgr....

how did you link the program? (can you paste the link cmd?) Is it a client or server set of MQ libraries that you used?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
adder
PostPosted: Fri Apr 14, 2006 1:05 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Dec 2005
Posts: 43

wschutz wrote:
Okay, as long as you understand that you could destory the qmgr....

how did you link the program? (can you paste the link cmd?) Is it a client or server set of MQ libraries that you used?


server application,I have try threaded one and unthreaded one
Code:

g++ -o fastpath fastpath.cpp  -fsigned-char -I/opt/mqm/inc -L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -limqs23gl_r -limqb23gl_r -lmqm_r

g++ -o fastpath fastpath.cpp -fsigned-char -I/opt/mqm/inc -L/opt/mqm/lib -Wl,-rpath=/opt/mqm/lib -Wl,-rpath=/usr/lib -limqs23gl -limqb23gl -lmqm


just copy from redbook "WebSphere MQ Using C++", and platform is linux
when using unthreaded lib, run application , output is
[zengjia@wbi08 src]$ ./fastpath pingq ITQM
Sample IMQSPUT start
A non-threaded application tried to run as a Trusted application.
ImqQueueManager::connect ended with reason code 2012

when using threaded lib, run application , output is
[zengjia@wbi08 src]$ ./fastpath pingq ITQM
Sample IMQSPUT start
ImqQueueManager::connect ended with reason code 2012
Back to top
View user's profile Send private message MSN Messenger
wschutz
PostPosted: Fri Apr 14, 2006 1:14 pm    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

More questions.... what version and csd of MQ...also, if you don't include the "mgr.setConnectOptions(MQCNO_FASTPATH_BINDING); " in the program and rebuild it, I assume it runs okay?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
adder
PostPosted: Fri Apr 14, 2006 1:24 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Dec 2005
Posts: 43

wschutz wrote:
More questions.... what version and csd of MQ...also, if you don't include the "mgr.setConnectOptions(MQCNO_FASTPATH_BINDING); " in the program and rebuild it, I assume it runs okay?


[zengjia@wbi08 samp]$ dspmqver
Name: WebSphere MQ
Version: 530.11 CSD11
CMVC level: p530-11-L050802
BuildType: IKAP - (Production)

[zengjia@wbi08 src]$ id
uid=512(zengjia) gid=512(zengjia) groups=512(zengjia),501(mqm)


yes, if don't include mgr.setConnectOptions, that's just imqsput.cpp, the sample c++ code provided by MQ.
Back to top
View user's profile Send private message MSN Messenger
adder
PostPosted: Mon Apr 17, 2006 3:51 pm    Post subject: Reply with quote

Apprentice

Joined: 06 Dec 2005
Posts: 43

Have anybody write a fastpath application before, please help me, thanks very much.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » how to write a fastpath application
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.