On 2/8/07, David Blevins <[EMAIL PROTECTED]> wrote:
It's something I've been tempted to add for the longest time but couldn't find an elegant way. I had only thought about it from an OpenEJB perspective and it had always seemed odd considering the conf file already is properties based. It wasn't till Dain asked me for the feature and wanted to use it for OpenJPA and CORBA that it occurred to me we could just go the opposite direction and call it system.properties and open it wide up as a general way to add any system property to the System.getProperties() instance, OpenEJB specific or not.
I don't mean to repeat others' responses, but I like the idea, too. It could be layered so there could be more than one system property provider. You could extend it even futher where your properties be values retrieved from a database (well, in this case you'd need to set up the connection first, but that's another story). All in all, I like it and it should be easy to implement. Just read the file (whatever the format could be in) and populate a SystemInstance instance. If the file doesn't exist, do nothing. I think it's a great time for lurkers to show up and develop it. We could indeed discuss other possibilities, but the very bare implementation would just read the file and hand it over to SystemInstance. As Dave pointed out, these properties had the lowest priority and would be overriden by other properties, but a developer doesn't have to think about it as long as the implementation is hooked as one of the very first initialization calls in OpenEJB. I like it! No need for jvm properties anymore (the solution would mimic the jvm properties handling). It's said that "great ideas are born in great minds". Shall we propose a change to the proverb so it'll better reflect who it talks about? ;-) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
