⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ioc-annotations.xtp

📁 RESIN 3.2 最新源码
💻 XTP
字号:
<document><header>  <title>IoC Annotations</title>  <version>Resin 3.1</version>  <description><p>IoC annotations direct the assembler to perform injection orother lifecycle events..</p>  </description></header><body><localtoc/><defun title="@EJB"><p>@EJB requests the injection of an EJB session bean.</p><def title="@EJB">@Target({TYPE, METHOD, FIELD})public @interface EJB {  String name() default "";  Class beanInterface() default Object.class;  String beanName() default "";  String mappedName() default "";}</def></defun><defun title="@PersistenceContext"><p>@PersistenceContext requests the injection of a JPA PersistenceContext.</p><example>@PersistenceContext(unitName="test")EntityManager _em;</example><def title="@PersistenceContext">package javax.persistence;@Target({TYPE, METHOD, FIELD})public @interface PersistenceUnit {  String name() default "";  String unitName() default "";  PersistenceContextType type() default TRANSACTION;  PersistenceProperty[] properties() default {};}</def></defun><defun title="@PersistenceUnit"><p>@PersistenceUnit requests the injection of a JPA PersistenceUnit.</p><example>@PersistenceUnit(unitName="test")EntityManagerFactory _emf;</example><def title="@PersistenceUnit">package javax.persistence;@Target({TYPE, METHOD, FIELD})public @interface PersistenceUnit {  String name() default "";  String unitName() default "";}</def></defun><defun title="@PostConstruct"><p>javax.annotation.PostConstruct tells the assembler to call a methodafter the bean has been built, but before it is active.</p><def title="@PostConstruct">package javax.annotation;@Target(value={PACKAGE,TYPE})public @interface PostConstruct {}</def></defun><defun title="@PreDestroy"><p>javax.annotation.PreDestroy tells the container to call the annotatedmethod before it is destroyed.</p><def title="@PreDestroy">package javax.annotation;@Target(value={PACKAGE,TYPE})public @interface PreDestroy {}</def></defun><defun title="@Resource"><p>@Resource tells the assembler to retrieve a resource an assign itto a field or property.  Typically, the resource will be stored in JNDI.</p><deftable title="Known types"><tr>  <td>DataSource</td>  <td>Configured by &lt;<a href="env-tags.xtp#database">database</a>&gt;</td></tr><tr>  <td>UserTransaction</td>  <td>User XA interface provided by Resin</td></tr><tr>  <td>Executor</td>  <td>JDK 1.5 thread pool interface (see java.util.concurrent)</td></tr></deftable><def title="@Resource">package javax.annotation;@Target({TYPE, METHOD, FIELD})@Retention(RetentionPolicy.RUNTIME)public @interface Resource {  String name() default "";  Class&lt;?> type() default Object.class;  AuthenticationType authenticationType() default CONTAINER;  boolean shareable() default true;  String mappedName() default "";  String description() default "";}</def></defun></body></document>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -