Give this about 15 minutes or so:

http://www.braziloutsource.com/random/axis2.zip

Good luck,
Robert

On 11/27/06, Matthew Hannay <[EMAIL PROTECTED]> wrote:

robert,

Your WAR might be useful as this is killing me!!

Matt

--- Matthew Hannay <[EMAIL PROTECTED]> wrote:

>
> I also removed the unwanted jars from the
> axis2\webinf\lib
>
> Matt
>
> --- Matthew Hannay <[EMAIL PROTECTED]>
> wrote:
>
> > robert,
> >
> > Thanks for your example, however the spring config
> > for
> > the second deployed been over writes the first.
> >
> > It works as your beans are the same name.
> > My beand definitions for each aar are different!!
> >
> > What I did -
> > 1. fresh tomcat 5.5.20
> > 2. droped the axis2 1.1 war into the web apps
> > directory
> > 3. built spa1 and spa2 and put them in the
> services
> > 4. startup tomcat.
> >
> > If you deploy both aars, spa1 and spa2, run your
> > 'ant
> > rc' for spa1 you get
> >
> >
> ---------------------------------------------------
> > [java] Response: <example1:string
> > xmlns:tns="http://spring"; xmlns:example1=
> > http://springExample.org/example1";>Spring, AAR
> > #2</example1:string>
> >
> ---------------------------------------------------
> >
> > If I only deploy spa1 I get:
> >
> ----------------------------------------------------
> > [java] Response: <example1:string
> > xmlns:tns="http://spring"; xmlns:example1=
> > http://springExample.org/example1";>Spring, AAR
> > #1</example1:string>
> >
> >
> > Note the over written injected value!!
> >
> > Matt
> >
> >
> > --- robert lazarski <[EMAIL PROTECTED]>
> > wrote:
> >
> > > I just gave axis2 std-bin 1.1 a run with 2 aar's
> > > having the same spring
> > > beans supplied with different messages, and it
> > works
> > > for me. You can
> > > download both env's with just the name of the
> > > services changed, names of the
> > > aar's changed etc, different messages injected
> to
> > > the spring beans etc here
> > > to test if you'd like:
> > >
> > >
> >
>
http://www.braziloutsource.com/random/axis2_spring_2_aar.zip
> > >
> > > Just cd to each dir and run 'ant rc' to execute
> > the
> > > client after installing
> > > the aar files - tomcat 5.5 in my case. Also, as
> > > explained in the docs remove
> > > _all_ spring files from the war WEB-INF/lib -
> > those
> > > are primarily there for
> > > the ServletContext / not inside the aar case.
> > > Everything needed is inside
> > > the aar's .
> > >
> > > BTW, the axis2 service classloader should and
> > > seemingly does in this case
> > > have complete aar seperation, ie do a '
> > >
> >
>
ClassPathXmlApplicationContext.setClasspath(AxisService.getClassLoader())
> > > and that should be enough. There were some
> > > classloader issues during
> > > the 1.1dev cycle but from what I see at this
> point
> > > eveything is
> > > working as
> > > expected. If you still have problems please
> create
> > a
> > > jira and upload your
> > > AAR files.
> > >
> > > HTH,
> > > Robert
> > >
> > > On 11/27/06, Matthew Hannay
> > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I have looked at the Spring code for the
> > > >     ClassPathXmlApplicationContext
> > > > and the java docs say:
> > > >
> > > > *
> > > > * <p>Note: In case of multiple config
> locations,
> > > > later bean definitions will
> > > > * override ones defined in earlier loaded
> files.
> > > This
> > > > can be leveraged to
> > > > * deliberately override certain bean
> definitions
> > > via
> > > > an extra XML file.
> > > > *
> > > >
> > > > I'll work out what needs to be done to ensure
> > that
> > > > loaded contexts can be maintained and post my
> > > > findings.
> > > >
> > > > Matt
> > > >
> > > >
> > > > --- Matthew Hannay <[EMAIL PROTECTED]>
> > > wrote:
> > > >
> > > > > I sure am using the Axis2 Service
> classloader.
> > > > >
> > > > > It still over writes.
> > > > >
> > > > > Matt
> > > > >
> > > > > --- robert lazarski
> <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > > > Your startUp() code has to use the Axis2
> > > Service
> > > > > > classloader:
> > > > > >
> > > > > > public void startUp(ConfigurationContext
> > > ignore,
> > > > > > AxisService service) {
> > > > > >
> > > > > >         try {
> > > > > >             System.out.println("Starting
> > > spring
> > > > > > init");
> > > > > >             ClassLoader classLoader =
> > > > > > service.getClassLoader();
> > > > > >             ClassPathXmlApplicationContext
> > > appCtx
> > > > > =
> > > > > > new
> > > > > >
> > ClassPathXmlApplicationContext(new
> > > > > > String[] {"
> > > > > > applicationContext.xml"}, false);
> > > > > >
> > > > > appCtx.setClassLoader(classLoader);
> > > > > >                 appCtx.refresh();
> > > > > >             System.out.println("spring
> > > loaded");
> > > > > >         } catch (Exception ex) {
> > > > > >             ex.printStackTrace();
> > > > > >         }
> > > > > >     }
> > > > > >
> > > > > > If you are still getting the appCtx
> > > overwritten
> > > > > with
> > > > > > that code in both
> > > > > > AAR's, let us know and we'll take a look
> at
> > > it.
> > > > > >
> > > > > > Robert
> > > > > >
> > > > > > On 11/22/06, Matthew Hannay
> > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > >
> > > > > > > I am just getting back to this after a
> few
> > > days
> > > > > > ....
> > > > > > >
> > > > > > >
> > > > > > > > Are you looking at the latest docs ?
>
=== message truncated ===




Send instant messages to your online friends http://au.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to