Java question

Discussion in 'OT Technology' started by scrotomus, Jan 14, 2003.

  1. scrotomus

    scrotomus you're a scumbag

    Joined:
    Aug 5, 2002
    Messages:
    70,262
    Likes Received:
    0
    I need some classes run when the application starts up.

    (as it is right now the first user who logs into the application gets a huge performance hit because a whole bunch of things are initializing)

    I looked into class loader but it only seems to be able to load classes, not actually run them..

    any ideas?
     
  2. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    Is it a web application?
     
  3. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    Couldn't you use the class loader and as soon as it's loaded run the class and kinda multi-thread the process to load new classes while that other one is running?

    Just an idea... Learning java now so I dont' know what it's possibilites are.
     
  4. scrotomus

    scrotomus you're a scumbag

    Joined:
    Aug 5, 2002
    Messages:
    70,262
    Likes Received:
    0
    yes, a massive n-tier web application so its a little complicated
     
  5. scrotomus

    scrotomus you're a scumbag

    Joined:
    Aug 5, 2002
    Messages:
    70,262
    Likes Received:
    0
    I really don't know much about the class loader, how would I get it to run a class?
     
  6. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    can you please give more details and how would running classes would increase the performance?
     
  7. crotchfruit

    crotchfruit Guest

    dunno much about your project, but from my experience most programs have some sort of initialization function, even if they're windows-based or multithreaded. if it's a java app, don't you have a 'public static void main' function? :dunno:
     
  8. D1G1T4L

    D1G1T4L Active Member

    Joined:
    May 4, 2001
    Messages:
    16,489
    Likes Received:
    0
    Location:
    Bay Area
    yea i dont get what he is talking about either
     
  9. scrotomus

    scrotomus you're a scumbag

    Joined:
    Aug 5, 2002
    Messages:
    70,262
    Likes Received:
    0
    "can you please give more details and how would running classes would increase the performance?"



    I have some singleton classes, such as connection pools and code table lookups that I want to preload so I dont have to hit the database every time.
     
  10. Wiglaf

    Wiglaf OT Supporter

    Joined:
    Jun 2, 2003
    Messages:
    3,800
    Likes Received:
    10
    Location:
    Ottawa, ON

    My brain hurts. [/Ralph Wiggum]
     
  11. if it's a web application, isn't there an application startup/global init type operation?

    what server side tech is it?
     

Share This Page