|
From: pedro.costa <ped...@ne...> - 2004-01-21 17:35:00
|
Hi all,
=20
I'm trying to load two different applicationContext xml file using =
ClassPathXmlApplicationContext.
=20
The files have the same name, but are on diferent class paths.
=20
What is happening is that it seams that spring is always finding the =
same file in both cases, regardless of the classpath that is used when =
creating ClassPathXmlApplicationContext.
=20
I can see it from the logs.
=20
If i change the name of one of the files, it works fine.
=20
Is this a known problem?
=20
here is the code:
=20
ClassPathXmlApplicationContext appContext =3D new =
ClassPathXmlApplicationContext("replica/command/beans/beans.xml");
BeansMappings beansMappings =3D =
(BeansMappings)appContext.getBean("serverCommandMappings");
// no problem here ...=20
ClassPathXmlApplicationContext appContext =3D new =
ClassPathXmlApplicationContext("replica/server/beans.xml");
Listener listener =3D (Listener)appContext .getBean("serverListener");
// Problem! it can't find it .... it seams to have loaded the first file =
again.
// If i use a diferent file name,it works fine.
=20
thanks,
Pedro.
=20
=20
=20
|