Results 1 to 2 of 2

Thread: several spring context in one application

  1. #1
    Join Date
    Aug 2006
    Posts
    2

    Default several spring context in one application

    Hi, I developped an application using spring, and I would like to add it to another application which already use spring. Actually my new application is a workflow one and I want to add it in a intranet application. Well my problem is that I want my application to work on its own, and, after making a jar of it (and without doing any change in the applicationContext file), use it in my bigger application. So the problem is that several bean will have same names and properties file will throw me into troubles. So is it possible to have several spring context ? How can I do it ? Thank you for any help !

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    If you want to use beans with the same name inside the same application then you'll have to use different application context - that is you should not concatenate the application context since then the definitions will clash and only one will win.
    There is an ongoing OSGi support for Spring which should provide an easy and flexible platform to deploy application context with beans having the same name however, isolated from each other.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •