https://developer.jboss.org/message/137756
How to implement this scenario in JBoss 7 or later versions?