SCJP Certification

Sun Certified Java Programmer Certification exam essentials

March 1st, 2010

What is the getObject() method?

SCBCD, by Daisy Williams.

The getEJBObject() method is used to obtain a reference to the EJB object that is currently associated with the instance. An instance of a session enterprise Bean can call this method anytime between the ejbCreate() and ejbRemove() methods. An instance can use this method when it wants to pass a reference to itself in a method argument or result. The general format of this method is as follows:

public EJBObject getEJBObject() throws java.lang.IllegalStateException

This method returns the EJB object currently associated with the instance. It will throw the java.lang.IllegalStateException if the instance invokes this method while the instance is in a state that does not allow it to invoke this method, or if the instance does not have a remote interface.

Share

Back Top

Responses to “What is the getObject() method?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*