Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Spring Configurations

 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,
I am creating one war file which consisits of many jars in its lib directory.I have two JAR Files say A.jar & B.jar where indivisually these jar files contain springConfig.xml & inside these files i am defining one class using <bean id="abc".....> tag...Now interesting stuff is in both config files i need the same class (which is existing in some 3rd Jar say C.jar)so i have defined it in each file with same id(attribue of bean tag)..Initially i thought it won't work..but its working fine...

I am unable to get whether two different instances are being created or spring is using same instance for both JARs(A & B)
Ya One more thing is I have placed applicationContext.xml along with web.xml (i.e.under WEB-INF) which points to inividual springConfig.xml in A & B respectively

Thanx in Advance
Shrinivas
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Ranchers,
Need your Help!!!
Shrinivas
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try to define your bean with singleton="false" ?
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic