Hello,
In my current project I am facing a strange problem: whenever I want to get my Stateful Session Bean remote object , I get always the same reference. So all clients get the same remote object on server side ... which is of course not the incentive by the Stateful Session Beans model...
I have written a small test application which behaves exactly the same as my projects application ...
here the code :
the SFSB : testBean
code:
@Stateful(mappedName="testEJB")
public class testBean implements testRemote {
public int quantity = 0;
public void buy (int quantity){
this.quantity += quantity;
}
public int getQuantity(){
return quantity;
}
the Remote Interface: testRemote
code:
@Remote
public interface testRemote {
public void buy(int quantity);
public int getQuantity();
}
the test JSP
code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Insert title here
<%= tr.toString() >
Also I am using Eclipse Europe Winter IDE & Glassfish v2
Everytime it returns the same reference for the SFSB Object , ... I don't know why this happens ... is it a fault by me or is it a Bug on Server Side ??
I just don't know ... ... I also tried it with Servlet Injection but the result is the same , I guess it's my fault but I have no clue how to solve it ...
thanks in advance ...
LHD