• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Scanning XML file...Best performanent approach ?

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ranchers,
I want to know the most performanent way to scan the XML files in spring. I have few XML files which contains either package name where all the bean resides or the java bean name which needs to be instantiated. In both the cases , at server start up, I want all the beans in the XML files to get instantiated. Can anyone please tell me the most performanent way to scan these files and instantiate all the java beans ?
Any white paper / link will greatly be appriciated.
Thanks in advance
Samir
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Samir,
I don't follow. You don't have a Spring config file, but a list of beans?
 
samir ware
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jeanne
Thanks a lot for the reply. Let me put it this way. I have an application in which I am scanning some spring specific files(These files are having spring style beans) . For this I have used a class Scanner which extends "ComponentScanBeanDefinitionParser" . Though problem here is whenever it scans for the files, it scans the entire class path . Because of which my server start up time has increased considerably as all these files are getting scanned at server start-up.
Is there any way by which I can tell spring that we need to scan in this specific path insted of spring scanning entire class path and then instantiating beans which it found in it .
Thanks
Samir
 
samir ware
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
or more precisely
I want to let the spring framework know through XML file, the location where it can find all the .class files which are refereed by spring configuration file . In short I want to specify the class path in the XML file. Is it possible to do so ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic