开发者

Web Listener Configuration modified dynamically

Need to have a configuration screen for my listener.

Now I want to start and stop the MyListener from web application.

Sample listener in web.xml

<listener>
  com.s开发者_开发知识库ample.MyListener
</listener>

JSF framework

Weblogic 9.2 & higher


I know you've indicated that you don't want to change the current architecture, but I'd definitely recommend looking at something like Quartz (http://www.quartz-scheduler.org/) to manage your job scheduling, and initialize that via one individual lifecycle listener.

It may be possible to go and poke listener configuration in the bowels of your web application at runtime, but you're going to end up creating a rod for your own back in terms of the complexity, and recreating a lot of the concepts that already exist there.

You'll make life a lot easier by using a framework like that which (from memory) exposes either EJB or JMX-based configuration allowing you to make configuration changes at runtime.

That way you won't need to potentially redeploy your application in order to have changes take effect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