-
Aug 28th, 2006, 08:19 PM
#1
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
-
Aug 29th, 2006, 12:45 AM
#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
-
Aug 29th, 2006, 12:54 AM
#3
Thanks Andreas,
I think you had a similar thread and I later found that it cant be done directly which is disappointing.
-
Aug 29th, 2006, 01:22 AM
#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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules