2 Replies Latest reply on Jan 29, 2013 4:07 AM by irbash

    Encrypted classes - problem with class loading

    wendro

      Hello,

       

      We use JBoss 4.2.3. It served us well in comparsion to other web containers (we lived in the dark times before ).

       

      We have server application (EAR) which contains some ejb beans (JARs). We also have a client written in eclipse RCP. We secured the sources of the client with post release class encryption. Sepcial class loader is decrypting them when running (native algorithm). Additionally we secured that it can be run only on the destination station (generating maching id used in encryption). I know how that it is only a time consuming puzzel for proffesionals but this aint the point of this post and we deceided it will suffice.

       

      I would be gratfull for some tips about injecting custom class loader into JBoss.

       

      I did gather some materials but I did not find any remarks about injecting custom class loader - only configuration of the ones in place. Im afraid that I will have to go deep and modify some jboss sources and I would love to ommit this scenario?

       

      Cheers and merry christmas everyone

      Wendro

        • 1. Re: Encrypted classes - problem with class loading
          wendro

          I solved my problem but I did nasty hack.

           

          First of all I've created CustomURLClassLoader using the original source of URLClassLoader. I was then able to inject process bytecode method before defining class. I had to extend RepositoryLoader to inherint not from URLClassLoader but from my custom one.

          • 2. Re: Encrypted classes - problem with class loading
            irbash

            Hi Michal,

             

            I know that it is more than 2 years since you posted this topic. I am stuck in the same thing, I have to write a custom class loader for jboss 5.1 to load encrypted classes.

            Can you kindly give me some more information as to how you did it.

             

            Thanks,

            Irfan