You don't need the @Resource Annotation if you define the injection within the xml descriptor. You can just use
String duration;in your Bean.
Thanks for your recommendation. But it did not work . The problem is simple env entries are not getting bound to the JNDI namespace .
Which version of JBoss and Java do you use? Also, please post the entire console logs.
While posting logs or xml content or code, remember to wrap it in a code block. Also please hit the Preview button before posting, to ensure your post is correctly formatted.