Unlike JBoss and Glassfish there is no way to define a custom JNDI object (eg a URL) in the WebLogic console. We need this to define the location of various configuration files (see maduraconfiguration) and we locate these files using a URL defined in JNDI
So I cooked up something over the last few days that solves this and put it in weblogic-jndi-startup. in google code.
It makes use of the startup classes, a feature of Weblogic I've not seen on the other servers (haven't needed to look, though) and you can configure arguments passed into startup classes from the console.
I've written just one simple class which I can deploy and configure on Weblogic (I'm using version 10.1) specifying the JNDI name, value and type. So now I can define the JNDI name and value in the console.
People doing the deployment like this kind of thing because it makes their lives easier. I think Weblogic really wants me to write a 'deployment plan' which is a way to edit the values into the web.xml but that is, frankly, too much to expect from people responsible for deploying our applications into multiple environments. The syntax is too hard and every time there is a mistake there is a support call with the kind of hard-to-diagnose problem we all want to avoid. Plus we need a solution that is portable across multiple flavours of J2EE.
Share and enjoy!