Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes EJB and other Java EE Technologies and the fly likes Non-datasource JNDI values in JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Non-datasource JNDI values in JBoss" Watch "Non-datasource JNDI values in JBoss" New topic

Non-datasource JNDI values in JBoss

Fuerikusu Daruke

Joined: Feb 13, 2009
Posts: 2

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?
I agree. Here's the link:
subject: Non-datasource JNDI values in JBoss
It's not a secret anymore!