aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes MDB-SLSB  in Component Diagrams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "MDB-SLSB  in Component Diagrams" Watch "MDB-SLSB  in Component Diagrams" New topic
Author

MDB-SLSB in Component Diagrams

Vignesh Murali Natarajan
Ranch Hand

Joined: Jul 24, 2006
Posts: 65

Hi,
I am in the process of doing my component diagrams and I stumbled upon this question. I thought I will put my Message Driven Beans in Integration Tier. But, one of my MDBs uses a StatelessSessionBean which should rightfully stay in the Business Logic Tier. So in this case, should I show an interaction between the MDB and SLSB? which would be counter intuitive to the concept of layering wouldn't it? or is it OK to put the SLSB along with the MDB in the Integration tier(the MDB is the only client of the SLSB)?


ThanQ,
Vignesh Murali N
www.vigneshmurali.com
SCJP(95%), SCWCD(92%), SCBCD(97%), SCDJWS(97%), SCBCD5(100%), OCMJEA
Rajan Choudhary
Ranch Hand

Joined: Mar 17, 2011
Posts: 196
Very good question and thoughts. I was in similar dilemma. Decision had to be made so I put my MDB in business tier and showing JMS_QUEUE in integration tier. SLSB has dependency on queue. queue has dependency on MDB and MDB has dependency in DAO. zig-zag Not sure if that's right or wrong. If somebody is 100% sure, please reply. I am submitting my solution tomorrow.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30758
    
156

Vignesh Murali Natarajan wrote: which would be counter intuitive to the concept of layering wouldn't it?

Why would it be counter intuitive to layering? The MDB is a layer about the SLSB. I think it is fine to have them in separate layers and an interaction.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rajan Choudhary
Ranch Hand

Joined: Mar 17, 2011
Posts: 196
Jeanne, is it ok to show the MDB in business tier and JSM Queues in integration tier? or MDB should always be in integration tier?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30758
    
156

Rajan Choudhary wrote:Jeanne, is it ok to show the MDB in business tier and JSM Queues in integration tier? or MDB should always be in integration tier?

You could make a case for both. I don't consider an MDB to be business because it doesn't contain any business logic.
Rajan Choudhary
Ranch Hand

Joined: Mar 17, 2011
Posts: 196
Thanks Jeanne.

What I think is, onMessage(Message) is a transactional method and message processing logic is done in this method and sometimes people do make light database calls and prepare data to be sent to the integrated tier.

more opinions, please...
Vignesh Murali Natarajan
Ranch Hand

Joined: Jul 24, 2006
Posts: 65

Jeanne Boyarsky wrote:
Rajan Choudhary wrote:Jeanne, is it ok to show the MDB in business tier and JSM Queues in integration tier? or MDB should always be in integration tier?

You could make a case for both. I don't consider an MDB to be business because it doesn't contain any business logic.


Thanks for your response Jeanne. I made the diagram to have MDB in Integration Tier and the corresponding SLSB in Business Tier. I meant counter-intuitive to the strict layering approach where traffic is only one-way. I posted this message because I could not find a similar topic using search, but then when searching on a different topic, found this thread.
One more question - In the Integration tier I am including the queues / topics to which the MDBs speak to? But my app is also supposed to talk to an external JMS. I am portraying this external JMS as an external system. Is this right? I dont know if this question violates Javaranch policies. If so, please feel free to remove my post(a note if you have done so is much appreciated )


Thanks to you too Rajan for your replies.
Rishi Shehrawat
Ranch Hand

Joined: Aug 11, 2010
Posts: 218

Vignesh, Do you mean the MDB is listening on a queue, & the as part of the message processing also writes to another queue?
Vignesh Murali Natarajan
Ranch Hand

Joined: Jul 24, 2006
Posts: 65

Rishi Shehrawat wrote:Vignesh, Do you mean the MDB is listening on a queue, & the as part of the message processing also writes to another queue?


Rishi,
I have 2 MDBs. One listens to topic(s) from external systems. Externals system(s) post messages to this topic. While the other MDB listens to a Queue. A local SLSB posts messages to this Queue. This queue is only used by the application. The MDB picks up messages from the queue and delegates processing to another SLSB
Rishi Shehrawat
Ranch Hand

Joined: Aug 11, 2010
Posts: 218

Strictly speaking the second queue is not being used for integration. You might be using the queue to do some processing asynchronously.

You could show an external system & show topic in the integration layer. You can also provide a note along with the component diagram to make this clear.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MDB-SLSB in Component Diagrams