File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
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
Author

Non-datasource JNDI values in JBoss

Fuerikusu Daruke
Greenhorn

Joined: Feb 13, 2009
Posts: 2
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Non-datasource JNDI values in JBoss