Thanks for the suggestion but I have actually chosen another path.
Since I have lot of logic and data relating to the resource I'm currently experimenting with I have chosen to just add a regular jndi lookup in a static method in that file. If there is a jndi resource defined it will get that otherwise it will just return the application defined default.
[Message sent by forum member 'woel' (woel)]
http://forums.java.net/jive/thread.jspa?messageID=241264