Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Non-datasource JNDI values in JBoss

 
Fuerikusu Daruke
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic