On 29/07/2016 11:41, Khandelwal, Dinesh wrote: > > Hi, > > As part of my project , we maintain multiple Hibernate session factories and > as building these session factories take lot of time which causes server to > take more time in start-up , we are creating these session factories in > different threads.... Each thread creating one factory but when the > configuration.buildsessionFactory() [Hibernate internally does JNDI look up > which fails]API is called it throws Unable to lookup JNDI name > [java:/comp/env/BFDS]. > > Please note that I am using Tomcat 7 and I have tried multiple JNDI name > combinations e.g. java: /BFDS , java:global/BFDS , BFDS etc. but nothing > works. Same code works in JBOSS 7 and Websphere. > > Please suggest something.
Set the thread context class loader to the web application class loader. Mark > > > Tomcat Version apache-tomcat-7.0.59 > JDK 1.7 > Hibernate 4.3.11.Final > > -Dinesh > "Misys" is the trade name of the Misys group of companies. This email and any > attachments have been scanned for known viruses using multiple scanners. This > email message is intended for the named recipient only. It may be privileged > and/or confidential. If you are not the named recipient of this email please > notify us immediately and do not copy it or use it for any purpose, nor > disclose its contents to any other person. This email does not constitute the > commencement of legal relations between you and Misys. Please refer to the > executed contract between you and the relevant member of the Misys group for > the identity of the contracting party with which you are dealing. > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org