Solved

Decorator pattern

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sites similar to codingbat to improve coding hanson skills 3 49
maven project error 5 54
Java JRE greater than 1.6 5 62
java stored proc example 9 29
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
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:

813 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

14 Experts available now in Live!

Get 1:1 Help Now