Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 53743 invoked from network); 28 Nov 2006 02:18:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2006 02:18:17 -0000 Received: (qmail 86828 invoked by uid 500); 28 Nov 2006 02:18:16 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 86803 invoked by uid 500); 28 Nov 2006 02:18:16 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 86787 invoked by uid 99); 28 Nov 2006 02:18:16 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Nov 2006 18:18:16 -0800 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=DNS_FROM_RFC_ABUSE,FROM_HAS_ULINE_NUMS X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [216.252.111.223] (HELO web57207.mail.re3.yahoo.com) (216.252.111.223) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 27 Nov 2006 18:18:02 -0800 Received: (qmail 71082 invoked by uid 60001); 28 Nov 2006 02:17:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=uMc5aCMTD/BdrfXKXK881VnaJ8MDdGZH/VC2733uzVtpm3auVGldUFda8kQPQ/3cM0hL4fDabmolWUEJPD82s9yc26KgCoNZUvIzRFxkucXFBKf9qkP0hgQQPXWGV57PSJon3IXfrdUsHsH8qAiG/KxDk2mG5w0fY2eo07jwRzE=; X-YMail-OSG: w8NxAXIVM1l91xLiLLtgiwsbpCW9oNQuV360nTnvjuORGwuh.yBVA24nMyqkzR0F6VVpYrfJJK9vCktZp_M.zxJU2BAJ0Jy9sYsUQkrC2MddWw31qbiksWxM6a2LONojnkRmj0bNTMEy3Bs- Received: from [203.202.23.100] by web57207.mail.re3.yahoo.com via HTTP; Tue, 28 Nov 2006 13:17:40 EST Date: Tue, 28 Nov 2006 13:17:40 +1100 (EST) From: Matthew Hannay Subject: Re: axis to spring To: axis-user@ws.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <423569.70356.qm@web57207.mail.re3.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org 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: Spring, AAR #2 --------------------------------------------------- If I only deploy spa1 I get: ---------------------------------------------------- [java] Response: Spring, AAR #1 Note the over written injected value!! Matt --- robert lazarski 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 > wrote: > > > > I have looked at the Spring code for the > > ClassPathXmlApplicationContext > > and the java docs say: > > > > * > > *

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 > wrote: > > > > > I sure am using the Axis2 Service classloader. > > > > > > It still over writes. > > > > > > Matt > > > > > > --- robert lazarski > > > 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 > > > > wrote: > > > > > > > > > > > > > > > I am just getting back to this after a few > days > > > > .... > > > > > > > > > > > > > > > > Are you looking at the latest docs ? > > > > > Yeah, I am using the latest docs. However > > > looking > > > > at > > > > > the new 1.1 doco I't makes things a lot > clearer. > > > > > > > > > > However I have worked out what my problem is > > > > > and this could potentially be an axis bug. > > > > > > > > > > I have 2 aars each configured to run the > spring > > > > init > > > > > on startup. > > > > > > > > > > what I am finding is the second deployed aar > > > over > > > > > writes the applicationContext of the first!! > > > > > > > > > > so when I hit the first service I get a no > > > spring > > > > bean > > > > > found error. > > > > > > > > > > The aar deployed second works fine and if I > only > > > > depoy > > > > > the first aar it works fine too. > > > > > > > > > > To me it looks like the second aar blows > away > > > the > > > > > first > > > > > aar's environment? I have not fished through > the > > > > code > > > > > to verify this yet. > > > > > > > > > > Does any one have any insight? Should I > raise > > > this > > > > as > > > > > a JIRA? > > > > > > > > > > Matt > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- robert lazarski > > > > > wrote: > > > > > > > > > > > Are you looking at the latest docs ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://svn.apache.org/repos/asf/webservices/axis2/branches/java/1_1/xdocs/1_1/spring.html > > > > > > > > > > > > Give me an idea of what's lacking and I'll > try > > > > and > > > > > > get it in for the > > > > > > imminent 1.1 release. > > > > > > > > > > > > Robert > > > > > > > > > > > > On 11/13/06, Matthew Hannay > === message truncated === Send instant messages to your online friends http://au.messenger.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org