File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes Help with JNDI configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Help with JNDI configuration" Watch "Help with JNDI configuration" New topic
Author

Help with JNDI configuration

Thibault Dangr�aux
Greenhorn

Joined: Dec 12, 2005
Posts: 19
I'm deploying an application under WAS 6.0.2.3. I'm a beginner at WAS, and I'm pretty lost there... This application has been tested under Tomcat 5.5 and uses Spring.

I have externalized some of the configuration using JNDI. Most of it is done through simple instances, like java.lang.String or java.lang.Integer. This works fine under Tomcat.

So, in my web.xml, I have :
...

...

In my spring XML configuration, I have :


Under Tomcat, I have entries under <Context> in a myapp.xml file (in conf/Catalina/localhost) :


The problem is that I have no idea of where on can create something similar to that <Environment> entry in WAS!
I tried going to Resource environment providers in the console. Then, I created a new provider.
Then, I select Resource environment providers > NBV Resource Provider > Resource env entries > New. But the dropdown list for referenceable is completely empty. I guess I should create a new referenceable, but I have no idea of what should go in the various fields to make it work...

Thanks for any help!
[ January 05, 2006: Message edited by: Thibault Dangr�aux ]
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

From what I understand, you cannot create the references by hand since they use some binary-like strings but you can have WSAD/WAS create them for you in one of two ways.

Method 1: Import the project into WSAD/RAD and open up the deployment descriptors. There will be sections toward the bottom on certain tabs for how to declare resource references that will create the neccessary IBM xml files for you.

Method 2: Install the EAR onto the WAS server via the administration console. It will prompt you, as part of its install steps to resolve environment entries.


My Blog: Down Home Country Coding with Scott Selikoff
Thibault Dangr�aux
Greenhorn

Joined: Dec 12, 2005
Posts: 19
Thanks for your quick answer!

Method 1 is not an option. First of all, I don't have WSAD/RAD. I'm using Eclipse+MyEclipse, which worked fine for my needs so far. Also, the production environment will be different from my dev environment. The whole point of externalizing these settings is so that a single war can be deployed on several servers with different settings. I don't want to have to open the project under an IDE to make simple configuration changes.

As for method 2, I am indeed prompted during the installation/upgrade. WAS recognizes my env entries correctly. Except I have no idea on how to setup the resources to map to under WAS. So I'm stuck at the "Map resource env entry references to resources" page - my entry refs are recognized correctly by WAS, my problem is really with creating these resources and linking to them correctly.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

Someone can probably chime in with a better way, but the best I would say is right jacl-styled scripts that perform step 2 via the command line instead of the graphical admin console.
Thibault Dangr�aux
Greenhorn

Joined: Dec 12, 2005
Posts: 19
A script would be a good solution actually, I find the console often more confusing than editing configuration files or scripts...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with JNDI configuration
 
Similar Threads
Tomcat application won't start with MySQL Connection Pooling
MDB deployed in WebLogic and Queues in IBM MQ
how to configure a JNDI URL resource
how to configure a JNDI URL resource
How to initialize a value in web.xml from a JNDI variable?