The idea in the 'multiple spring instances" case is to take advantage
of the fact that each AAR has its own classloader, and therefore each
spring instance with the proper init is in a completly seperate
classloader per AAR. Using <AXIS2_HOME>/lib I think is what you really
want to avoid, as that indicates a web app level classloader, ie, one
spring instance will step on another.

HTH,
Robert

On Fri, Feb 15, 2008 at 2:50 PM, Sunesh Kumra
<[EMAIL PROTECTED]> wrote:
>
>
>
> Hello,
>
> I followed the example http://ws.apache.org/axis2/1_1/spring.html and got a
> Axis2 service (not deployed in Servlet Container) using Spring to work. I
> have not packaged spring.jar in the .aar but have included it in
> <AXIS2_HOME>/lib and it all works fine.
>
> However, the moment I deploy another .aar file into the Axis2, the previous
> .aar stops working and the new one works fine. The error returned is:
>
> <soapenv:Body>
>          <soapenv:Fault>
>             <faultcode>soapenv:Server</faultcode>
>             <faultstring>No bean named 'amountChargingServiceSkeleton' is
> defined</faultstring>
>             <detail />
>          </soapenv:Fault>
>       </soapenv:Body>
>
> Part of applicationContext.xml is shown below:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
> "http://www.springframework.org/dtd/spring-beans.dtd";>
>
> <beans>
>   <!-- Configure spring to give a hook to axis2 without a ServletContext -->
>   <bean id="applicationContext"
>
> class="org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder"
> />
>  <!-- Wiring the AmountChargingServiceSkeleton with the Request Handler's
> reference -->
>    <bean id="amountChargingServiceSkeleton"
>         class="test.AmountChargingServiceSkeleton">
>   </bean>
> // removed other parts of the file
>
> Part of services.xml is shown below:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- This file was auto-generated from WSDL -->
> <!-- by the Apache Axis2 version: 1.3  Built on : Aug 10, 2007 (04:45:47
> LKT) -->
> <serviceGroup>
>     <service name="AmountChargingServiceSpringInit" class="test.SpringInit">
>         <description>This web service initializes Spring.</description>
>         <parameter name="ServiceClass"> test.SpringInit</parameter>
>         <parameter name="ServiceTCCL">composite</parameter>
>         <parameter name="load-on-startup">true</parameter>
>         <operation name="startUp">
>             <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>         </operation>
>     </service>
>     <service name="AmountChargingService">
>         <messageReceivers>
>             <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out";
> class="test.AmountChargingServiceMessageReceiverInOut"/>
>
>         </messageReceivers>
>         <parameter
> name="ServiceClass">test.AmountChargingServiceSkeleton</parameter>
>         <parameter name="useOriginalwsdl">true</parameter>
>         <parameter name="modifyUserWSDLPortAddress">true</parameter>
>         <parameter name="ServiceObjectSupplier"
> locked="false">org.apache.axis2.extensions.spring.receivers.SpringAppContextAwareObjectSupplier</parameter>
>
>         <parameter name="SpringBeanName"
> locked="false">amountChargingServiceSkeleton</parameter>
>         <parameter name="ServiceTCCL" locked="false">composite</parameter>
>         <operation name="chargeAmount"
> mep="http://www.w3.org/ns/wsdl/in-out";>
>        // removed other parts of the file
>
> Has anyone got multiple .aar files which all include Spring to work in Axis2
> ?
>
> Cheers,
>         Sunesh
>
> Ericsson Services Limited
>
> Registered Office: Unit 4, Midleton Gate, Guildford Business Park,
> Guildford, Surrey, GU2 8SG
>
> Registered Number in England and Wales: 3709800
>
> This communication is confidential and intended solely for the addressee(s).
> Any unauthorised review, use, disclosure or distribution is prohibited. If
> you believe this message has been sent to you in error, please notify the
> sender by replying to this transmission and delete the message without
> disclosing it. Thank you.
>  Ericsson Services Limited does not enter into contracts or contractual
> obligations via electronic mail, unless otherwise agreed in writing between
> the parties concerned.
>  E-mail including attachments is susceptible to data corruption,
> interruption, unauthorised amendment, tampering and viruses, and we only
> send and receive e-mails on the basis that we are not liable for any such
> corruption, interception, amendment, tampering or viruses or any
> consequences thereof.
>
>
>  ______________________________________________________________________
>  This email has been scanned by the MessageLabs Email Security System.
>  For more information please visit http://www.messagelabs.com/email
>  ______________________________________________________________________
>

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

Reply via email to