📄 sessioncontext.html
字号:
<PRE><A HREF="../../javax/ejb/EJBLocalObject.html" title="interface in javax.ejb">EJBLocalObject</A> <B>getEJBLocalObject</B>() throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Obtain a reference to the EJB local object that is associated with the instance. <p> An instance of a session enterprise Bean can call this method at anytime between the ejbCreate() and ejbRemove() methods, including from within the ejbCreate() and ejbRemove() methods. <p> An instance can use this method, for example, when it wants to pass a reference to itself in a method argument or result.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The EJB local object currently associated with the instance.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if the instance invokes this method while the instance is in a state that does not allow the instance to invoke this method, or if the instance does not have a local interface.</DL></DD></DL><HR><A NAME="getEJBObject()"><!-- --></A><H3>getEJBObject</H3><PRE><A HREF="../../javax/ejb/EJBObject.html" title="interface in javax.ejb">EJBObject</A> <B>getEJBObject</B>() throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Obtain a reference to the EJB object that is currently associated with the instance. <p> An instance of a session enterprise Bean can call this method at anytime between the ejbCreate() and ejbRemove() methods, including from within the ejbCreate() and ejbRemove() methods. <p> An instance can use this method, for example, when it wants to pass a reference to itself in a method argument or result.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The EJB object currently associated with the instance.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if the instance invokes this method while the instance is in a state that does not allow the instance to invoke this method, or if the instance does not have a remote interface.</DL></DD></DL><HR><A NAME="getMessageContext()"><!-- --></A><H3>getMessageContext</H3><PRE><A HREF="../../javax/xml/rpc/handler/MessageContext.html" title="interface in javax.xml.rpc.handler">MessageContext</A> <B>getMessageContext</B>() throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Obtain a reference to the JAX-RPC MessageContext. <p> An instance of a stateless session bean can call this method from any business method invoked through its web service endpoint interface.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The MessageContext for this web service invocation.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if this method is invoked while the instance is in a state that does not allow access to this method.</DL></DD></DL><HR><A NAME="getBusinessObject(java.lang.Class)"><!-- --></A><H3>getBusinessObject</H3><PRE><T> T <B>getBusinessObject</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A><T> businessInterface) throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Obtain an object that can be used to invoke the current bean through the given business interface.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>businessInterface</CODE> - One of the local business interfaces or remote business interfaces for this session bean.<DT><B>Returns:</B><DD>The business object corresponding to the given business interface.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if this method is invoked with an invalid business interface for the current bean.</DL></DD></DL><HR><A NAME="getInvokedBusinessInterface()"><!-- --></A><H3>getInvokedBusinessInterface</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> <B>getInvokedBusinessInterface</B>() throws <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE><DL><DD>Obtain the business interface through which the current business method invocation was made.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - Thrown if this method is called and the bean has not been invoked through a business interface.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/ejb/SessionBean.html" title="interface in javax.ejb"><B>PREV CLASS</B></A> <A HREF="../../javax/ejb/SessionSynchronization.html" title="interface in javax.ejb"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?javax/ejb/SessionContext.html" target="_top"><B>FRAMES</B></A> <A HREF="SessionContext.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -