This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I'm using JNDI to set up my datasources some custom stuff and share them among my web applications.
The former works properly in JBoss. I had to create a file ending with ".xml" in "server/default/deploy", and make it look like this:
Now I want to configure a non-datasource related value via JNDI. I've written a class called StorageObject which looks like this:
In Tomcat, I configure it in the server's "context.xml" file like this:
Works fine this way.
In JBoss however, the same thing won't work. I've spent all day trying to find out how to do it, and ended up starting to write a PropertyEditor class which seems to be required for the jndi:binding mechanism to understand my StorageObject class.
My question: What is the easiest way to do what I did with <Resource> in Tomcat in JBoss 5? Do I really have to create several JBoss-only classes to make this work?