ejbcontext.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 400 行 · 第 1/2 页
HTML
400 行
<DD>Obtain the enterprise bean's remote home interface.<DD><DL>
<DT><B>Returns:</B><DD>The enterprise bean's remote home interface.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if the enterprise bean
does not have a remote home interface.</DL>
</DD>
</DL>
<HR>
<A NAME="getEJBLocalHome()"><!-- --></A><H3>
getEJBLocalHome</H3>
<PRE>
public <A HREF="../../javax/ejb/EJBLocalHome.html">EJBLocalHome</A> <B>getEJBLocalHome</B>()</PRE>
<DL>
<DD>Obtain the enterprise bean's local home interface.<DD><DL>
<DT><B>Returns:</B><DD>The enterprise bean's local home interface.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if the enterprise bean
does not have a local home interface.</DL>
</DD>
</DL>
<HR>
<A NAME="getEnvironment()"><!-- --></A><H3>
getEnvironment</H3>
<PRE>
public java.util.Properties <B>getEnvironment</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use the JNDI naming context java:comp/env to access
enterprise bean's environment.</I>
<P>
<DD>Obtain the enterprise bean's environment properties.
<p><b>Note:</b> If the enterprise bean has no environment properties
this method returns an empty java.util.Properties object. This method
never returns null.<DD><DL>
<DT><B>Returns:</B><DD>The environment properties for the enterprise bean.</DL>
</DD>
</DL>
<HR>
<A NAME="getCallerIdentity()"><!-- --></A><H3>
getCallerIdentity</H3>
<PRE>
public java.security.Identity <B>getCallerIdentity</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use Principal getCallerPrincipal() instead.</I>
<P>
<DD>Obtain the java.security.Identity of the caller.
This method is deprecated in EJB 1.1. The Container
is allowed to return alway null from this method. The enterprise
bean should use the getCallerPrincipal method instead.<DD><DL>
<DT><B>Returns:</B><DD>The Identity object that identifies the caller.</DL>
</DD>
</DL>
<HR>
<A NAME="getCallerPrincipal()"><!-- --></A><H3>
getCallerPrincipal</H3>
<PRE>
public java.security.Principal <B>getCallerPrincipal</B>()</PRE>
<DL>
<DD>Obtain the java.security.Principal that identifies the caller.<DD><DL>
<DT><B>Returns:</B><DD>The Principal object that identifies the caller. This
method never returns null.</DL>
</DD>
</DL>
<HR>
<A NAME="isCallerInRole(java.security.Identity)"><!-- --></A><H3>
isCallerInRole</H3>
<PRE>
public boolean <B>isCallerInRole</B>(java.security.Identity role)</PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use boolean isCallerInRole(String roleName) instead.</I>
<P>
<DD>Test if the caller has a given role.
<p>This method is deprecated in EJB 1.1. The enterprise bean
should use the isCallerInRole(String roleName) method instead.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>role</CODE> - The java.security.Identity of the role to be tested.<DT><B>Returns:</B><DD>True if the caller has the specified role.</DL>
</DD>
</DL>
<HR>
<A NAME="isCallerInRole(java.lang.String)"><!-- --></A><H3>
isCallerInRole</H3>
<PRE>
public boolean <B>isCallerInRole</B>(java.lang.String roleName)</PRE>
<DL>
<DD>Test if the caller has a given security role.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>roleName</CODE> - The name of the security role. The role must be one of
the security roles that is defined in the deployment descriptor.<DT><B>Returns:</B><DD>True if the caller has the specified role.</DL>
</DD>
</DL>
<HR>
<A NAME="getUserTransaction()"><!-- --></A><H3>
getUserTransaction</H3>
<PRE>
public <A HREF="../../javax/transaction/UserTransaction.html">UserTransaction</A> <B>getUserTransaction</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Obtain the transaction demarcation interface.
Only enterprise beans with bean-managed transactions are allowed to
to use the UserTransaction interface. As entity beans must always use
container-managed transactions, only session beans with bean-managed
transactions are allowed to invoke this method.<DD><DL>
<DT><B>Returns:</B><DD>The UserTransaction interface that the enterprise bean
instance can use for transaction demarcation.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - The Container throws the exception
if the instance is not allowed to use the UserTransaction interface
(i.e. the instance is of a bean with container-managed transactions).</DL>
</DD>
</DL>
<HR>
<A NAME="setRollbackOnly()"><!-- --></A><H3>
setRollbackOnly</H3>
<PRE>
public void <B>setRollbackOnly</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Mark the current transaction for rollback. The transaction will become
permanently marked for rollback. A transaction marked for rollback
can never commit.
Only enterprise beans with container-managed transactions are allowed
to use this method.<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - The Container throws the exception
if the instance is not allowed to use this method (i.e. the
instance is of a bean with bean-managed transactions).</DL>
</DD>
</DL>
<HR>
<A NAME="getRollbackOnly()"><!-- --></A><H3>
getRollbackOnly</H3>
<PRE>
public boolean <B>getRollbackOnly</B>()
throws java.lang.IllegalStateException</PRE>
<DL>
<DD>Test if the transaction has been marked for rollback only. An enterprise
bean instance can use this operation, for example, to test after an
exception has been caught, whether it is fruitless to continue
computation on behalf of the current transaction.
Only enterprise beans with container-managed transactions are allowed
to use this method.<DD><DL>
<DT><B>Returns:</B><DD>True if the current transaction is marked for rollback, false
otherwise.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - The Container throws the exception
if the instance is not allowed to use this method (i.e. the
instance is of a bean with bean-managed transactions).</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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">
PREV CLASS
<A HREF="../../javax/ejb/EJBHome.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="EJBContext.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | 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>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?