• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Loading classes reside outside application context

Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Gurus!
i have clustered application abc.ear, what i deloyed in server/all/farm folder of JBOSS4.0.5 Application Server.

- abc.ear application dynamically loads all classes via Class.forName() method and then create their instances
- All classes loaded & instantiated by abc.ear placed in their own jar files not in abc.ear,
- But all jar files are placed in the farm folder where abc.ear deployed..
- abc.ear loads these classes in a ConnectorMBean start() method and cache these instances.
- these instances are used whenever abc.ear received a message for them

- By Default JBOSS4.0.5 allows access of classes resides in different jar files

Problem i am facing while loading & instantiating plug-in classes in the startup of abc.ear, in the start method of ConnectorMBean

if i load & instantiated these plug-in classes on demand, like when abc.ear receive a message it first checks that class has been loaded & instantiated if not then create and place in the cache..for subsequent uses.. this works fine...
but in this case first message pay the cost of loading resources
by Plug-in class what i don't want due to performance reason..

I think its due to different classes loader or JBOSS Class Loader chaining?
but still haven't got it done.

Does any one know.. what should i do if i want to do it at startup of abc.ear application instead on demand?
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic