JavaEE solution configuration best practices

前端 未结 6 1875
余生分开走
余生分开走 2021-02-04 07:48

We build 3-tier enterprise solutions that typically consists of several webapp and ejbjar modules that all talk to a db and have several external integration points.

Eac

6条回答
  •  感情败类
    2021-02-04 08:52

    1. Сonsider binding a custom configuration object to JNDI. Then lookup this object in your apps to configure them. Benefits - you can use custom configuration object instead of rather generic Map or Properties.
    2. Another way is to use JMX to configure applications you need. Benefits - you can bind objects you have to configure directly to MBean Server and then use such a well-known tools as jconsole or visualvm to configure components of your application.

    Both ways support dynamic reconfiguration of your applications at runtime. I would prefer using JMX.

提交回复
热议问题