Sunday, July 17, 2011

part 2 assignment or

SCEA 5 part 2 documentation or
Oracle Certified Master or
Java EE 5 Enterprise Architect or
OCMJEA Part2 assign ment or Documentation
OCMJEA 5 Part2 Assigment
Big Smoke Cigar Shop SCEA5 part II Assignment
Big Smoke Cigar Shop OCMJEA 5 part II Assignment

SCEA 5 / OCMJEA 5 PART- 2 Assignment - Designing and Documenting the solution using UML.

Well the assignment I got was designing Big Smokes Cigar Factory.A friend of mine started with class diagrams first and then with component , deployment and Sequence diagram.

I started with Sequence diagram as I felt It would give the list of all possible classes along with there methods. So I drafted these sequence diagrams on paper and then started documenting then with Enterprise Architect tool. Its pretty good. Always import images as .png files as the size is less and clarity is good.
You ca use the java jar command

jar cvf scea-SRxxxxxx.jar index.html part3html

where xxxx is your oracle id and part3html is the sub folder which had all images and remaining html pages.

I Will give you a brief description of Do's and Dont's in each set of diagrams

1. Class Daigram :
  • Don't show any DTO/VO (Data Transfer Objects) as it will pollute your diagram and will divert the digram focus from the actual business problem your are trying to solve. Eg: When I wanted to show payment Information I used paymentInfoDTO which is obvious and also I had an entity bean which was representing PaymentInfo. In this case there is no need to show paymentInfoDTO class but PaymentInfo(@Entity) is a must.
  • I included Business Facades as part of class diagram but not Business Delegate. The reason was most of my methods in Business Facades and Delegates had same names and parameters. (Well you may think then there is no point to include Business Facades as that too may pollute class diagram). But I wanted to highlight the methods so added this.
  • At the top of class diagram I added one controller to indicate front end controller (I did not add any Managed Beans or Backing Beans from JSF Frame work to the Class Diagram)
  • Please make sure your entities all are included and should include all entities as specified in the assignment and feel free to add any entities which you feel are important.Make sure the cardinality is maintained as specified in the assignment. This is very important.
  • In fact I had a separate section to explain the relation ship between entities in the final documentation. (Eg: One Order can have multiple payments. One payment can be made by multiple Credit cards etc)
  • Do not show any DAO'S in class diagram instead put all DAO's and Business Delegates in to component Diagram.
2. Component Diagram:
  • I added UI components and listed the JSF pages in each UI component. Eg: I had Search component and listed the following JSF pages (CategorySearch.xhtml, CategoryResults.xhtml, CiagarProductDetails.xhtml). Similarly I had other UI components like Checkout component, Admin UI component.
  • List all DAOS and any message Driven beans, any webservice components here. (However also mention any integration classes that you need for external systems in class diagram). eg: For payment Web service I had web service helper class called PaymentWebsserviceHelper in class diagram and a Component in called Payment Authorization component in component diagram.
  • List all sub systems at the bottom like - Email server, Ldap server, Database and components representing external APIs (like Merchant Bank, Freight Movers, International Shippers)
  • I had divided entire component diagram in to 3 layers - UI layer, Business Logic Tier and Integration Tier.
3. Deployment Diagram :
  • Show two fire walls - Primary and Back up.
  • Two load balancers
  • Two seperate hard ware device and each device having two clusters (So we can have 4 clusters)
  • Each cluster will have the application deployed. (Show Web container and EJB container in Each cluster) and with in each container show how your war or ear or jar files are deployed. Eg: You can package the WAR file as BIGCigarPresentation.WAR, BigCigInventoryProcessorMDB.JAR - as EJB jar file). So show these deployed artifacts in each container as that helps a lot for the evaluator.
  • Have two hard ware profiles for Databases and have two clusters on each server for Database. So in total you will have 4 instances of DB - 2 primary and 2 as back up.
  • Also explain hardware you want to use for deploying each application (Go to Oracle Website and look for Applicataion and DB hardware servers) . Then explain how memory you need for each applicataion. Start with some assumption like we will process 500 users per day - each user may need around 5mb space on server at run time (Considering thats the amount of data you hold in session bean) and for processing each user server may need another 5mb for book keeping - So in total per user you may need 10 mb.So for 500 users its 10 mb * 500= 5000 Mb or approx 5GB RAM. Since you dont want each server to be overloaded 100% its better you have some buffer and say we can have 8 GB RAM. With this analogy calculate the amount of data you will store in DB each day and how much memory you need for DB storage in a year.
