-
Oct 1st, 2007, 09:01 AM
#1
Progtammatic Parameterization
I'm trying to find a clean way to turn command line arguments (or the equivalent) into ${xxx} substitutions in some bean definitions.
It seems surprisingly convoluted to accomplish. I can use the property processor and set the args into system properties, or I can pre-configure the pathname of a property file and write out before loading the bean definitions.
I keep thinking that there must be a more straightforward idiom here.
-
Oct 5th, 2007, 11:54 AM
#2
System properties are probably the way I would do it. Doesn't seem particularly convoluted to me - most command line users are going to be pretty familiar with -D. Unless I'm missing something?
-
Oct 5th, 2007, 11:55 AM
#3
I found a solution
I personally find it messy to communicate between components by adding system properties. However, I realized that by using the postprocessor OUTSIDE of the context, I could create it, load it with values, and run it, all under program control.
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