[jbossws-users] [JBossWS] - EJB Web Service Stateful?

Alan Scott balanscott at gmail.com
Fri Jun 20 09:10:32 EDT 2008


shaikbash wrote:
> Hi,
> I have developed a simple EJB based web-service as shown below:
>
> @Stateless
> @Remote(MySession.class)
> @WebService(endpointInterface = "test.MySession")
> @WebContext(contextRoot = "/mySession")
> public class MySessionBean implements MySession
> {
>   private int count;
>   
>   public int getCount()
>   {
>     return ++count;
>   }
> }
>
> This is deployed on JBOSS 4.2.2 server.
> I have a servlet based client, which connects to this service using the jbossws-3.0.1-native-2.0.4 jars. Whenever I call the getCount() method from the client I get an incremented value. I was expecting to always get 1 as the return value, since my EJB is stateless. My question is how is it retaining the state? Any light on this is greately appreciated.
>
>
> View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158989#4158989
>
> Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158989
> _______________________________________________
> jbossws-users mailing list
> jbossws-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbossws-users
>
>   
We always do these within a conversation context of a web application. 
In other words, our Seam web application form/action calls the service. 
Other than that everything else does looks the same to me.





More information about the jbossws-users mailing list