分享
 
 
 

javax.ejb.EJBContext翻译

王朝java/jsp·作者佚名  2006-01-10
窄屏简体版  字體: |||超大  

[/url] [url=file:///F:/资料/文字资料/j2ee-1.4_doc/apidocs/overview-summary.html]Overview

Package

Class

Tree

Deprecated

Index

Help

JavaTM 2 Platform

Ent. Ed. v1.4

PREV CLASS NEXT CLASS

FRAMES NO FRAMES All Classes

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

javax.ejb

Interface EJBContextAll Known Subinterfaces: EntityContext, MessageDrivenContext, SessionContext public interface EJBContextThe EJBContext interface provides an instance with access to the container-provided runtime context of an enterprise Bean instance. EJBContext接口提供实例来访问企业Bean实例的容器提供的运行时上下文。

This interface is extended by the SessionContext, EntityContext, and MessageDrivenContext interfaces to provide additional methods specific to the enterprise interface Bean type. 该接口由SessionContext、EntityContext和MessageDrivenContext接口继承, 以提供企业接口Bean类型特有的方法。

Method Summary

Identity

getCallerIdentity()

Deprecated. Use Principal getCallerPrincipal() instead. 用Principal getCallerPrincipal()替代。

Principal

getCallerPrincipal()

Obtain the java.security.Principal that identifies the caller. 获得标识调用者的java.security.Principal。

EJBHome

getEJBHome()

Obtain the enterprise bean's remote home interface. 获得企业bean的远程home接口。

EJBLocalHome

getEJBLocalHome()

Obtain the enterprise bean's local home interface. 获得企业bean的本地home接口。

Properties

getEnvironment()

Deprecated. Use the JNDI naming context java:comp/env to access enterprise bean's environment. 使用JNDI命名上下文java:comp/env访问企业bean环境。

boolean

getRollbackOnly()

Test if the transaction has been marked for rollback only. 测试事务是否只被标记为回滚。

TimerService

getTimerService()

Get access to the EJB Timer Service. 获得对EJB Timer服务的访问。

UserTransaction

getUserTransaction()

Obtain the transaction demarcation interface. 获得事务边界接口。

boolean

isCallerInRole(Identity role)

Deprecated. Use boolean isCallerInRole(String roleName) instead. 用boolean isCallerInRole(String roleName)替代。

boolean

isCallerInRole(String roleName)

Test if the caller has a given security role. 测试调用者是否有指定的安全角色。

void

setRollbackOnly()

Mark the current transaction for rollback. 将当前事务标记为回滚。

Method Detail

getEJBHomepublic EJBHome getEJBHome()

Obtain the enterprise bean's remote home interface. 获得企业bean的远程home接口。

Returns: The enterprise bean's remote home interface. 企业bean的远程home接口。 Throws: IllegalStateException - if the enterprise bean does not have a remote home interface. 如果企业bean没有远程home接口时抛出。getEJBLocalHomepublic EJBLocalHome getEJBLocalHome()

Obtain the enterprise bean's local home interface. 获得企业bean的本地home接口。

Returns: The enterprise bean's local home interface. 企业bean的本地home接口。 Throws: IllegalStateException - if the enterprise bean does not have a local home interface. 如果企业bean没有本地home接口时抛出。getEnvironmentpublic Properties getEnvironment()

Deprecated. Use the JNDI naming context java:comp/env to access enterprise bean's environment. 使用JNDI命名上下文java:comp/env访问企业bean环境。

Obtain the enterprise bean's environment properties. 获得企业bean的环境属性。 Note: If the enterprise bean has no environment properties this method returns an empty java.util.Properties object. This method never returns null. 注意:如果企业bean没有环境属性,那么方法返回java.util.Properties对象,该方法不会返回null。

Returns: The environment properties for the enterprise bean. 企业bean的环境属性。getCallerIdentitypublic Identity getCallerIdentity()

Deprecated. Use Principal getCallerPrincipal() instead. 用Principal getCallerPrincipal()替代。

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. 获得调用者的java.security.Identity。该方法在EJB 1.1中已不再支持。 容器允许始终返回null。企业bean应当使用getCallerPrincipal方法替代。

Returns: The Identity object that identifies the caller. 标识调用者的Identity对象。getCallerPrincipalpublic Principal getCallerPrincipal()

Obtain the java.security.Principal that identifies the caller. 获得标识调用者的java.security.Principal。

Returns: The Principal object that identifies the caller. This method never returns null. 标识调用者的java.security.Principal。方法从不返回null。 Throws: IllegalStateException - The Container throws the exception if the instance is not allowed to call this method. 如果实例不允许调用该方法时,容器抛出该异常。isCallerInRolepublic boolean isCallerInRole(Identity role)

Deprecated. Use boolean isCallerInRole(String roleName) instead. 用boolean isCallerInRole(String roleName)替代。

Test if the caller has a given role. 测试调用者是否有指定的角色。 This method is deprecated in EJB 1.1. The enterprise bean should use the isCallerInRole(String roleName) method instead. 该方法在EJB 1.1中已不再支持。企业bean应当使用isCallerInRole(String roleName)方法替代。

Parameters: role - The java.security.Identity of the role to be tested. 用来测试的角色的java.security.Identity。 Returns: True if the caller has the specified role. 如果调用者有指定角色,返回true。isCallerInRolepublic boolean isCallerInRole(String roleName)

Test if the caller has a given security role. 测试调用者是否有指定的安全角色。

Parameters: roleName - The name of the security role. The role must be one of the security roles that is defined in the deployment descriptor. 安全角色的名称。角色必须是在部署描述符中定义好的安全角色之一。 Returns: True if the caller has the specified role. 如果调用者有指定角色,返回true。 Throws: IllegalStateException - The Container throws the exception if the instance is not allowed to call this method. 如果实例不允许调用该方法时,容器抛出该异常。getUserTransactionpublic UserTransaction getUserTransaction()

throws IllegalStateException

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 or message-driven beans with bean-managed transactions are allowed to invoke this method. 获得事务边界接口。只有bean管理事务的企业bean才可以使用UserTransaction接口。 因为实体bean必须使用容器管理事务,所以只有使用bean管理事务的会话bean和消息 驱动bean才能调用该方法。

Returns: The UserTransaction interface that the enterprise bean instance can use for transaction demarcation. 企业bean实例用于事务边界的UserTransaction接口。 Throws: IllegalStateException - 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). 如果实例不允许使用UserTransaction接口(即使用容器管理事务的bean实例),容器抛出该异常。setRollbackOnlypublic void setRollbackOnly()

