Two Laptop Bag*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes JEE 5 and business delegate pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "JEE 5 and business delegate pattern" Watch "JEE 5 and business delegate pattern" New topic
Author

JEE 5 and business delegate pattern

Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

Hi,
I read this post earlier about obsolete patterns after JEE 5
http://www.coderanch.com/t/156191/java-Architect-SCEA/certification/Obsolete-Design-Patterns-EJB-SCEA

Still, I am not sure about whether to user business delegate patterns. During the times of EJB 2.1, business delegate would primarily be used to catch the RemoteException. But, it also provided a layering - so, if I had to change the presentation layer from web to desktop, I could do it easily.

Now, I read that @EJB injection can be done in servlets and JSF managed beans. Now, if I write a delegate and call it from within my JSF, can I still use @EJB inside the delegate - will the container support it?

I have to decide my class design based on this - question is whether to include business delegate or not?


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Yegor Bugayenko
Ranch Hand

Joined: Feb 11, 2011
Posts: 64
I included it in my exam, even though EJB 3 was used. I think that Business Delegate pattern is not obsolete. It's a good mechanism of decoupling of concepts, in a distributed environment.


follow me at yegor256.com
Rajan Choudhary
Ranch Hand

Joined: Mar 17, 2011
Posts: 196
I agree with Yegor. I had similar dilemma in last few days but I have decided to use it.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

I have decided not to use it. This is because with EJB3, the location of services differs from web-based code and a stand-alone one. So, even if I have a business delegate and do DI for EJB3, I won't be able to use that for a Java desktop app. I have to write a JNDI lookup again. So, I decided to leave it out.
Luciano Assis
Greenhorn

Joined: Apr 30, 2008
Posts: 16
Hello Ranchers,

I'm at part 2 right now and really wants to use Business Delegate.

The question is: How can I use DI on my POJO Delegate? Because I don't want to use a Service Locator to lookup my EJBs.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JEE 5 and business delegate pattern
 
Similar Threads
SCEA 5 Part 2 - Assignment Sent
scea 6
scea 5 may focus more on the new features of JEE 5.
SCEA Part 2 - Delegate Layer Needed?
SCEA 5 - but what about JEE 6?