java - Disadvantages of having child first class loader? -


i developing application loads different apps in different class loaders, thinking use child first class loader. solve problem child apps have dependency on different version of class, main application uses. there side effects using approach? if yes can suggest me approach solve problem?

the side effects are:

  • you use more memory store multiple versions of class (shouldn't problem really)
  • make sure class instances never cross boundaries. if load classfile twice 2 different classloaders, not compatible

for example:

a = new a();   // classloader1 system.out.println(a instanceof a)  // classloader2 

this print "false"


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -