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 Java / JMS » Extending MQ Base Classes

Post new topic  Reply to topic
 Extending MQ Base Classes « View previous topic :: View next topic » 
Author Message
martin
PostPosted: Wed Mar 05, 2003 5:23 pm    Post subject: Extending MQ Base Classes Reply with quote

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.

thanks for your ideas,
Back to top
View user's profile Send private message
kolban
PostPosted: Sun Mar 16, 2003 6:46 am    Post subject: Reply with quote

Grand Master

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.
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 Java / JMS » Extending MQ Base Classes
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.