EJB and Java EE Design Patterns

I'm still not doing much here in my new job. There's still a lot of things to be set up. I finally got to meet with our very own Nards (N.Ocampo). Aside from that, I've been reading on Java Enterprise Design Patterns for the past one week They are:

  1. Service Locator - Abstracts JNDI lookup
  2. Session Facade - Combines all business related methods into a single SessionBean. The pattern is derived from the Facade Pattern(gof). And just to let you know, it's pronounced as fuh-sahd.
  3. Business Delegate - Adds another layer of abstraction for the first two patterns(though I might be wrong at this, don't take my word for me and read the link!), encapsulating the instantiation of the ServiceLocator and perhaps what type of SessionBean can be get. I think I didn't really understand the phrase on the link where it says: Use a Business Delegate to reduce coupling between presentation-tier clients and business services. Now, what is the presentation tier being talked about there? I don't see any JSP's...? Or maybe it's referring to how the EJB clients access the EJB's as some sort of interface? Not sure, I don't think I can say more for now.

 It's very exciting and I can't wait to apply those newly earned knowledge on my first task.

I've also done some reading about EJB 2.1 particularly on Session Beans(One of 3 EJBs in EJB 2.1). It's only this time that I finally got the logic behind Session Beans. You could really implement your business logic with it and have different clients access it remotely without having the actual class on that client(hint: JNDI and the Class class). I've done some hands-on activity on this one, supplementary for my learning. 

It was quite easy to understand Entity Beans especially the Bean Managed Persistence(BMP). Bean Managed Persistence is one of two ways you can do Persistence in EJB 2.1. In EJB 3, I think Container Managed Persistence was replaced(or maybe improved) by the Java Persistence API(JPA) which I have more knowledge of(somehow). Got to try doing some hands-on activity on this one.

I'm using a trial version of Rational Application Developer(formerly WSAD) right now and God knows how much I missed Eclipse! You might wanna know about

CTRL + SHIFT + O(as in letter "oh")

which will write all the necessary imports in bahalf of you!
 

There's a very exciting task waiting for me in the next weeks to come. Hopefully I could post something about it. 

Published Monday, December 10, 2007 5:19 AM by lamia
Filed under: , ,

Comments

# re: EJB and Java EE Design Patterns

Tuesday, December 18, 2007 8:48 AM by Terbitium

wqJVPL Hello Perdun! <a href="www.google.com/.../a>.

# re: EJB and Java EE Design Patterns

Tuesday, December 18, 2007 8:48 AM by Terbitium

wqJVPL Hello Perdun! <a href="www.google.com/.../a>.

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: