• Post Reply Bookmark Topic Watch Topic
  • New Topic

SessionContext called 2 and then 3 times  RSS feed

 
Si Soft
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers,
i am running a stateful session bean, when i run the program, after constructor setSessionContext() is called two times and then ejbCreate() is called. when i again instantiates a session bean object, then setSessionContext() is called 3 times and then for further instances it is always called thrice.

so why setSessionContext() is behaving lie this.
 
Dan Johnsson
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Si Soft:
hi ranchers,
i am running a stateful session bean, when i run the program, after constructor setSessionContext() is called two times and then ejbCreate() is called. when i again instantiates a session bean object, then setSessionContext() is called 3 times and then for further instances it is always called thrice.

so why setSessionContext() is behaving lie this.


Sounds very strange, not what I would expect.

Can you reconstruct the problem with a very slimmed version of your bean?

What app-server do you use?
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI si
just check whether your session is expiring or not.What is the expiry time for your session both for web and ejb? I found this problem in oc4j once.For me what was happening that session was getting expired before ejb method completes, and every thing was getting called many times as if they are in for loop.
May be this can be your problem.
Thanks
kundan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!