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 9171115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:07:09+00:00 2026-06-17T16:07:09+00:00

I need to use a spring bean in 2 places in my mule flow.

  • 0

I need to use a spring bean in 2 places in my mule flow. Bean takes 3 properties of which 1 of them is another bean. Is it possible to define main bean in single place and overwrite only the changed properties. Say this is my bean declaration:

<custom-transformer name="soapFaultTransformer" class="com.xxx.xx.transformer.VelocityMessageTransformer">
<spring:property name="velocityEngine"  ref="velocityEngine" />
<spring:property name="templateName"    value="soapFault.vm" />
<spring:property name="beanClass">
    <spring:bean class="com.xxx.services.xx.Soap11Fault">
            <spring:property name="faultCode"   value="Client" />
            <spring:property name="faultString" value="Invalid Request" />
            <spring:property name="detail"      value="This request is not valid" />
    </spring:bean>
</spring:property>

I just want to change below 2 properties:

 <spring:property name="faultString" value="Invalid Request" />
 <spring:property name="detail"      value="This request is not valid" />

Is it possible?

Thank you

  • 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-17T16:07:10+00:00Added an answer on June 17, 2026 at 4:07 pm

    The best approach for this is to declare a global abstract parent bean, configured with the common properties, then refer to it where you need it, setting the specific properties to the desired values.

    Here is the declaration of the abstract bean for the SOAP fault:

    <spring:beans>
        <spring:bean name="abstractSoap11Fault" abstract="true"
            class="com.xxx.services.xx.Soap11Fault">
            <spring:property name="faultCode" value="Client" />
        </spring:bean>
    </spring:beans>
    

    When we use this as a parent bean, we specify the additional properties with their specific values:

    <custom-transformer name="soapFaultTransformer"
        class="com.xxx.xx.transformer.VelocityMessageTransformer">
        <spring:property name="velocityEngine" ref="velocityEngine" />
        <spring:property name="templateName" value="soapFault.vm" />
        <spring:property name="beanClass">
            <spring:bean parent="abstractSoap11Fault">
                <spring:property name="faultString" value="Invalid Request" />
                <spring:property name="detail"
                    value="This request is not valid" />
            </spring:bean>
        </spring:property>
    </custom-transformer>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

@Repository @Service @Controller @Component -->only use for spring managed bean (no need weaving) -->@repository,
To use Spring Integration in a Spring XML configuration file, I need to declare
How do I use Spring Security in a standalone application. I just need to
Currently my jsp 2.0 tags that need spring beans use this code: ac =
Background: I have a Spring 2.5/Java/Tomcat application. There is the following bean, which is
I'm new to Spring and I'm wondering if its possible to use numerous transaction
Say I need to rely on several implementations of a Spring bean. I have
I use JSR303 bean validation annotations in my spring-mvc managed bean to validate text
I need to get the spring application context from a non bean object. In
Trying to auto-wire properties to a bean in Spring 3.0.5.RELEASE , I'm using: config.properties

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.