• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Showing StartUpController in the class diagram

 
viv anand
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is valid to put them in the class diagram.
 
san kumar parihar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic