Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6838885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:39:04+00:00 2026-05-26T23:39:04+00:00

Question/Environment The goal of my web application is to be a handy interface to

  • 0

Question/Environment

The goal of my web application is to be a handy interface to the database at our company.

I’m using:

  • Scalatra (as minimal web framework)
  • Jetty (as servlet container)
  • SBT (Simple Build Tool)
  • JDBC (to interface with the database)

One of the requirements is that each user can manage a number of concurrent queries, and that even when he/she logs off, the queries keep running and can be retrieved later on (or their completion status checked if they stopped for any reason).

I suppose queries will likely have to run in their own seperate thread.

I’m not even sure if this issue is orthogonal or not to connection pooling (which I’m definitely going to use, BoneCP and C3PO seem nice).

Summary

In short: I need to have very fine-grained control over the lifetime of database requests, and they cannot be bound to the servlet lifetime

What ways are there to fulfill my requirements? I’ve searched quite a bit on google and stack overflow and haven’t found anything that addresses my problem, is it even possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:39:05+00:00Added an answer on May 26, 2026 at 11:39 pm

    What is missing from your stack is a scheduler. e.g http://www.quartz-scheduler.org/

    A rough explanation:

    • Your connection pool (eg C3P0) will be bound to the application’s lifecycle.
    • Your servlets will be sending query requests to the scheduler (these will be associated to the user requesting the query).
    • The scheduler will be executing queries as soon as possible, by using connections from the connection pool. It may also do so in a synchronized/serialized order (for each user).
    • The user will be able to see all query requests associated with him, probably with status (pending, completed with results etc).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Based the accepted answer to this question I've setup a NetBeans/tomcat environment. In testing
Our company has people in every catastrophic event here in the U.S. and parts
In line with this question: Lightweight web app server for PHP? The above question
My question is addressed to performance issues in multithreading at Windows environment. After testing
May I ask a question about the CC compiler in Solaris environment. I try
Goal My goal to better understand how concurrency within Java EE environment and how
My question is usage of classpath environment variable is limited to java only ?
This question keeps haunting me: in a multithreaded/multiprocessor environment - is it necessary to
I've got a question with how Linux process the environment varibales passed to execve():
Environment TFS 2010. Three branches: Main , Development and Release . Question I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.