cancel
Showing results for 
Search instead for 
Did you mean: 

Stateful Session Beans

Former Member
0 Kudos

I have an application in webdynpro which uses a webservice from XI.I need to keep track of activities of a particular user and display them when the user logs in again.Can Stateful session beans help implement this? If yes how?

Regards

Bhavana

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Bhavana,

Stateful Session Beans is OK in this situation but only as service layer. You also need to think about persistency layer. So, CMP Entity Bean, JDO or JDBC would be a good choice for this.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim Rashchynski,

Does that mean that I'll have to store the activities during a session in a java table and access it through a stateful session bean?

Regards

Bhavana

former_member182372
Active Contributor
0 Kudos

Hi Bhavana,

That`s right.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi,

Can persisting the session id of the bean instance solve the problem?Will it be possible to reterive the data of the previous session from its session id?

Regards

Bhavana

former_member182372
Active Contributor
0 Kudos

Hi Bhavana,

You can use session ID as one of persistent fields and afterwards create finder method for this field.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Bhavana,

Pls note that HTTP session id keeps changing every time a user login. So you can't identify a user using session id of previous login. You can use 2 ways to store this

1. Application level scope

store the details in a java object(collection) currespoding to a user id(login id) in application scope, not session scope

2. Use database tables to store the details once user logout.

Hope it helps

regards,

Sujesh