• Post Reply Bookmark Topic Watch Topic
  • New Topic

Context obect

 
dhan hazarika
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is a Context Object?
Is there any relationship between ServletContext object and EntityContext Object.
 
lali virdi
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
yes there is difference between servletContext and EntityContext
ServletContext is in webApplication or servletContainer
EntityContext is in EJB container
both have different workSpace
for every web application there is different servletContext
from this you will get clear idea of everyThing
 
Ben Dover
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats correct. Your servlets are associated with a ServletContext object, and your EJB's with an EntityContext. Each allow you to communicate with the container (and vice versa) but they are completely different things in "context" to their respective containers.
 
Sadanand Murthy
Ranch Hand
Posts: 382
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Louis Saha:
Thats correct. Your servlets are associated with a ServletContext object, and your EJB's with an EntityContext. Each allow you to communicate with the container (and vice versa) but they are completely different things in "context" to their respective containers.

Just to clarify the text in bold above -
EntityContext is for Entity EJBs only. For session EJBs it is SessionContext.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!