Announcement Announcement Module
Collapse
No announcement yet.
Setting methods without a set prefix Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting methods without a set prefix

    Hi,

    I'm not sure why I can't seem to find any information regarding my issue as I thought it would be a common problem.

    I have a method in a log4j class called addAppender. This does not conform to the Java bean specification as it is not setAppender. Is there any way that I can tell Spring to use the method "addAppender" as when I configure "addAppender" as the property name it is looking for "setAddAppender". I'm sure that I have done this before, but do you think I can find it again!!

    Thanks

  • #2
    The configuration follows the JavaBeans conventions (and uses the java.beans classes). So there is not direct support for add-methods. However you might try MethodInvokingFactoryBean or experiment with scripting in the config file.

    Regards,
    Andreas

    Comment


    • #3
      Thanks Andreas,

      I think you had a similar thread and I later found that it cant be done directly which is disappointing.

      Comment


      • #4
        Don't be too disappointed

        As far as I remember, there were ideas for handling these issues, but they have been dropped in favor of the more capable scripting approach. So with scripting things should be done quite easily.

        Regards,
        Andreas

        Comment

        Working...
        X