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 » General IBM MQ Support » About Channel Exits

Post new topic  Reply to topic Goto page 1, 2  Next
 About Channel Exits « View previous topic :: View next topic » 
Author Message
ashu
PostPosted: Sun May 13, 2007 11:48 pm    Post subject: About Channel Exits Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

Hello,

I'm reading channel exits from the 'intercommunication' but some how i'am unable to grasp the 'Writing and Compiling' section of the Channel Exits chapter in the book.
I think might be if I see the actual code I might be able to infer something from it.
Can any one provide me with a pointer to some Java code for channel exits?

Thanks in advance.

Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon May 14, 2007 12:00 am    Post subject: Re: About Channel Exits Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

ashu wrote:
Hello,

I'm reading channel exits from the 'intercommunication' but some how i'am unable to grasp the 'Writing and Compiling' section of the Channel Exits chapter in the book.
I think might be if I see the actual code I might be able to infer something from it.
Can any one provide me with a pointer to some Java code for channel exits?

Thanks in advance.

Regards,


Server side exits you can write only with C.
I mean exits installed on MQ server machine which are referenced in channel attributes.

With JAVA you can write MQSendExit MQReceiveExit and MQSecurityExit (client side). Their interfaces are MQSendExit, MQReceiveExit, MQSecurityExit
Saying "client side" I mean your application where you connect to MQ with channel exit installed and you have to write code which lets you communicate with installed exits.

In your app you have to implement exit interface and place it in MQEnvironment dedicated fields.

Code:
MyMQExits myexits = new MyMQExits(); //your code
MQEnvironment.securityExit = myexits;
MQEnvironment.sendExit = myexits;
MQEnvironment.receiveExit = myexits;

_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
marcin.kasinski
PostPosted: Mon May 14, 2007 12:06 am    Post subject: Re: About Channel Exits Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

You can find little example in "Using JAVA" doc.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
ashu
PostPosted: Mon May 14, 2007 12:23 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

Hello Marcin,

Thank you for replying so promptly.

I have a little doubt, which I hope you might spend time to clarify...

Quote:
Saying "client side" I mean your application where you connect to MQ with channel exit installed and you have to write code which lets you communicate with installed exits.


Code:
MyMQExits myexits = new MyMQExits(); //your code
MQEnvironment.securityExit = myexits;
MQEnvironment.sendExit = myexits;
MQEnvironment.receiveExit = myexits;


Is myexit the code that connects to a exit written in C and installed on the server OR is it the actual logic of the exit?

[ my java appln might be on the server machine or some remote machine connecting via MQClient --does that cause any difference?]

Apologies for my innocence...

Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon May 14, 2007 12:41 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

ashu wrote:

Is myexit the code that connects to a exit written in C and installed on the server OR is it the actual logic of the exit?

[ my java appln might be on the server machine or some remote machine connecting via MQClient --does that cause any difference?]

Apologies for my innocence...

Regards,


It doesn't matter where your app is running. It has to be client connection. Thats all.

Lets imagine you have security exit installed on MQ server machine which lets you connect after passing security key.

In this situation in your JAVA app you have to pass this key.

You have to write class which implement interface above and say API to use this exit during communication.


template code (from "Using JAVA")

Code:
class MyMQExits implements MQSendExit, MQReceiveExit, MQSecurityExit {
// This method comes from the send exit
public byte[] sendExit(MQChannelExit channelExitParms,
MQChannelDefinition channelDefParms,
byte agentBuffer[])
{
// fill in the body of the send exit here
}
// This method comes from the receive exit
public byte[] receiveExit(MQChannelExit channelExitParms,
MQChannelDefinition channelDefParms,
byte agentBuffer[])
{
// fill in the body of the receive exit here
}
// This method comes from the security exit
public byte[] securityExit(MQChannelExit channelExitParms,
MQChannelDefinition channelDefParms,
byte agentBuffer[])
{

// fill in the body of the security exit here
}
}

_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
ashu
PostPosted: Mon May 14, 2007 12:50 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

