I am converting an existing POJO to be an JAXB compliant. Everything works fine except for one of the getter method of the pojo where I need an additional logic specific to rendering XML. However, this getter is already called somewhere within the application and I cannot modify this method's behavior. How do I normally deal with such method name collisions? Is there a way I create a separate method just for JAXB purpose adn mark the currentmethod as XMlTransient?
Thanks
Yes, exactly what you said would work. Make the one method @XmlTransient, then write another method and make it an @XmlElement(name="whatever element name").