Solved

Decorator pattern

Posted on 2006-11-16
4
322 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 70
DO we need Java installed on a Windows PC and WHY ? 13 98
Java and GPO 11 70
fibonacci ten numbers 4 28
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

920 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

16 Experts available now in Live!

Get 1:1 Help Now