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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:51:33+00:00 2026-05-12T15:51:33+00:00

This might sound complex but i will ask anyway: I am running a service

  • 0

This might sound complex but i will ask anyway:

I am running a service A which uses class X. I want to start another service B which uses classes A besides new classes.

Service A is already running. I do a hot deployment of Service B.

Here is the real question – Will Service B use the same instance of class X or a separate instance. How can singleton class help me here?

  • 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-12T15:51:33+00:00Added an answer on May 12, 2026 at 3:51 pm

    Each Service will run in it’s own operating System (OS) Process space, and each process space has it’s own class instances. A “singleton” class is normally coded using static fields in a class, which would be local to the process space the code was running in, so no, they will not share singletons. Each will get it’s own instance.

    You can do what you are trying to do, however, using some external shared synchronization process, (for example, exposing a singleton over whatever the java equivilent is to .Net Remoting (or WCF) – a network exposed endpoint which is coded to use a Singleton, and have both your services “connect to” and use that remotely accessible Singleton)

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

Sidebar

Related Questions

This might sound like a stupid question but ... will WPF stop running in
This might sound rather awkward, but I want to ask if there is a
this question might sound a little bit weired... But I will try to explain:
this might sound like a stupid question, but i want to clarify a concept:
This might sound like a noob question, but here it goes anyway. Can BlackBerry
This might sound a bit complicated, but what I want to do is find
This might sound crazy but is there a debugger out there which automatically breaks
This might sound super crazy but I really want to know if this can
This might sound silly, but I'd only want to display bars in a JfreeChart
This might sound silly, but my umbraco 5.1 application (after upgrading from 5.0) simply

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.