Solved

Decorator pattern

Posted on 2006-11-16
4
320 Views
Last Modified: 2012-05-05
Hi guys ,

I was reading the decorater design pattern and I came across this line
“EJBObject is a decorator for the bean because the bean’s functionality is expanded to include remote behaviour”


Not sure what the above line means by “the bean’s functionality is expanded to include remote behaviour”

I was thinking more in these terms: We can access the bean using the remote interface (extends EjbObject) or the local home interface.

Please correct me if I am wrong

Also , Is EJBObject an "Interface" or a "abstract public Interface"? whats difference between the two

Thanks
J
0
Comment
Question by:jaggernat
  • 2
  • 2
4 Comments
 
LVL 8

Expert Comment

by:reach2piyush
ID: 17962148
>>Interface" or a "abstract public Interface"

No Difference, all interfaces are abstract by nature, i.e. neither you can instantiate them nor you can have method body in it.

Interesting debate on the EJBObject as decorator :
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=26&t=001032

0
 
LVL 10

Author Comment

by:jaggernat
ID: 17962451
oh boy, what a thread! i am tired :)

it was a good one, but the debate is actually still open between these two points:

EjbObject adds functionality to the bean by providing remote behaviour

EjbObject adds functionality to the bean by providing features such as security, transactions.
 
and no one knows which one is correct :)


0
 
LVL 8

Accepted Solution

by:
reach2piyush earned 320 total points
ID: 17963554
I accede.. the thread was really tiring..

To me, both points seems correct & as someone correctly pointed out in the thread

EjbObject adding functionality to the bean by providing remote behaviour is more close to a proxy pattern rather than decorator pattern

EjbObject adding functionality to the bean by providing features such as security, transactions seems more likely to exhibit decorator pattern.

0
 
LVL 10

Author Comment

by:jaggernat
ID: 17965094
yes u right!

thanks
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now