Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Initial Context Factory  RSS feed

Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

the problem I am facing is that when I move across environment the location of my JNDI server used to lookup up the EJBs change so I have to keep re-waring the ear file across different environments. Is there any way to configure the JNDI server name so that I get the appropriate JNDI server depending on the environment. I don't want to set it up in web.xml,app....xml,ejb...xml because I have to re-war it up as I move across environments, I want to pull it out of it so that I can move the same war/ear file across my different environments and the server name picked up @ server startup time.

One way to solve it is that I am using WSAD...and I think the problem can be solved by setting up an environment variable in WSAD that would give me the JNDI url BUT is there any api that I can read the environment variable out of in my servlet/portlet??

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!