|
From: Colin S. <col...@ex...> - 2003-08-22 03:44:15
|
AbstractJndiLocator right now looks at the jndi name it is given, and if it doesn't start with java:comp/env prepends this value automatically. This behaviour is not correct. Somebody using the bean should be able to look up resources anywhere, and currently you can't. For example, in jboss, the main datasource by default is bound to java:DefaultDS As well, you may want to look up something on JNDI using another scheme entirely... What the code should probably do is see if the is a scheme xxxxx: at the beginning of the jndi name. If there isn't, then it is probably reasonable to assume 'java:comp/env. or 'java:' If there is a scheme, it should leave the name alone. I would have supplied a patch, but the fix is trivial, and I don't know how exactly you want to handle this, but it's pretty critical to me. Right now with JBoss it's pretty nasty. I can not use JBoss's naming alias service to alias java:comp/env/DefaultDS to java:DefaultDS because it apparently doesn't let you alias stuff under comp/env. I can probably modify my resource entries in the war file I use to do a resource ref to the right location, but I would really rather not do that, since the war is fine the way it is. Regards, Colin |