[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Decorator pattern

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
jaggernat
Asked:
jaggernat
  • 2
  • 2
1 Solution
 
reach2piyushCommented:
>>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
 
jaggernatAuthor Commented:
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
 
reach2piyushCommented:
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
 
jaggernatAuthor Commented:
yes u right!

thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now