0

When I make a commercial website in ASP, I use the session to keep the items in shopping cart even the customer close the website (when they come back, all items still in their cart).

I am reading about Java EE, especially about stateless and stateful session beans. But when I read this example: http://docs.oracle.com/javaee/1.2.1/devguide/html/Session2.html#9905, it seems that a stateful session bean just separates each client, it doesn't keep the items in a shopping cart when I exit the client's application and come back again.

So is it true that the session bean in Java EE can create a shopping cart like a session in ASP?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
MasterDark116
  • 88
  • 1
  • 1
  • 4
  • 1
    "J2EE" was more than 6.5 years ago upgraded to "Java EE". The example which you're reading is from J2EE 1.2 which is 12 years old. Please ensure that you're looking at up to date resources. It's currently Java EE 6. By the way, the functionality you're looking for sounds like "remember me" and this is not provided by standard Java EE stack. Further, the EJB session is not the same as the HTTP session. – BalusC Jan 12 '13 at 12:52
  • Thank you too much, BalusC. I have seen the same example in Java EE 6, but it seems not too much change. So I still want to answer this question :D – MasterDark116 Jan 13 '13 at 03:57

0 Answers0