开发者

Webservice protection against big messages

I am developing a WebService in Java upon the jax-ws stack and glassfish.

Now I am a bit concerned about a couple of things.

I need to pass in a unknown amount of binary data that will be processed with a MDB, it is written this way to be asynchronous (so the user does not have to wait for the calculation to take place, kind of fault tolerant aswell as being very scalable.

The input message can however be split into chunks and sent to the MDB or split in the client and sent to the WS itself in chunks.

What I am looking for is a way to be able to specify the max size of the input so I wont blow the heap even if someone delibratly tries to send a to big message. 开发者_JS百科I have noticed that things tend to be a bit unstable once you hit the ceiling and I must be able to keep running.

Is it possible to be safe against big messages or should I try to use another method instead of WS. Which options do I have?

Well I am rather new to Java EE..


If you're passing binary data take a look at enabling MTOM for endpoint. It utilizes streaming and has 'threshold' parameter.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