throws IllegalStateException

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. 将当前事务标记为回滚。事务将永久地标记为回滚。标记为回滚的事务不能提交。只有使用容器管理事务的企业bean才能使用该方法。

Throws: IllegalStateException - 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). 如果实例不允许使用该方法(即使用bean管理事务的bean实例),容器抛出该异常。getRollbackOnlypublic boolean getRollbackOnly()

throws IllegalStateException

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. 测试事务是否只被标记为回滚。企业bean实例可以使用该操作,比如在捕获异常 后,测试对于当前的事务继续计算是否无效。

Returns: True if the current transaction is marked for rollback, false otherwise. 如果当前事务被标记为回滚,返回true,否则为false。 Throws: IllegalStateException - 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). 如果实例不允许使用该方法(即使用bean管理事务的bean实例),容器抛出该异常。getTimerServicepublic TimerService getTimerService()

throws IllegalStateException

Get access to the EJB Timer Service. 获得对EJB Timer服务的访问。

Throws: IllegalStateException - The Container throws the exception if the instance is not allowed to use this method (e.g. if the bean is a stateful session bean) 如果实例不允许使用该方法(比如bean是一个有状态会话bean),容器抛出该异常。[/url][url=file:///F:/资料/文字资料/j2ee-1.4_doc/apidocs/overview-summary.html]Overview

Package

Class

Tree

Deprecated

Index

Help

JavaTM 2 Platform

Ent. Ed. v1.4

PREV CLASS NEXT CLASS

FRAMES NO FRAMES All Classes

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature Copyright 2003 Sun Microsystems, Inc. All rights reserved.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有