Two Laptop Bag
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Showing StartUpController in the class diagram 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 "Showing StartUpController in the class diagram" Watch "Showing StartUpController in the class diagram" New topic

Showing StartUpController in the class diagram

viv anand

Joined: Jun 21, 2009
Posts: 29
in my scea assignment for Part-2, there is a requirement to call 3 different web services on every minute. I am planning to use javax.ejb.TimerService api for EJB3 for this purpose.My ideas is that during the application startup there will be a servlet invocation(say the name of the servlet is StartUpController) which in turn will call an SLSB(say TimerSessionBean) and that bean will have a method like createTimer() and another method like handleTimeout() with @timeout annotation.
Call sequence will be :
StartupServlet.createTimer() -->TimerSessionBean.createTimer().

public void handleTimeout(Timer timer) will contain 3 different web service calls.

StartUpController class will have <load-on-startup>1</load-on-startup> in web.xml so that it gets invoked on application startup.
StartUpController can be used for many other purposes like caching, logger initialization etc.

I will put the details stated above in the short note below my class diagram.

In my class diagram I am showing FacesServlet by the name BaseController with <<Servlet>> stereotype. In addition to BaseController, I am planning to show StartUpController with the same <<Servlet>> stereotype and TimerSessionBean with <<StatelessSessionBean>>.

Is my decision to include StartUpController and TimerSessionBean in the class diagrams correct or am I giving too much details not intended for the class diagram in scea? I am bit confused. Please help me by giving your opinion regarding this.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33098

I think it is valid to put them in the class diagram.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
san kumar parihar
Ranch Hand

Joined: Dec 05, 2010
Posts: 30
You may also refer the link below on invocation of EJB timer

I agree. Here's the link:
subject: Showing StartUpController in the class diagram
It's not a secret anymore!