spring embeded jetty+cxf

前端 未结 1 1260
情书的邮戳
情书的邮戳 2020-12-12 05:32

I\'m running embedded jetty inside of a spring ioc container. The spring ioc contains also an embedded hsqldb which makes the whole configuration a nice and complete web app

1条回答
  •  隐瞒了意图╮
    2020-12-12 05:51

    I've found out that the above configuration was wrong:

    I did not use any WebApplicationContext with has to be initialized prior to the CXFServlet. The simple solution is to use the non-spring version of CXFServlet - it does not require any ApplicationContext (I don't want to create a separate ApplicationContext for the Web Services since I need to have shared DataSource between them) but it has too be initialized (Web Services must be published in the code).

    After solving the Context issue I've found out that jetty 6.1 does not initialize the servlet context in proper way, everything works fine after updating to 7.x.

    After writing custom WebApplicationContext I was able to use the main/root ApplicationContext as the WebApplicationContext allowing me to use the spring version of CXFServlet with about 6 lines of glue code.

    0 讨论(0)
提交回复
热议问题