Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session EJB  RSS feed

 
fei long
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all.
I am writing a shopping cart using Stateful Session EJB. But i got a problem, when i using this EJB, there is only one instance is assigned. In other word, if i add sth in to cart and close the browser or open another browser, there are already sth in cart(it should not be). It is like the 'scope=application' in jsp. Can anyone help me. By the way, i am using WebLogic6.1.
thanks.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, from the top of my mind there�s 2 things you may do to solve your problem:
statefull session beans on weblogic have a time out configuration, you can set it on the weblogic-ejb-jar.xml if you want to make this time shorter click .here for an example, another thing you should do is program a javaScript that on the moment where the user is closing the window you should call EJBObject.remove, doing so you�re gonna disassociate the reference from that client.
regards.
 
fei long
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, Marcos.
If i call ejbRemove() using javascript when close the window, will the contents in cart remain? and how to solve open another window?
i have been working this problem long time. can anyone help me, please?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!