1 Reply Latest reply on Mar 13, 2008 10:51 AM by Kevin Conner

    Load/read resources...

    Kent Peterson Newbie

      Hi,

      Scenario:
      have a generic class packaged in an infrastructural esb-archive which business-services can depend on. When business-services makes call to the generic class it needs to get in touch with resources in the business-archive, e.g. the generic class needs to load/read a resource from the business-archive by use of a passed filename or something to perform it's generic functionality.

      Question:
      What is the best way to handle this?


      Thanks in advance

        • 1. Re: Load/read resources...
          Kevin Conner Master

          If I understand what you are asking then you need to look into the thread context classloader. You can use this to load resources from the originator's classloader but you must be careful, if you load classes or hold onto the classloader reference then you can prevent that classloader from being GCed.