• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MDB-SLSB in Component Diagrams

 
Ranch Hand
Posts: 65
Hibernate Firefox Browser Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)?
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Rajan Choudhary
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 65
Hibernate Firefox Browser Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 65
Hibernate Firefox Browser Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic