• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stateless EJBs behaviour

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Could anybody let me know, if in case of a bean managed stateless EJB, where no user transaction is created,
is it possible that the stateless EJB is returned to pool even without completing the method that it is executing?

Any help is appreciated.

- Priya
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, the EJB won't be returned to the pool until the method is completed.

Is there an error that you're seeing that indicates that you're not getting this expected behavior?

-Cameron McKenzie
 
priya Anand
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi cameron,

Thanks for the reply. Yes I do see that sometimes the instance variables in my EJB gets reset, or has information, not pertaining to the client in case there are multiple users logged into the application.

Could you tell me as to why this might be happening?

Thanks and Regards,
Priya Anand
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if we're talking about stateless EJBs, we shouldn't see any instance variables or state like behavior in them, right? So, if there is client based state being lost or bungled up, it would likely be somewhere other than the stateless bean.

-Cameron McKenzie
 
priya Anand
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey cameron,

Sorry for the late reply, but could you throw some light, on where else may the data be getting lost?

This is a typical example in my stateless EJB,

debugger.printMap("************OUTPUT of "+strRequest+"********"+strOrderKey+"*********\n");
debugger.printMap(mapOutput);
debugger.printMap("*****************************\n");

if(this.mapOutput.containsKey("OrderHeader")){}

I get the map printed here, I also see OrderHeader there but it never enters the if statement below, this is a random behaviour. Does not happen always.


 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic