|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
IBM Supplied API Exit not working |
« View previous topic :: View next topic » |
Author |
Message
|
fjb_saper |
Posted: Thu Apr 13, 2006 1:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20766 Location: LI,NY
|
j1 wrote: |
Ok, I still cant seem to get it to work . IBM suggests to put the exit in /var/mqm/exits64, so heres the Compile statement :
Quote: |
/opt/SUNWspro/bin/cc -xarch=v9 -xcode=pic32 -mt -G -hEntryPoint -o /var/mqm/exits64/amqsaxe amqsaxe0.c -I/opt/mqm/inc -L/opt/mqm/lib64 -R/opt/mqm/lib64 -R/usr/lib/64 -lmqm -lmqmcs -lmqmzse -lmqmzf -lsocket -lnsl -ldl
and
/opt/SUNWspro/bin/cc -xarch=v8plus -xcode=pic32 -mt -G -hEntryPoint -o /var/mqm/exits/amqsaxe amqsaxe0.c -I/opt/mqm/inc -L/opt/mqm/lib -R/opt/mqm/lib -R/usr/lib/32 -lmqm -lmqmcs -lmqmzse -lmqmzf -lsocket -lnsl -ldl |
LD_LIBRARY_PATH includes /opt/mqm/lib:/opt/mqm/lib64
wschutz, what else did you do different. I put the exits in /var/mqm/exits64 and /var/mqm/exits since thats what the Documentation suggests and the samp64 drectory dosent exist on solaris. |
Should the first one have maybe -xcode=pic64 to go with -R /usr/lib/64 ???
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
wschutz |
Posted: Thu Apr 13, 2006 5:51 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I'll explain exactly what I did....
I created a directories called /home/wschutz/axe/32bit and /home/wschutz/axe/64bit ... I copied the sample amqsaxe0.c into /home/wschutz/axe/ and issued these compile commands:
cc -xarch=v9 -KPIC -mt -G -o 64bit/wmsaxe amqsaxe0.c -I/opt/mqm/inc -L/opt/mqm/lib64 -R/opt/mqm/lib64 -R/usr/lib/64 -lmqm -lmqmcs -lmqmzse -lmqmzf -lsocket -lnsl -ldl
and
cc -xarch=v8plus -KPIC -mt -G -o 32bit/wmsaxe amqsaxe0.c -I/opt/mqm/inc -L/opt/mqm/lib -R/opt/mqm/lib -R/usr/lib/ -lmqm -lmqmcs -lmqmzse -lmqmzf -lsocket -lnsl -ldl
Then, I modified the qm.ini thusly:
ExitPath:
ExitsDefaultPath=/home/wschutz/axe/32bit
ExitsDefaultPath64=/home/wschutz/axe/64bit
.....
ApiExitLocal:
Module=wmsaxe
Name=SampleAPIExit
Sequence=100
Function=EntryPoint
an endmqm and strmqm (along with setting the MQAPI variables as previously discussed) and it works fine.... _________________ -wayne |
|
Back to top |
|
 |
j1 |
Posted: Wed Apr 19, 2006 6:36 am Post subject: |
|
|
 Centurion
Joined: 23 Jun 2003 Posts: 139
|
Hello, At last, i got the API exit working. Apparently there is a bug in the code which is causing it to break at runtime. Looks like a pointer assignment is not working as expected. Will also be doing the needful to correct this in the IBM shipped code through an APAR etc ...
The commented out code is the old code
Code: |
char * strptr ( void *Pointer, char *format, char * StringBuffer )
{
if (myCheckPointer( Pointer, sizeof(void*)))
{
sprintf( StringBuffer, format, Pointer);
return StringBuffer;
}
else
return "(null)";
}
/*
char * strptr ( void *Pointer, char *format, char * StringBuffer )
{
if (myCheckPointer( Pointer, sizeof(void*)))
{
void **pPointer = Pointer;
sprintf( StringBuffer, format, *pPointer);
return StringBuffer;
}
else
return "(null)";
}*/
|
|
|
Back to top |
|
 |
wschutz |
Posted: Wed Apr 19, 2006 6:54 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Did you have to compile both a 32 and 64 bit version? _________________ -wayne |
|
Back to top |
|
 |
j1 |
Posted: Wed Apr 19, 2006 10:41 am Post subject: |
|
|
 Centurion
Joined: 23 Jun 2003 Posts: 139
|
Yes I did, though I have to check if we HAVE to compile both. Thanks for all the help. |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|