• 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

Accessing EJBObject from ejbCreate for stateless session beans

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand one can access the EJBObject of a bean via the sessionContext from methods like ejbCreate(). But I am just wondering if it makes sense in case of stateless session beans. The bean is created at an unrelated time and hooked up with an arbitrary EJBObject on which a business method is called. Moreover at the time of ejbCreate() call, it's not yet linked to any EJBObject. It's just abt to be placed in the pool.

Do we encounter any exception if we try to do this?
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't get any exception if you try to call getEJBObject in ejbCreate method of a SLSB.

This thread might help you. See Peer's reply.

Operations allowed in the methods of a stateless session bean.
 
Gopi Donthireddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Merci...makes sense.
 
reply
    Bookmark Topic Watch Topic
  • New Topic