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 7729275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:55:41+00:00 2026-06-01T05:55:41+00:00

In our wicket application I need to start a long-running operation. It will communicate

  • 0

In our wicket application I need to start a long-running operation. It will communicate with an external device and provide a result after some time (up to a few minutes).

Java-wise the long running operation is started by a method where I can provide a callback.

  public interface LegacyThingy {
       void startLegacyWork(WorkFinished callback);
  }

  public interface WorkFinished {
       public void success(Whatever ...);
       // failure never happens
  }

On my Wicket Page I plan to add an Ajax Button to invoke startLegacyWork(...) providing an appropriate callback. For the result I’d display a panel that polls for the result using an AbstractTimerBehavior.

What boggles my mind is the following problem:

To keep state Wicket serializes the component tree along with the data, thus the data needs to be wrapped in serializable models (or detachable models).

So to keep the “connection” between the result panel and the WorkFinished callback I’d need some way to create a link between the “we serialize everything” world of Wicket and the “Hey I’m a Java Object and nobody manages my lifetime” world of the legacy interface.

Of course I could store ongoing operations in a kind of global map and use a Wicket detachable model that looks them up by id … but that feels dirty and I don’t assume that’s the correct way. (It opens up a whole can of worms regarding lifetime of such things).

Or I’m looking at a completly wrong angle on how to do long running operations from wicket?

  • 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-06-01T05:55:42+00:00Added an answer on June 1, 2026 at 5:55 am

    I think the approach with the global map is good. Wicket also uses something similar internally – org.apache.wicket.protocol.http.StoredResponsesMap. This is a special map that keeps the generated responses for REDIRECT_TO_BUFFER strategy. It has the logic to keep the entries for at most some pre-configured duration and also can have upper limit of entries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application allows users to upload javascript, CSS, and HTML files. We need a
I'm having a hard time testing our Wicket application using Selenium because of the
We have a wicket application for our main website. Lately we have implemented a
Our customer has asked that our application be able to communicate through HTTPS. The
After my team friend did a push operation on our repo I can't do
We use MixedParamHybridUrlCodingStrategy in our Wicket application in order to have pretty url parsed
My application runs on JPA/Hibernate, Spring and Wicket. I'm trying to convert our ORM
Our ASP.NET 3.5 website running on IIS 6 has two teams that are adding
Our application is interfacing with a lot of web services these days. We have
Our jQuery Mobile based site will be used by large screen tablets and phones.

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.