I'm trying to make a spring service which will run at the end on Websphere (& Hibernate). The way I currently see how it should work is: retrieve a certain jndi lookup string (indicating the environment for which this Websphere instance is running) and using this string to retrieve some databasae stored settings (per environment). I'm currently trying very hard to inject an javax.naming.Context into the service I'm imlementing. Alas till sofar without any luck. Tried the org.springframework.mock.jndi.SimpleNamingContext in the application.xml that worked but that is not a productionsolution I'd say and I found it unintuitive to bind some values to it. The docs say I can pass in a Hashtable but how to specify a hashtable in application.xml is not very clear to me yet. I'm also starting to wory whether this is the correct approach I'm taking. Or Am I just on a steep learning curve at this moment? regards jeroen.
I'm not sure what you're trying to do but if you just want to inject something from a jndi lookup, the following definition from the Petclinic sample app shows how to do it. You can then inject that bean in the normal way.
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Your mind is under my control .... your will is now mine .... read this tiny ad