This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

JNDI

Aug 26th, 2004, 12:02 PM

I am probably missing something very obvious but for the life of me I cannot find any information regarding this. When you specify a JndiObjectFactoryBean, you specify the jndiName but where does it pick up which JNDI provider it is using?

JndiObjectFactoryBean looks up objects using the default JNDI environment used by your container (Tomcat, Jboss, ...).
It works the same way as if you were looking up a datasource registered in tomcat from a servlet you:

Comment

Thanks for that - is it possible to pass the environment properties in via the application context or bean factory? I have not been able to locate any examples of this or work out what the paramterisation would be.