Many thanks for the clarification...!

Warm Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
ashu
PostPosted: Mon May 14, 2007 1:27 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

Hello again,

Is the statement, "Channel Exits and Data conversion exits are two types of user exits" valid??

Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon May 14, 2007 1:33 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

ashu wrote:
Hello again,

Is the statement, "Channel Exits and Data conversion exits are two types of user exits" valid??

Regards,



Channel Exits is general name.

Channel Exits can be security exit which lets you secure your MQ environment.

Channel Exits can be data conversion exit (message, send , receive, ...) which lets you manipulate message structure.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
ashu
PostPosted: Mon May 14, 2007 2:17 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

marcin.kasinski wrote:
ashu wrote:
Hello again,

Is the statement, "Channel Exits and Data conversion exits are two types of user exits" valid??

Regards,



Channel Exits is general name.

Channel Exits can be security exit which lets you secure your MQ environment.

Channel Exits can be data conversion exit (message, send , receive, ...) which lets you manipulate message structure.


Why is that you have to configure the data conversion exit with the Qmgr while channel exits have to configure with the Channel ...(I read it in two different books 'App Prog Guide'(data conversion) and 'Intercommunication'(Channel exit))

Sorry for being so confusing...

Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 14, 2007 2:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ashu wrote:

Why is that you have to configure the data conversion exit with the Qmgr while channel exits have to configure with the Channel ...(I read it in two different books 'App Prog Guide'(data conversion) and 'Intercommunication'(Channel exit))


Because some exits are part of the queue manager, others are part of the channel agent.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ashu
PostPosted: Mon May 14, 2007 2:28 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

So gist is that all the exits are loosely called Channel exits...

Is it the case that when we write user exits we are actually overriding(in OOP terms) the functionality of the existing exits of that type?




Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
ashu
PostPosted: Mon May 14, 2007 2:39 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

Quote:
Channel Exits can be data conversion exit (message, send , receive, ...) which lets you manipulate message structure.


[NOTE: I don't expect an answer for this post...But if somebody can enlighten me then I would be thankful]

on second thought....
I can understand that security / message exits tell something about how the channel behaves...like whether the channel is being established between to valid parties...or can the channel support large messages else the message needs to be chopped...and so on...
But the data conversion exits have nothing to do with the channel's behaviour...so why is it a channel exit?

I already feel dumb...so you can express that freely

Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon May 14, 2007 2:46 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

ashu wrote:

But the data conversion exits have nothing to do with the channel's behaviour...so why is it a channel exit?


Not exactly.

This is place where you can modify messages outside sending or receiving application.
It is just after putting message to remote queue or on second hand just after placing message into destination queue.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Mon May 14, 2007 2:46 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

ashu wrote:
But the data conversion exits have nothing to do with the channel's behaviour...so why is it a channel exit?


Aside from the behaviour exhibited by the channel when it's CONVERT attribute is YES perhaps.....

ashu wrote:

I already feel dumb...so you can express that freely


I would have described you as "inadequately researched"

Read and experiment in a methodical manner. You'll climb the learning curve in no time. Remember none of us were born understanding MQ. (With one possible exception.... )

Do not despare and remember that the search function is your friend.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
ashu
PostPosted: Mon May 14, 2007 2:58 am    Post subject: Reply with quote

Centurion

Joined: 11 Nov 2006
Posts: 132

I'am reading whatever I get my hands on regarding exits. I have also implemented the mirrorq example...but some how none of the texts tell me the exact definition of what an exit is...only that it is implicitly called (if configured ) where ever required...
but issues like,

Quote:
Is it the case that when we write user exits we are actually overriding(in OOP terms) the functionality of the existing exits of that type?


OR how to start writing an exit...have not been explained anywhere....atleast I did not find it...so

Quote:
I would have described you as "inadequately researched"


is acceptable to me..

Thank you all for your participation

Regards,
_________________
Ashu

"It is simple to be Happy but difficult to be Simple"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » About Channel Exits
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.