users@glassfish.java.net

JNDI Lookup for Strings in Glassfish

From: <glassfish_at_javadesktop.org>
Date: Tue, 23 Mar 2010 14:40:23 PDT

I am working on a project to select the new app server for my organization. Currently we are a WebSphere shop but are considering Glassfish.

One of the issues we have is that we use JNDI heavily for environment dependent string entries (likes like DB schema names, Webservice endpoint URL's, etc..) that reasonably change from environment to environment.

With Websphere, this is easy (and it's probably why we got down this path), but I can't figure out how to solve this will Glassfish.

About 2 years ago we started using JBoss for local development, and it created a similar problem. WebSphere by default uses a cell/persistent prefix on the JNDI's, where JBoss doesn't. To get around this we created an MBean that takes in a XML file with the strings we need to bind, and puts them into the JNDI with the cell/persistent prefix so that our code doesn't change between JBoss and WebSphere.

I had hoped to find a simple way to migrate the MBean over to Glassfish, but the documentation for how to register an MBean with glassfish is really lacking.

Can someone give me a quick and simple way to solve this problem. I know that a enhancement has be filed with Glassfish for this (7229 I believe) and it says it was targeted for V3, but no activity has happened on it since late 2009.

This issue is a showstopper for my organization and unless it can be resolved at a server level, will prevent us from considering Glassfish. The solution can't be to re-write all the off the applications as we would have to convert hundreds of apps.
[Message sent by forum member 'dynapen']

http://forums.java.net/jive/thread.jspa?messageID=393370