WADL dan REST plugins

2012-04-25 Thread Frans Thamura
hi all anyone know WADL, how to implement in REST in S2, esp REST plugins can share ? F

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Dionis Argiri
Actual problem was with my load testing utility. I have not used jsessionid and thus it was causing the "problem". Also I have took a look at source code. When calling ActionContext.getContext().getSession() - SessionMap is returned. It is a map, that wraps session and uses synchronization on it. T

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Rene Gielen
Please remember that the HTTP session is not synchronized. Thus, using the session.put is a critical method. Most likely, what you really want to do is counter = session.get("counter"); counter.increment (or incrementAndGet) In this way you ensure exactly the same object is accessed and incremted /

Re: StrutsTestCase, jUnit and file upload

2012-04-25 Thread Chris Pratt
First of all, I assume you're trying to test your own code, not the framework. With that in mind, by the time the file gets to your action, it's just a series of parameters (which could be slightly different depending on which underlying Multipart support you are using). So, my suggestion would be

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Gabriel Belingueres
The "S2 way" of accessing the session is implementing the SessionAware interface. First you must realize that what you are putting on session scope is not the AtomicInteger per se, but its current value at the moment you call the first action, so unless you call the first action again, the value s

Re: StrutsTestCase, jUnit and file upload

2012-04-25 Thread Gabriel Belingueres
Coincidentally, yesterday I was struggling with testing a file upload. I was not using S2 as web framework but I was using Commons Fileupload, which IIRC is the default S2 upload component. I must say that my first strategy was trying to use Spring's MockMultipartHttpServletRequest and MockMultipa

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Dionis Argiri
No, my utility don't remember session id. Probably it's the problem. Then I'll need to rewrite my utility code, so that it handles it the right way(setting cookies in headers). Ok, but another question is whether or not Map that I get when calling ActionContext.getContext().getSession() is thread

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Aaron Brown
To answer, I think we need to know more about your utility program that triggers action 2. Sessions are tracked through a cookie containing a JSESSIONID. Does your utility retain cookies so that each page load will reference the same session? Also, does your utility wait for each page to complete b

StrutsTestCase, jUnit and file upload

2012-04-25 Thread Steve Higham
I'm currently using StrutsTestCase and jUnit to component test my Actions within the Struts context using a Mockito mock as my Model. This is working fine. I can call request.setParamater ("paramName", "paramValue") from the test class and, when executed, Struts will call the corresponding setP

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Dionis Argiri
What is the difference between using ActionContext.getContext().getSession() vs implementing SessionAware interface? Does it give some advantages? 25 апреля 2012 г. 12:01 пользователь Łukasz Lenart < lukasz.len...@googlemail.com> написал: > Why don't you use SessesionAware interface ? > > > Regar

Re: Struts2 session concurrency issue ?

2012-04-25 Thread Łukasz Lenart
Why don't you use SessesionAware interface ? Regards -- Łukasz http://www.lenart.org.pl/ mobile +48 606 323 122, office +27 11 0838747 Warszawa JUG conference - Confitura http://confitura.pl/ - To unsubscribe, e-mail: user-unsu