Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

context in ejb

 
sivasri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
What is meant by Context,and what is the role of the context class in EJB's.
Please do reply.
regards,
sivasankari
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Context is a gateway through which EJB Bean could communicate to Container & retrive some information like.......Security roles of client(s) & Transactional Information (UserTransaction Ref. which is required for PTM using JTA)...Refer Java API Docs to get some more details.

Shrinivas
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Context can mean different things in the EJB world. :roll: For instance, on deployment every EJB home gets bound into the JNDI tree automatically under the name defined in its deployment properties. A client can then do a JNDI lookup to obtain the home interface (may need to narrow the object returned, will need to cast it).

There is also EJB context, transaction context, security context. There may be more, but that's enough for now!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Sivasri"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic