Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

DAO vs. entity EJB; Definition of "component"

 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Saha,
I made my answer a new thread for giving it a meaningfull topic name.

Originally posted by Saha Kumar:
In another post, you said you would not put a DAO and a BMP entity together in the same component?


Are you questioning what could be packed together in a component? In UML-2 this is much clearer now. Not just "the EJB". As you know you can specify an "artifacts" compartment for the name of the physical .jar including a deployment descriptor, so today you have a better chance to think in imaginable things. In UML-1 the whole component had been seen as physical.

Or are you questioning the role of entity-EJB vs. DAO? Both access the database. You design either an entity EJB or a DAO for one given table [and sub-tables in 1.1]. I remember some people arguing to hide "technology specific" entity EJBs behind DAOs but still getting the benefits (caching, transactions) of the container.

Originally posted by Saha Kumar:
If the DAO was not to be used anywhere else, wouldn't this be considered dependent?


Also here: Dependent of what?

I try to guess your question:
For entity EJB:The EJB along with its deployment constructor is a pluggable, replacable, deployable component, and needs to be due to be ruled by the container. It provides an interface, may depend on any prepackaged sub-jars but also may be totally independent from any other component because not having any required interface.

For DAO: I can not remember having seen a single DAO forming a component, i.e. with an own deployment descriptor in the .jar of the DAO. That could make sense for ease of replacement by other DB-accessing/OR-mapping technologies like EJB-3 later - provided the DAO has a clear interface that later can just be realized by another component.

Thomas
[ May 12, 2006: Message edited by: Thomas Taeger ]
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am using UML 2.0 white box component diagram. I want to show a composite entity as a component. The composite entity contains dependent POJOs and an entity EJB.(http://java.sun.com/blueprints/corej2eepatterns/Patterns/CompositeEntity.html).

I want to know if the white box component diagram allows other components to be included in the diagram (i.e. I only see java classes which are used internally by the component).

Thanks in advance.

-Saha
 
Saha Kumar
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I think I found the answer for anyone working with UML 2.0 white box components. I found

The graphical notation for a UML 2.0 Component is either a "black box" view to only show the interfaces, or a "white box" view to show the internal assembly of subcomponents if any (parts or classifiers). The component logo can be associated or replace the <<component>> keyword.



and also

that a classifier in UML 2.0 includes:

..., class, component, ...



So I think its safe to conclude that a white box component in uml 2.0 can contain other components.

references:

web page

web page

-Saha
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is going wrong?

You had a question. I took the time to answer. You just ignore it and abuse this thread for posting another question instead.

If you need a coach in this manner you should rent one outside of forums.

Please for new questions open a new thread.
 
Saha Kumar
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thomas,

Thanks for the insite from your posting. I have answered my question and also see your points.

-Saha
    Bookmark Topic Watch Topic
  • New Topic