Tasks and Servlets in Lightweight MVC Application

Discussion in 'Java' started by etherdonk4@gmail.com, Mar 3, 2008.

  1. Guest

    I have a Java application which is currently an MVC app on Tomcat.
    I've developed with Struts and in production environments before but
    this project I am designing myself and I don't have much experience in
    this role.

    I really have little idea of how a lightweight CRUD app that runs
    background tasks should be designed :). Specifically, the database
    connection, the pooling, threads, thread queueing.

    My application uses as JSP servlet interface to run tasks, such as
    checking for email every x minutes and then sleeping y minutes, it is
    all admin tasks ie meant for one user at a time running many
    background threads. I'd like to code this simply.

    As I understand it best practices would suggest using EJB. I've used
    this before and find it a bit of a pain at development time and would
    prefer to not use ejb. I want to use JSP/Servlet because it is easy
    enough to create a front end button, an else/if in the servlet, and an
    Action, but don't want or need a Struts framework.

    Where does the database layer go? How can I manage my background
    threads? Maybe it is time for me to buy a book? Right now I
    instantiate sort of an application object (myApp MyApp) when the
    serlvet instantiates, and pass it to the action. The Application
    object has references to threads I've started which I can view, edit,
    etc., but for each action I am creating a new database connection. It
    just seems to get complicated when threading is involved. Any help
    appreciated.
    , Mar 3, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Beatrice Rutger
    Replies:
    0
    Views:
    702
    Beatrice Rutger
    Jun 5, 2005
  2. Kenneth McDonald
    Replies:
    0
    Views:
    618
    Kenneth McDonald
    Dec 19, 2006
  3. rmn190
    Replies:
    2
    Views:
    2,320
    Arne Vajhøj
    Jan 10, 2008
  4. Paulo
    Replies:
    3
    Views:
    457
    Peter Bromberg [C# MVP]
    Dec 4, 2008
  5. Crazy Cat
    Replies:
    1
    Views:
    664
    schepp
    Sep 3, 2009
Loading...

Share This Page