4. Sequence Diagram (The most time consuming )
  • Include any class thats in Class Diagram and component diagram and references to any DTO's that you feel are required to explain a flow.
  • So here you can show any JSF page, Business Delegates, Facades, Entity beans, MDBs' Session beans , Adapters etc
  • Make sure you number each line that you draw (The numbering can be done by the tool which automatically updates the number when we add or remove)
  • Then at the end before final documentation you can explain each diagram by referring these numbers.
TIPS for Part-2 documentation:
I had an index page which had the following details

Prometric Tetsing ID: SRxxxxxx
SCEA Assignment:To Design retail shop for Big Smokes Cigar Shop

1. Back Ground
2. Objective
3. Business Domain Model Interpretation
4. Architecture Overview
5. Design Patterns Used
6. Session Management
7. Security
8. Persistence and Transactions Mechanism
9. Assumptions
10. UML Diagrams
· Class Diagram
· Component Diagram
· Deployment Diagrams
· Sequence Diagrams
10. Top Three Risks and mitigation plan

Now I will give little info about each section (though I am not supposed explain in detail, I wish I could)

Back Ground: Explain what the project is about - Eg Big Smokes Cigar shop is to sell cigars and we need to automate bla bla.

Objective: To Design and represent an online system for Big Smokes using UML Diagrams. Integrate Big Smokes application with third party sub systems ...................etc
The system designed should allow the Customers to
  • Search Catalog
  • Add products to Cart
  • Select shipping method
  • To make payment online and Checkout.
The system designed must meet the following criteria
  • 90% of all transactions to be under 5 seconds and no transaction exceeding 10 seconds.
  • Should support 200 concurrent users
  • 99.99% availability during core working hours.
  • A Minimum of 128 bit encryption for security.
(Basically get information from the Exam objective)

Business Domain Model Interpretation (Explains the multiplicity):
  • 1 customer can have many payments
  • 1 customer can have many orders
  • 1 order has 1 payment
  • ...... and so on......
Architecture Overview:
The proposed solution is based on Java EE 5 technology stack. And explain why you chose j2ee (Becoz of security , Txn management ....etc features)
Then list what frame wrok you are using in each layer (I will mention 3 points here though i had 8-9 bullets in my assignment)
  • EJB 3.0 entity beans and JPA for persistence.
  • JDBC API for connecting to Database
  • Java Mail API for email notification.
  • Then You mention about which layer and what frame work you are using - (hints: JSF, HTTPS, JSSE, etc)

List all design patterns used - like Factory, DTO, DAO etc. I had around 8 design patterns in my assignment
JPA for persistence mechanism and used container managed transactions where ever applicable.
9. Assumptions:
I had around 22 assumptions listed. From the beginning of the project I maintained notes for any assumption that I was making which helped a lot.Also mention any assumption or expectation that you have from the external system
To mention a few
  • The “BigCigFramework” as shown in class diagram will take care of any logging, exception handling, resource injection, authentication, and customer profile maintenance tasks.
  • If a user doesn’t check out and closes the browser the cart will not be saved.
  • The average response time in 99% of cases for Merchant bank payment web service should be within 2 seconds and in 1% of cases cannot be beyond 5 seconds.

Here I added link for each of the UML diagram. I had each diagram in a separate html and some explanation for each diagram.
Here just list out what are the top three problems you can see in the application once its deployed in production and once that problem occurs how you are going to resolve.
An Example:
Risk: Say suppose when a message is dropped in to message queue say the sub system fails to process the message due to database being down in which case we will loose the message.
Mitigation: In case of any exception when a sub system is processing a message and if it cannot complete it should write to a temporary queue. We can monitor the queue depth and alert production support team.
I had identified  4 risks and gave the solution for each to solve. I will given an hint  to find risk in your assignment.Thin on these lines 
- What if sub systems are down ??
- And how do you handle each sub system being down ?? 
-What if  subsytem sends wrong data ?


  1. Hi Reddy,

    Thanks for this article, its very useful!.

    I am also having the Big Smokes cigar, and just wondering if you have some spare time to review my assignment?

    Many thanks,

  2. Hi Reddy , thanks alot for sharing your experience... very useful blog for those who are preparing OCMJEA assignment… i have cleared ocmjea last month and ur writing provided me the right guidence...!!! added ur blog as a reference

    1. Shameer,
      Congrats !!! I am glad this blog helped you.

  3. Hi Reddy,
    Can you share your email address please?

  4. Hi Reddy,

    Unable to access the links, please let know if there is any special permission required.

  5. Hello Reddy,

    Thank you for your helpful post! It is very informative!

    I also have the assignment for the Big Smokes and I have just finished it.
    I would be glad if you can spend some time to review it!

    Please tell me how do you want me to send it to you?

    Thank you,