• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Coarse-grained Objects

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone explain what is the meaning of fine-grained and coarse-grained objects in the context of EJBs.
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A coarse grained object does not usually provide a detailed view of the underlying and related objects. Coarse grained objects are often called components because their goal is to provide a higher level view of the underlying world which is composed of, as you might guess, fine grained objects, that is, objects that provide a very detailed low-level view of the system.

To sum up, at the bottom we have fine-grained objects and on top of them coarse grained objects that provide clients with a bulkier access to the system.

In the context of EJBs, The naive approach would be for the client to work directly with entity beans and implement some process in the client code. This is not really efficient in terms of the number of network roundtrips that are needed to carry out the operations. A better approach would be to have entity beans that can be fine- or coarse-grained depending on what properties they expose, and have session beans access those entity beans to implement some kind of process that the client can remotely run. This way, the client only needs to call one method on the remote session bean and the latter takes cares of accessing the underlying entity beans. In this case, the session bean provides a coarse-grained view over the fine-grained underlying entity beans.
 
I need a new interior decorator. This tiny ad just painted every room in my house purple.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic