开发者

Where to put a configuration file for an Axis2 web service?

I'd like to have my Axis2 Web Service read from a configuration file, whose name is sent as a parameter to the service.

Where is the best place to put this file? And How to best access it开发者_StackOverflow社区? Examples welcome.

I've checked the current directory is the Apache/Tomcat/bin file, I could put it in the parent directory, or put it into a Apache/Tomcat/conf, although this looks like it's more reserved for apache configuration itself.


You don't want to load a configuration file on each request, which means configuration needs to be loaded ideally on startup.

In my experience that leaves you with two choices:

  • Embedded Spring container
  • JNDI

The former approach is described in the Axis2 documentation, the latter approach depends on the appserver/container you're using.

An example if JNDI configuration for jetty is here:

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