This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Showing StartUpController in the class diagram" Watch "Showing StartUpController in the class diagram" New topic
Author

Showing StartUpController in the class diagram

viv anand
Greenhorn

Joined: Jun 21, 2009
Posts: 29
Hi,
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().

@timeout
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29233
    
138

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, 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
http://www.coderanch.com/t/477104/EJB-JEE/java/Java-EE-timer-service-periodical

 
jQuery in Action, 2nd edition
 
subject: Showing StartUpController in the class diagram
 
Similar Threads
Questions regarding BaseController and other controllers
passed SCEA with 99%
SCEA 2 results
EJB Timer Services Query
SCEA v5 Certified