embedded-server

Singleton is not really a singleton

喜欢而已 提交于 2020-01-01 12:31:14
问题 I have situation where I share singleton between my code which runs the embedded-server and my web-application. I have war with classes and deployment tool. When I printf instances I see: abc.Abc@173a10f abc.Abc@105738 So this is not really singleton. How this works? My server Jetty start code: public static void main(String[] args) throws Exception { System.out.println(MySingleton.getInstance()); // start Jetty here and deploy war with WebAppContext() } My ServletContextListener side code:

Maven deploy multiple wars to embedded server for integration tests

笑着哭i 提交于 2019-12-30 06:12:25
问题 I have had no issue running a maven war project on an embedded server for its own integration tests, but now I need to run multiple wars and test from a different project. I would like to setup the following scenario... I have two Maven war projects in my local workspace called War1 and War2. I would like to have a 3rd Maven project, WarIntegration, that contains only integration tests and does the following: Packages War1 Packages War2 Starts an embedded server Deploys both wars to same

JAX-RS with embedded server

一世执手 提交于 2019-12-28 10:46:16
问题 Clarification: this question was about GZIPping an JAX-WS-based REST service, but I've decided to change the topic to make it easier to find I'm implementing a REST service via JAX-WS Provider <Source> , and publishing it with standard Endpoint (the reason is that I want to avoid using a servlet container or application server). Is there a way to make server to gzip response content, if Accept-Encoding: gzip is present? HOW-TO Samples provided by nicore actually works, and it allows you to

Singleton is not really a singleton

不打扰是莪最后的温柔 提交于 2019-12-04 10:10:15
I have situation where I share singleton between my code which runs the embedded-server and my web-application. I have war with classes and deployment tool. When I printf instances I see: abc.Abc@173a10f abc.Abc@105738 So this is not really singleton. How this works? My server Jetty start code: public static void main(String[] args) throws Exception { System.out.println(MySingleton.getInstance()); // start Jetty here and deploy war with WebAppContext() } My ServletContextListener side code: public class AppServletContextListener implements ServletContextListener{ @Override public void

Embedded C# web server? [closed]

╄→尐↘猪︶ㄣ 提交于 2019-11-28 06:49:10
In Java I've been able to embed* the jetty server in my apps, but is there an equivalent embedded* server technology for .Net? Open source (FLOSS) would be preferred if possible. *by embedded I mean a lightweight web server app that could be packaged with my application and run on a user's local desktop machine to provide a web service locally. The closest equivalent to Jetty I've found so far is Nancy , described as: a lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono. Nancy is designed to handle DELETE, GET, HEAD, OPTIONS, POST, PUT and PATCH requests

JAX-RS with embedded server

為{幸葍}努か 提交于 2019-11-28 05:03:09
Clarification: this question was about GZIPping an JAX-WS-based REST service, but I've decided to change the topic to make it easier to find I'm implementing a REST service via JAX-WS Provider <Source> , and publishing it with standard Endpoint (the reason is that I want to avoid using a servlet container or application server). Is there a way to make server to gzip response content, if Accept-Encoding: gzip is present? HOW-TO Samples provided by nicore actually works, and it allows you to make JAX-RS-styled server on top of embedded lightweight server without servlet container, but there are

Embedded C# web server? [closed]

喜你入骨 提交于 2019-11-27 01:30:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . In Java I've been able to embed* the jetty server in my apps, but is there an equivalent embedded* server technology for .Net? Open source (FLOSS) would be preferred if possible. *by embedded I mean a lightweight web server app that could be packaged with my application and run on a user's local desktop machine to