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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:39:13+00:00 2026-06-11T07:39:13+00:00

In my scenario, I have a server running which waits for a client to

  • 0

In my scenario, I have a server running which waits for a client to make a connection. It is necessary for a client to instantiate the connection because the computer I’m looking to communicate with has more restrictive network security than I do. The client will connect to me daily. So I have a jar file and process running that handles this. Server side on my end, and client side on the other end. Next, I have a web page running, and when a user clicks a specific button, I need to tell the Server app, “okay, now send data to the client”.

What is the best way to accomplish this? First of all, is there a problem with the client waiting around for data? Do I need anything special here like heartbeats etc? Is it possible to reverse the scenario and have a server connect to a client instead?

Next, how can I make it so that the application I launch when the user clicks a button actually talks to an already running jar which is handling the connection?

  • 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-11T07:39:15+00:00Added an answer on June 11, 2026 at 7:39 am

    What you need is decide the transport layer. If you use RMI -which makes sense if you use Java in all the endpoints of comunication- you don’t need the heatbeat or something.

    I should define, in web-app context (are you using Spring?) a unique instance that initializes an RMI object and publishes it at RMI registry, so clients can connect to it.

    As this object is created inside webapp process (and webapp classloader), it has access to some queue object you use. Then your webapp can add items to that queue.

    Your RMI object should have to execute in a separate thread (don’t create indiscriminate threads in Java EE, just one! or use some framework as Quartz) and consume from the blocking queue.

    [webapp]
       configfile
       create thread with server object
          publish server object with getinfo method
          getinfo method consumes from queue (queue.take())
    
    
    [client]
        connect via RMI to server object
        call method get info
    

    If a client can stay a lot without reading a new item, and there are a LOT of clients, maybe it’s worth to return null from the queue where there are no items (or it timeouts).

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

Sidebar

Related Questions

Scenario I have a bunch of processes running on a server as part of
I have a client server scenario where the type conversion did by the SoapClient
Say I have a simple client/server scenario with one method: // client code $client
We have one scenario where we don't want to change the server JVM which
All, I'm looking for advice over the following scenario: I have a component running
Scenario: I'm running code on the client that connects to a server and uses
I am running Aprelium Abyss Web Server from my home computer and I have
Here is the scenerio: We have an application running on Webphere Portal Server 6.1
Scenario: We have a great deal of server environmental information (names, IPs, roles, firewall
i have a scenario, i want to monitor database(SQL Server) table, if record is

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.