• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Showing StartUpController in the class diagram

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it is valid to put them in the class diagram.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may also refer the link below on invocation of EJB timer
https://coderanch.com/t/477104/EJB-JEE/java/Java-EE-timer-service-periodical

 
ice is for people that are not already cool. Chill with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic