• Post Reply Bookmark Topic Watch Topic
  • New Topic

stateful session bean not working  RSS feed

K. Tsang
Posts: 3648
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all, I have a serlvet calling stateful session bean remotely adding items to an arraylist in non-entity class (is this mean simple java bean?). Then JSP page returning that arraylist. The problem is my jsp page arraylist is empty! However, if I return arraylist inside servlet it's fine.

I have the remote lookup included in jsp. Also that jsp page in fact access 2 remote interfaces (one entity class data and the other my arraylist non-entity class).

The logic of my servlet is:
lookup remote interface eg SBean bean = ic.lookup("bla");
for each loop :
a) create non-entity instance eg A a = new A();
b) parse data from URL
c) while readline not null set data eg a.setXXX(data);
d) once readline null add to arraylist eg bean.add(a);
e) goto next loop

lookup remote interface
get arraylist eg bean.getList();
output arraylist size got 0

Where's the problem?
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!