Posted: Wed Mar 05, 2003 5:23 pm Post subject: Extending MQ Base Classes
Novice
Joined: 09 Aug 2001 Posts: 17 Location: Charlotte, NC
I dont want to start an OO style war, but was wondering if extending a base MQ class like MQMessage was considered poor practice.
I know that typically Java developers overuse inheiratance when composition would produce better designs, but wanted to know if it was a particularly bad idea with these classes.
When designing classes to represent an MQ message with a large RFH2 header and message body, what technique do you prefer?
1. Extend MQMessage
2. Include MQMessage as a public instance variable
3. Include MQMessage as a private instance variable and wrap all the fields and methods. (I refuse to do this)
4. Include MQMessage as a private instance variable and provide a getter and setter for it.
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
I think you hit the nail on the head with your opening line ... its a style kinda thing. Any of the ideas you suggested should work as well as any other.
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