Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Singletons and cache

  1. #11
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I guess it's useful to know a little about what you're doing here. If you only want one bean, it's going to be a singleton if you only one want person updating it make access synchronized, is there something I'm missing?
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  2. #12
    Join Date
    Aug 2009
    Location
    Colorado
    Posts
    26

    Default

    I am keeping track the number of processes running in an external system. We have a limit of processes that we can start and I am limiting that.

    I will have a polling consumer that will update the number of processes running.

    A message broker will need to have access to that information to determine if it can send a message that will start an external process.

    I want to basically have one value in memory that can be updated.

    BTW thanks for the help!

  3. #13
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I don't think this has to be particularly complicated, all you need to do is synchronize access like you would normally.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •