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?