*
The moose likes EJB and other Java EE Technologies and the fly likes in a session bean what is a sessionCTX ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "in a session bean what is a sessionCTX ?" Watch "in a session bean what is a sessionCTX ?" New topic
Author

in a session bean what is a sessionCTX ?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Thank you for reading my post
I am reading a book and i can not understand some parts of it because it used a variable sessionCtx which i do not know from where it come.
here is the code snippet:



Also, i want to ask whether it works with web services or just for session beans?

thanks
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
Most likely it's an instance of SessionContext


Also, i want to ask whether it works with web services or just for session beans?


SessionContext is specific to beans. From the Javadoc:

The SessionContext interface provides access to the runtime session context that the container provides for a session enterprise Bean instance. The container passes the SessionContext interface to an instance after the instance has been created. The session context remains associated with the instance for the lifetime of the instance.
 
Consider Paul's rocket mass heater.
 
subject: in a session bean what is a sessionCTX ?