Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8239875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:17:44+00:00 2026-06-07T20:17:44+00:00

I have two ApplicationContexts for my project (very huge project). One old xml with

  • 0

I have two ApplicationContexts for my project (very huge project).
One old xml with data

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="autodetect">
</beans>

now I need to add my other project applicatinContext to it or any other way so that none of the modules will be impacted

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">


<bean id="positionResponsesDAO"
    class="com.xxx.modules.worklist.DAO.Impl.PositionResponsesDAOImpl">
    <property name="dataSource" ref="dataSource" />
</bean>

<bean id="positionDAO"
    class="com.xxx..modules.worklist.DAO.Impl.PositionDAOImpl">
    <property name="dataSource" ref="dataSource" />
</bean>

<bean id="nextActionDAO"
    class="com.xxx..modules.worklist.DAO.Impl.NextActionDAOImpl">
    <property name="dataSource" ref="dataSource" />
</bean>
     <bean>
      ....... few more
     </bean>

   <bean id="workOrderManager" class="com.xxx.modules.worklist.action.manager.impl.WorkOrderManagerImpl">
    <property name="positionDO" ref="positionDO" />
    <property name="moveWorkOrderDO" ref="moveWorkOrderDO" />
    <property name="nextActionDO" ref="nextActionDO" />
    <property name="positionDAO" ref="positionDAO" />
    <property name="moveResponsesDAO" ref="moveResponsesDAO" />
    <property name="moveWorkOrderDAO" ref="moveWorkOrderDAO" />
    <property name="nextActionDAO" ref="nextActionDAO" />
    <property name="positionResponsesDAO" ref="positionResponsesDAO" />
</bean>


<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
    destroy-method="close">
    <property name="driverClass" value="oracle.jdbc.driver.OracleDriver" />
    <property name="jdbcUrl" value="driverUrl" />
    <property name="user" value="MCMGR" />
    <property name="password" value="MC123" />
</bean>
  </beans>

the first one has Auto-wiring enabled and this one has and needs manual wiring. How can i combined both of them to put into one xml or read two configurations.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:17:47+00:00Added an answer on June 7, 2026 at 8:17 pm

    I don’t see why reading two or more application context files is difficult. The usual Spring idiom is to partition configuration according to layer. I typically have configuration for persistence, service, web, etc. If it’s a web application, I just add all of them in using the ContextLoaderListener. You can specify as many configuration files as you need.

    I would consider one huge configuration file a liability in the same way that I would look down on one huge class for everything. Decomposition is a computer science fundamental. I’d recommend partitioning your configuration.

    Mixing annotation-based and XML-based configuration isn’t a problem, either.

    You’ll only have an issue if the two configurations overlap. You’ll have to remove one or the other for the conflicted beans.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two classes (MVC view model) which inherits from one abstract base class.
I have two spring config files and I'm specifying them in my web.xml as
Let's say I have following Spring config (version of Spring is 3.0.3): <?xml version=1.0
I have two tables inside a database. One stores unique userNames and a unique
I have two Hibernate data object. The first is a User (with unique id,
I have an interesting problem, I have two web services defined in a spring-conf.xml
Have two events: $('body').mouseup(function(e){} and $('.toggle').click(function(e){} I only want one of these to trigger.
i have a problem with spring autowire feature which found two beans with the
I find myself using two identical beans in my applicationContext.xml and my applicationContext-test.xml. I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.