Solved

Decorator pattern

Posted on 2006-11-16
4
332 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

752 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