`
iloveflower
  • 浏览: 80264 次
社区版块
存档分类
最新评论
  • iloveflower: 呵呵。好好学习。。。。。。。。。。。。
    java 读书
  • Eric.Yan: 看了一点,不过是电子版的……你这一说到提醒我了,还要继续学习哈 ...
    java 读书

Complete List of Metadata Annotations By Function

 
阅读更多
http://docs.oracle.com/cd/E23943_01/web.1111/e13720/annotations.htm#i1426084

A EJB 3.0 Metadata Annotations Reference

The following topics provide reference information about the EJB 3.0 metadata annotations:
•Overview of EJB 3.0 Annotations

•Annotations for Stateless, Stateful, and Message-Driven Beans

•Annotations Used to Configure Interceptors

•Annotations Used to Interact With Entity Beans

•Standard JDK Annotations Used By EJB 3.0

•Standard Security-Related JDK Annotations Used by EJB 3.0

•WebLogic Annotations



The new EJB 3.0 programming model uses the JDK 5.0 metadata annotations feature (described at http://java.sun.com/developer/technicalArticles/releases/j2se15)

Complete List of Metadata Annotations By Function

Appendix A, "EJB 3.0 Metadata Annotations Reference," provides full reference information about the EJB 3.0 metadata annotations in alphabetical order. The tables in this section group the annotations based on what task they perform.


Annotations to Specify the Bean Type

The following summarize the annotations used to specify the bean type.


Table 5-1 Annotations to Specify the Bean Type

Annotation

Description

@javax.ejb.Stateless
Specifies that the bean class is a stateless session bean. For more information, see javax.ejb.Stateless.

@javax.ejb.Stateful
Specifies that the bean class is a stateful session bean. For more information, see javax.ejb.Stateful.

@javax.ejb.Init
Specifies the correspondence of a stateful session bean class method with a create<METHOD> method for an adapted EJB 2.1 EJBHome and/or EJBLocalHome client view. For more information, see javax.ejb.Init.

@javax.ejb.Remove
Specifies a remove method of a stateful session bean. For more information, see javax.ejb.Remove.

@javax.ejb.MessageDriven
Specifies that the bean class is a message-driven bean. For more information, see javax.ejb.MessageDriven.

@javax.ejb.ActivationConfigProperty
Specifies properties used to configure a message-driven bean in its operational environment. For more information, see javax.ejb.ActivationConfigProperty.


Annotations to Specify the Local or Remote Interfaces
The following summarize the annotations used to specify the local or remote interfaces.
Table 5-2 Annotations to Specify the Local or Remote Interfaces

Annotation
Description

@javax.ejb.Local
Specifies a local interface of the bean. For more information, see javax.ejb.Local.

@javax.ejb.Remote
Specifies a remote interface of the bean. For more information, see javax.ejb.Remote.


Annotations to Support EJB 2.X Client View

The following summarize the annotations used to support EJB 2.x client view.
Table 5-3 Annotations to Support EJB 2.X Client View

Annotation

Description
@javax.ejb.LocalHome
Specifies a local home interface of the bean. For more information, see javax.ejb.LocalHome.

@javax.ejb.RemoteHome
Specifies a remote home interface of the bean. For more information, see javax.ejb.RemoteHome.

Annotations to Invoke a 3.0 Entity Bean
The following summarize the annotations used to invoke a 30 entity bean.

Table 5-4 Annotations to Invoke a 3.0 Entity Bean


Annotation

Description

@javax.persistence.PersistenceContext
Specifies a dependency on an EntityManager persistence context. For more information, see javax.persistence.PersistenceContext.

@javax.persistence.PersistenceContexts
Specifies one or more PersistenceContext annotations. For more information, see javax.persistence.PersistenceContexts.

@javax.persistence.PersistenceUnit
Specifies a dependency on an EntityManagerFactory. For more information, see javax.persistence.PersistenceUnit.

@javax.persistence.PersistenceUnits
Specifies one or more PersistenceUnit annotations. For more information, see javax.persistence.PersistenceUnits.


Transaction-Related Annotations

The following summarize the annotations used for transactions.

Table 5-5 Transaction-Related Annotations

Annotation

Description

@javax.ejb.TransactionManagement
Specifies the transaction management demarcation type (container- or bean-managed). For more information, see javax.ejb.TransactionManagement.



@javax.ejb.TransactionAttribute
Specifies whether a business method is invoked within the context of a transaction. For more information, see javax.ejb.TransactionManagement.


Annotations to Specify Interceptors
The following summarize the annotations used to specify interceptors.

Table 5-6 Annotations to Specify Interceptors

Annotation
Description

@javax.interceptor.Interceptors
Specifies the list of interceptor classes associated with a bean class or method. For more information, see javax.interceptor.Interceptors.


@javax.interceptor.AroundInvoke
Specifies an interceptor method. For more information, see javax.interceptor.AroundInvoke.



@javax.interceptor.ExcludeClassInterceptors
Specifies that, when the annotated method is invoked, the class-level interceptors should not invoke. For more information, see javax.interceptor.ExcludeClassInterceptors.

@javax.interceptor.ExcludeDefaultInterceptors
Specifies that, when the annotated method is invoked, the default interceptors should not invoke. For more information, see javax.interceptor.ExcludeDefaultInterceptors.


Annotations to Specify Life Cycle Callbacks

The following summarize the annotations used to specify life cycle callbacks.

Table 5-7 Annotations to Specify Life Cycle Callbacks
Annotation

Description

@javax.ejb.PostActivate
Designates a method to receive a callback after a stateful session bean has been activated. For more information, see javax.ejb.PostActivate.

@javax.ejb.PrePassivate
Designates a method to receive a callback before a stateful session bean is passivated. For more information, see javax.ejb.PrePassivate.



@javax.annotation.PostConstruct
Specifies the method that needs to be executed after dependency injection is done to perform any initialization. For more information, see javax.annotation.PostConstruct.



@javax.annotation.PreDestroy
Specifies a method to be a callback notification to signal that the instance is in the process of being removed by the container. For more information, see javax.annotation.PreDestroy.


Security-Related Annotations
The following metadata annotations are not specific to EJB 3.0, but rather, are general security-related annotations in the javax.annotation.security package.


Table 5-8 Security-Related Annotations
Annotation
Description

@javax.annotation.security.DeclareRoles
Specifies the references to security roles in the bean class. For more information, see javax.annotation.security.DeclareRoles.

@javax.annotation.security.RolesAllowed
Specifies the list of security roles that are allowed to invoke the bean's business methods. For more information, see javax.annotation.security.RolesAllowed.



@javax.annotation.security.PermitAll
Specifies that all security roles are allowed to invoke the method. For more information, see javax.annotation.security.PermitAll.

@javax.annotation.security.DenyAll
Specifies that no security roles are allowed to invoke the method. For more information, see javax.annotation.security.DenyAll.


@javax.annotation.security.RunAs
Specifies the security role which the method is run as. For more information, see javax.annotation.security.RunAs.

Context Dependency Annotations
The following summarize the annotations used for context dependency.


Table 5-9 Context Dependency Annotations

Annotation
Description

@javax.ejb.EJB
Specifies a dependency to an EJB business interface or home interface. For more information, see javax.ejb.EJB.

@javax.ejb.EJBs
Specifies one or more @EJB annotations. For more information, see javax.ejb.EJBs.

@javax.annotation.Resource
Specifies a dependency on an external resource in the bean's environment. For more information, see javax.annotation.Resource.

@javax.annotation.Resources
Specifies one or more @Resource annotations. For more information, see javax.annotation.Resources.


Timeout and Exceptions Annotations
The following summarize the annotations used for timeout and exceptions.

Table 5-10 Timeout and Exception Annotations
Annotation

Description
@javax.ejb.Timeout
Specifies the timeout method of the bean class. For more information, see javax.ejb.Timeout.

@javax.ejb.ApplicationException
Specifies that an exception is an application exception and should be reported to the client directly. For more information, see javax.ejb.ApplicationException.

分享到:
评论

相关推荐

    The Metadata Manual

    Outlines the most popular metadata schema written by practicing metadata librarians Focuses on what you “need to know” Does not require coding experience to use and understand Book Details Series: ...

    HDR Static Metadata Extensions(HDR标准)

    Recommendations regarding the usage of static HDR metadata are also provided. These data structures allow signaling of SMPTE ST 2084 HDR EOTF [2] and SMPTE ST 2086 Mastering Display Metadata [3], ...

    Laravel开发-metadata

    在本文中,我们将深入探讨Laravel开发中的"metadata"概念,以及如何在实际项目中运用这一功能。"metadata"在编程领域通常指的是关于数据的数据,它提供了额外的信息,帮助我们更好地理解和处理数据。在Laravel框架中...

    metadata-extractor-2.6.2-API文档-中文版.zip

    赠送jar包:metadata-extractor-2.6.2.jar; 赠送原API文档:metadata-extractor-2.6.2-javadoc.jar; 赠送源代码:metadata-extractor-2.6.2-sources.jar; 赠送Maven依赖信息文件:metadata-extractor-2.6.2.pom;...

    jquery.metadata.2.0

    《jQuery Metadata插件详解及其应用》 在Web开发领域,jQuery作为一个强大的JavaScript库,极大地简化了DOM操作,事件处理和Ajax交互。而jQuery Metadata插件是jQuery生态系统中的一个重要组件,它提供了一种灵活的...

    DatabaseMetaData生成数据库DLL

    `DatabaseMetaData` 是Java数据库连接(JDBC)API的一部分,它提供了关于数据库模式、特性以及元数据的详细信息。本篇文章将深入探讨如何利用`DatabaseMetaData`生成数据库的DLL(在关系型数据库中,DLL通常指的是...

    metadata.db

    《元数据数据库“metadata.db”在Calibre及群晖系统中的应用详解》 在数字图书馆管理和个人电子书收藏中,Calibre是一款广受欢迎的管理工具,它为用户提供了全面的电子书整理、转换和同步功能。其中,“metadata.db...

    metadata-extractor-2.6.2-API文档-中英对照版.zip

    赠送jar包:metadata-extractor-2.6.2.jar; 赠送原API文档:metadata-extractor-2.6.2-javadoc.jar; 赠送源代码:metadata-extractor-2.6.2-sources.jar; 赠送Maven依赖信息文件:metadata-extractor-2.6.2.pom;...

    解决Android Studio Gradle Metadata特别慢的问题

    "解决Android Studio Gradle Metadata特别慢的问题" Android Studio是Android应用程序开发的官方IDE,它提供了许多功能来帮助开发者快速构建和测试Android应用程序。然而,在使用Android Studio时,有时可能会遇到...

    史上最全的注解代码jar包文档common-annotations-1.0.0.rar

    An annotation is a form of metadata, that can be added to Java source code. Classes, methods, variables, parameters and packages may be annotated. Annotations have no direct effect on the operation of...

    calibre-web 数据库文件metadata.db 下载

    calibre-web 数据库文件metadata.db 下载

    metadata-extractor-2.4.0.rar 获取图片 exif 信息

    metadata-extractor-2.4.0.rar metadata-extractor-2.4.0.rar 获取 图片 exif 信息 使用方法: File jpegFile = new File("c:\\newchangetime.jpg"); Metadata metadata = JpegMetadataReader.readMetadata(jpeg...

    kotlin-metadata,.zip

    "kotlin-metadata"库是Kotlin生态系统中的一个重要组成部分,它专门用于处理Kotlin编译器生成的元数据。元数据在编译过程中记录了关于源代码的各种信息,比如类型信息、注解、函数签名等,这对于反射和编译时代码...

    spring-plugin-metadata-2.0.0.RELEASE-API文档-中文版.zip

    赠送jar包:spring-plugin-metadata-2.0.0.RELEASE.jar; 赠送原API文档:spring-plugin-metadata-2.0.0.RELEASE-javadoc.jar; 赠送源代码:spring-plugin-metadata-2.0.0.RELEASE-sources.jar; 赠送Maven依赖信息...

    metadata-extractor-2.8.1 jar包以及源码以及使用例子

    "metadata-extractor-2.8.1" 是一个Java库,专门用于从各种图像和音频文件中提取元数据。这个库是由Dave Coffin创建并维护的,它支持大量的文件格式,包括JPEG、TIFF、PNG、PDF等。元数据通常包含关于文件的详细信息...

    Flink无法获取Kafka Topic Metadata异常及解决.docx

    Flink 无法获取 Kafka Topic Metadata 异常及解决 一、问题现象 在使用 Kafka 0.11.0.1 和 Flink 1.4 进行实时计算时,Flink 无法获取 Kafka Topic Metadata,报以下异常:org.apache.kafka.common.errors....

    jquery.metadata.js

    使用class="{}"的方式,必须引入包:jquery.metadata.js 可以使用如下的方法,修改提示内容: class="{required:true,minlength:5,messages:{required:'请输入内容'}}" 在使用equalTo关键字时,后面的内容必须加上...

    metadata-extractor依赖引入

    metadata-extractor依赖引入

    jquery.metadata.1.0_javascript_jquery_

    标题中的"jquery.metadata.1.0_javascript_jquery_"表明我们关注的是一个jQuery插件,名为jQuery Metadata。这个插件是jQuery库的一个扩展,用于解析HTML元素中的元数据(metadata)。元数据通常存储在元素的自定义...

    movie_metadata(电影数据)

    movie_metadata(电影数据)

Global site tag (gtag.js) - Google Analytics