Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 1dae88a

Browse files
committed
Updated Readme
1 parent a4b41ef commit 1dae88a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
</pre>
1717

1818
### Example Spring XML Configuration ###
19-
* See _src/main/resources/spring-reloadableProperties.xml_ for example configuration
19+
* See [spring-reloadableProperties.xml](https://github.com/jamesemorgan/DynamicPropertyLoader/blob/master/src/main/resources/spring/spring-reloadableProperties.xml) for example configuration
2020
* All main components can be extended or replaced if required
2121

2222
### How it Works ###
23-
When the spring Application Context is started an implementation of Springs PropertySourcesPlaceholderConfigurer is instantiated to perform additional logic when loading and setting values from a given set of properties files. (see:ReadablePropertySourcesPlaceholderConfigurer.class)
23+
When the spring Application Context is started an implementation of Springs [PropertySourcesPlaceholderConfigurer](http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.html) is instantiated to perform additional logic when loading and setting values from a given set of properties files. (see: [ReadablePropertySourcesPlaceholderConfigurer](https://github.com/jamesemorgan/DynamicPropertyLoader/blob/master/src/main/java/com/morgan/design/properties/internal/ReadablePropertySourcesPlaceholderConfigurer.java))
2424

25-
During the time of ApplicationContext start also a new instance of InstantiationAwareBeanPostProcessorAdapter.class is created that allows post bean processing.
25+
During the time of ApplicationContext start also a new instance of [InstantiationAwareBeanPostProcessorAdapter](http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/InstantiationAwareBeanPostProcessorAdapter.html) is created that allows post bean processing.
2626

27-
Google Guava is used to implement a simple Publish & Subscribe (Pub-Sub) Pattern so that beans can be updated once created, i.e. a bean can subscribe to events. (see: EventBus)
28-
EventBus was chosen as it is a very easy and simplistic way to implement loosely couple object structure. (see: blog)
27+
Google Guava is used to implement a simple Publish & Subscribe (Pub-Sub) Pattern so that beans can be updated once created, i.e. a bean can subscribe to events. (see: [EventBus](http://code.google.com/p/guava-libraries/wiki/EventBusExplained))
28+
EventBus was chosen as it is a very easy and simplistic way to implement loosely couple object structure. (see: [blog](http://codingjunkie.net/guava-eventbus/))
2929

30-
When each properties file resource is loaded a PropertiesWatcher.class (see:FaileWatch.class) is started and attached to the given resource set, reporting on any java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY events from the host operating system
30+
When each properties file resource is loaded a [PropertiesWatcher](https://github.com/jamesemorgan/DynamicPropertyLoader/blob/master/src/main/java/com/morgan/design/properties/internal/PropertiesWatcher.java) is started and attached to the given resource set, reporting on any [java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY](http://docs.oracle.com/javase/7/docs/api/java/nio/file/StandardWatchEventKinds.html#ENTRY_MODIFY) events from the host operating system
3131

3232
When an ENTRY_MODIFY event is fired firstly the resource changed is checked for property value changes then any bean subscribing to changes to the modified property has the specified field value updated with the new property
3333

@@ -39,23 +39,22 @@ A set of integration and unit tests can be found in _src/test/java_ (tests) & _s
3939
### TODO (Unfinished) ###
4040
* Update test method names
4141
* Creation of any test utilities or helper classes
42-
* Add test for modifying file in directory which is not a properties file
4342
* Replace callback EventHandler with Guava EventBus
4443

4544
### Why? ###
4645
* Useful for web applications which often need configuration changes but you don't always want to restart the application before new properties are used.
4746
* Can be used to define several layers of properties which can aid in defining multiple application configurations e.g sandbox/development/testing/production.
4847
* A pet project of mine I have been intending to implement for a while
4948
* A test of the new Java 7 WatchService API
50-
* Another dive in Spring & general investigation of Google Guava's EventBus, a class which I believe is the extremely useful and easy to use
49+
* Another dive in Spring & general investigation of Google Guava's EventBus
5150
* The project is aimed to be open to modification if required
5251
* Sample testing tools (CountDownLatch, Hamcrest-1.3, JMock-2.6.0-RC2)
5352

5453
### Future Changes ###
5554
* Ability to use Spring Expression language to map properties files
5655
* Support for Java 7 Data and Time classes
5756
* Include the ability to define a database driven properties source not just properties files
58-
* If one resource thread dies at present all watching threads are killed, graceful handle a thread being killed.
57+
* Implement error recovery inside PropertiesWatcher.class, including better thread recovery
5958

6059
### Supported Property Type Conversions Available ###
6160
* Joda Time Library (2.1) - [link](http://joda-time.sourceforge.net/)

0 commit comments

Comments
 (0)