facebook

BEAN.context is never read locally WARNING

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #265833 Reply

    maximuszen
    Member

    EJB 2.1 xdoclet creates a session context

    private SessionContext context;

    I get the above warning why. I know its because its not being read locally but I figure it was generated for a reason. What is that reason? Can I just erase this line?

    #265837 Reply

    Greg
    Member

    Its just there for your convenience. You can safely remove it if you don’t need to save a copy of your SessionContext for use during the life of your Session bean. It is recommended though that you save this variable as it is likely you will need it at some point.

    #265843 Reply

    maximuszen
    Member

    what is sessioncontext used for? When would I need it?

    #265932 Reply

    Greg
    Member

    The sessioncontext will allow you to obtain a reference to the EJB object that is currently associated with the session bean instance.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: BEAN.context is never read locally WARNING

You must be logged in to post in the forum log in