├── .gitignore ├── .travis.yml ├── 4.0-PLAN.adoc ├── CONTRIBUTING.md ├── LICENSE.md ├── NOTICE.md ├── README.md ├── api ├── pom.xml └── src │ └── main │ ├── java │ ├── jakarta │ │ └── ejb │ │ │ ├── AccessLocalException.java │ │ │ ├── AccessTimeout.java │ │ │ ├── ActivationConfigProperty.java │ │ │ ├── AfterBegin.java │ │ │ ├── AfterCompletion.java │ │ │ ├── ApplicationException.java │ │ │ ├── AsyncResult.java │ │ │ ├── Asynchronous.java │ │ │ ├── BeforeCompletion.java │ │ │ ├── ConcurrencyManagement.java │ │ │ ├── ConcurrencyManagementType.java │ │ │ ├── ConcurrentAccessException.java │ │ │ ├── ConcurrentAccessTimeoutException.java │ │ │ ├── CreateException.java │ │ │ ├── DependsOn.java │ │ │ ├── DuplicateKeyException.java │ │ │ ├── EJB.java │ │ │ ├── EJBAccessException.java │ │ │ ├── EJBContext.java │ │ │ ├── EJBException.java │ │ │ ├── EJBHome.java │ │ │ ├── EJBLocalHome.java │ │ │ ├── EJBLocalObject.java │ │ │ ├── EJBMetaData.java │ │ │ ├── EJBObject.java │ │ │ ├── EJBTransactionRequiredException.java │ │ │ ├── EJBTransactionRolledbackException.java │ │ │ ├── EJBs.java │ │ │ ├── EnterpriseBean.java │ │ │ ├── EntityBean.java │ │ │ ├── EntityContext.java │ │ │ ├── FinderException.java │ │ │ ├── Handle.java │ │ │ ├── HomeHandle.java │ │ │ ├── IllegalLoopbackException.java │ │ │ ├── Init.java │ │ │ ├── Local.java │ │ │ ├── LocalBean.java │ │ │ ├── LocalHome.java │ │ │ ├── Lock.java │ │ │ ├── LockType.java │ │ │ ├── MessageDriven.java │ │ │ ├── MessageDrivenBean.java │ │ │ ├── MessageDrivenContext.java │ │ │ ├── NoMoreTimeoutsException.java │ │ │ ├── NoSuchEJBException.java │ │ │ ├── NoSuchEntityException.java │ │ │ ├── NoSuchObjectLocalException.java │ │ │ ├── ObjectNotFoundException.java │ │ │ ├── PostActivate.java │ │ │ ├── PrePassivate.java │ │ │ ├── Remote.java │ │ │ ├── RemoteHome.java │ │ │ ├── Remove.java │ │ │ ├── RemoveException.java │ │ │ ├── Schedule.java │ │ │ ├── ScheduleExpression.java │ │ │ ├── Schedules.java │ │ │ ├── SessionBean.java │ │ │ ├── SessionContext.java │ │ │ ├── SessionSynchronization.java │ │ │ ├── Singleton.java │ │ │ ├── Startup.java │ │ │ ├── Stateful.java │ │ │ ├── StatefulTimeout.java │ │ │ ├── Stateless.java │ │ │ ├── TimedObject.java │ │ │ ├── Timeout.java │ │ │ ├── Timer.java │ │ │ ├── TimerConfig.java │ │ │ ├── TimerHandle.java │ │ │ ├── TimerService.java │ │ │ ├── TransactionAttribute.java │ │ │ ├── TransactionAttributeType.java │ │ │ ├── TransactionManagement.java │ │ │ ├── TransactionManagementType.java │ │ │ ├── TransactionRequiredLocalException.java │ │ │ ├── TransactionRolledbackLocalException.java │ │ │ ├── embeddable │ │ │ ├── EJBContainer.java │ │ │ └── package.html │ │ │ ├── package.html │ │ │ └── spi │ │ │ ├── EJBContainerProvider.java │ │ │ ├── HandleDelegate.java │ │ │ └── package.html │ └── module-info.java │ └── javadoc │ └── doc-files │ └── EFSL.html ├── assembly.xml ├── pom.xml └── spec ├── README.md ├── assembly.xml ├── pom.xml └── src └── main ├── asciidoc ├── core │ ├── ClientViewOfSessionBean.adoc │ ├── CompatibilityAndMigration.adoc │ ├── DeploymentDescriptor.adoc │ ├── EBCore.adoc │ ├── EmbeddableUsage.adoc │ ├── EnterpriseBeanEnvironment.adoc │ ├── ExceptionHandling.adoc │ ├── Interceptors.adoc │ ├── Introduction.adoc │ ├── MessageDrivenBeanComponentContract.adoc │ ├── Overview.adoc │ ├── Packaging.adoc │ ├── Persistence.adoc │ ├── RelatedDocuments.adoc │ ├── ResponsibilitiesOfEJBRoles.adoc │ ├── RevisionHistory.adoc │ ├── RuntimeEnvironment.adoc │ ├── SecurityManagement.adoc │ ├── SessionBeanComponentContract.adoc │ ├── SupportForTransactions.adoc │ └── TimerService.adoc ├── enterprise-beans-spec-core.adoc ├── enterprise-beans-spec-opt.adoc ├── images │ ├── EBCore-10.svg │ ├── EBCore-11.svg │ ├── EBCore-12.svg │ ├── EBCore-13.svg │ ├── EBCore-14.svg │ ├── EBCore-15.svg │ ├── EBCore-16.svg │ ├── EBCore-17.svg │ ├── EBCore-18.svg │ ├── EBCore-19.svg │ ├── EBCore-20.svg │ ├── EBCore-21.svg │ ├── EBCore-22.svg │ ├── EBCore-23.svg │ ├── EBCore-24.svg │ ├── EBCore-25.svg │ ├── EBCore-26.svg │ ├── EBCore-27.svg │ ├── EBCore-6.svg │ ├── EBCore-7.svg │ ├── EBCore-8.svg │ ├── EBCore-9.svg │ ├── EBOpt-10.svg │ ├── EBOpt-11.svg │ ├── EBOpt-12.svg │ ├── EBOpt-13.svg │ ├── EBOpt-14.svg │ ├── EBOpt-15.svg │ ├── EBOpt-16.svg │ ├── EBOpt-17.svg │ ├── EBOpt-18.svg │ ├── EBOpt-19.svg │ ├── EBOpt-20.svg │ ├── EBOpt-21.svg │ ├── EBOpt-22.svg │ ├── EBOpt-23.svg │ ├── EBOpt-24.svg │ ├── EBOpt-25.svg │ ├── EBOpt-26.svg │ ├── EBOpt-27.svg │ ├── EBOpt-28.svg │ ├── EBOpt-29.svg │ ├── EBOpt-30.svg │ ├── EBOpt-31.svg │ ├── EBOpt-32.svg │ ├── EBOpt-33.svg │ ├── EBOpt-34.svg │ ├── EBOpt-35.svg │ ├── EBOpt-36.svg │ ├── EBOpt-37.svg │ ├── EBOpt-38.svg │ ├── EBOpt-39.svg │ ├── EBOpt-40.svg │ ├── EBOpt-41.svg │ ├── EBOpt-42.svg │ ├── EBOpt-6.svg │ ├── EBOpt-7.svg │ ├── EBOpt-8.svg │ ├── EBOpt-9.svg │ └── jakarta_ee_logo_schooner_color_stacked_default.png ├── license-efsl.adoc └── opt │ ├── ClientViewOfEntityBean.adoc │ ├── DeploymentDescriptor.adoc │ ├── EBOpt.adoc │ ├── EJB1.1EntityBeanComponentContractForContainerManagedPersistence.adoc │ ├── EJB2.1EntityBeanComponentContractForBeanManagedPersistence.adoc │ ├── EJB2.1EntityBeanComponentContractForContainerManagedPersistence.adoc │ ├── EJBQL-EJB2.1QueryLanguageForContainerManagedPersistenceQueryMethods.adoc │ ├── ExceptionHandling.adoc │ ├── Introduction.adoc │ ├── Overview.adoc │ ├── PackagingRestrictions.adoc │ ├── RelatedDocuments.adoc │ ├── RevisionHistory.adoc │ ├── SupportForTransactions.adoc │ └── TimerService.adoc └── theme └── jakartaee-theme.yml /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .idea 3 | *.iml 4 | .java-version -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: openjdk8 3 | 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Jakarta Enterprise Beans 2 | 3 | Thanks for your interest in this project. 4 | 5 | ## Project description 6 | 7 | Jakarta Enterprise Beans is an architecture for the development and deployment of 8 | component-based business applications. 9 | 10 | * https://projects.eclipse.org/projects/ee4j.ejb 11 | 12 | ## Developer resources 13 | 14 | Information regarding source code management, builds, coding standards, and 15 | more. 16 | 17 | * https://projects.eclipse.org/projects/ee4j.ejb/developer 18 | 19 | The project maintains the following source code repositories 20 | 21 | * https://github.com/jakartaee/enterprise-beans 22 | 23 | ## Eclipse Contributor Agreement 24 | 25 | Before your contribution can be accepted by the project team contributors must 26 | electronically sign the Eclipse Contributor Agreement (ECA). 27 | 28 | * http://www.eclipse.org/legal/ECA.php 29 | 30 | Commits that are provided by non-committers must have a Signed-off-by field in 31 | the footer indicating that the author is aware of the terms by which the 32 | contribution has been provided to the project. The non-committer must 33 | additionally have an Eclipse Foundation account and must have a signed Eclipse 34 | Contributor Agreement (ECA) on file. 35 | 36 | For more information, please see the Eclipse Committer Handbook: 37 | https://www.eclipse.org/projects/handbook/#resources-commit 38 | 39 | ## Eclipse Development Process 40 | 41 | This Eclipse Foundation open project is governed by the Eclipse Foundation 42 | Development Process and operates under the terms of the Eclipse IP Policy. 43 | 44 | The Jakarta EE Specification Committee has adopted the Jakarta EE Specification 45 | Process (JESP) in accordance with the Eclipse Foundation Specification Process 46 | v1.2 (EFSP) to ensure that the specification process is complied with by all 47 | Jakarta EE specification projects. 48 | 49 | * https://eclipse.org/projects/dev_process 50 | * https://www.eclipse.org/org/documents/Eclipse_IP_Policy.pdf 51 | * https://jakarta.ee/about/jesp/ 52 | * https://www.eclipse.org/legal/efsp_non_assert.php 53 | 54 | ## Contact 55 | 56 | Contact the project developers via the project's "dev" list. 57 | 58 | * https://accounts.eclipse.org/mailing-list/ejb-dev 59 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | # Notices for Jakarta Enterprise Beans 2 | 3 | This content is produced and maintained by the Jakarta Enterprise Beans project. 4 | 5 | * Project home: https://projects.eclipse.org/projects/ee4j.ejb 6 | 7 | ## Trademarks 8 | 9 | Jakarta Enterprise Beans is a trademark of the Eclipse Foundation. 10 | 11 | ## Copyright 12 | 13 | All content is the property of the respective authors or their employers. For 14 | more information regarding authorship of content, please consult the listed 15 | source code repository logs. 16 | 17 | ## Declared Project Licenses 18 | 19 | This program and the accompanying materials are made available under the terms 20 | of the Eclipse Public License v. 2.0 which is available at 21 | http://www.eclipse.org/legal/epl-2.0. This Source Code may also be made 22 | available under the following Secondary Licenses when the conditions for such 23 | availability set forth in the Eclipse Public License v. 2.0 are satisfied: GNU 24 | General Public License, version 2 with the GNU Classpath Exception which is 25 | available at https://www.gnu.org/software/classpath/license.html. 26 | 27 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 28 | 29 | ## Source Code 30 | 31 | The project maintains the following source code repositories: 32 | 33 | * https://github.com/jakartaee/enterprise-beans 34 | 35 | ## Third-party Content 36 | 37 | ## Cryptography 38 | 39 | Content may contain encryption software. The country in which you are currently 40 | may have restrictions on the import, possession, and use, and/or re-export to 41 | another country, of encryption software. BEFORE using any encryption software, 42 | please check the country's laws, regulations and policies concerning the import, 43 | possession, or use, and re-export of encryption software, to see if this is 44 | permitted. 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jakarta Enterprise Beans API 2 | 3 | This is the repository for Jakarta Enterprise Beans API. 4 | 5 | ## Build 6 | 7 | Use the following command: 8 | ```bash 9 | mvn clean install 10 | ``` 11 | 12 | ## Licensing 13 | 14 | - [Eclipse Public License v. 2.0](http://www.eclipse.org/legal/epl-2.0) 15 | - [GPL2 with Classpath Exception](https://www.gnu.org/software/classpath/license.html) 16 | 17 | ## Links 18 | 19 | - Official web site: https://github.com/jakartaee/enterprise-beans 20 | 21 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/AccessLocalException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * An AccessLocalException is thrown to indicate that the caller does not have permission to call the method. This 21 | * exception is thrown to local clients. 22 | * 23 | * @since EJB 2.0 24 | */ 25 | public class AccessLocalException extends EJBException { 26 | 27 | private static final long serialVersionUID = -4089104928924996726L; 28 | 29 | /** 30 | * Constructs an AccessLocalException with no detail message. 31 | */ 32 | public AccessLocalException() { 33 | } 34 | 35 | /** 36 | * Constructs an AccessLocalException with the specified detail message. 37 | * 38 | * @param message a {@link java.lang.String} object. 39 | */ 40 | public AccessLocalException(String message) { 41 | super(message); 42 | } 43 | 44 | /** 45 | * Constructs an AccessLocalException with the specified detail message and a nested exception. 46 | * 47 | * @param message a {@link java.lang.String} object. 48 | * @param ex a {@link java.lang.Exception} object. 49 | */ 50 | public AccessLocalException(String message, Exception ex) { 51 | super(message, ex); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/AfterBegin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Designate a stateful session bean method to receive the after begin session synchronization callback. 26 | *

27 | * 28 | * The after begin callback notifies a stateful session bean instance that a new transaction has started and that the 29 | * subsequent business methods on the instance will be invoked in the context of the transaction. 30 | *

31 | * This method executes in the proper transaction context. 32 | * 33 | * A bean must have at most one AfterBegin method. The signature of this method must observe the following 34 | * rules: 35 | *

41 | * 42 | *

43 | * A stateful session bean class may use either the SessionSynchronization interface or the session 44 | * synchronization annotations, but not both. 45 | * 46 | * @see SessionSynchronization 47 | * @see BeforeCompletion 48 | * @see AfterCompletion 49 | * @since EJB 3.1 50 | */ 51 | 52 | @Target(METHOD) 53 | @Retention(RUNTIME) 54 | public @interface AfterBegin { 55 | } 56 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/AfterCompletion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Designate a stateful session bean method to receive the after completion session synchronization callback. 26 | *

27 | * 28 | * The after completion callback notifies a stateful session bean instance that a transaction commit protocol has 29 | * completed. A completion status of true indicates that the transaction has committed. A status of false indicates that 30 | * a rollback has occurred. 31 | *

32 | * 33 | * A bean must have at most one AfterCompletion method. The signature of this method must observe the 34 | * following rules: 35 | *

41 | * 42 | *

43 | * This method executes with no transaction context. 44 | *

45 | * A stateful session bean class may use either the SessionSynchronization interface or the session 46 | * synchronization annotations, but not both. 47 | * 48 | * @see SessionSynchronization 49 | * @see AfterBegin 50 | * @see BeforeCompletion 51 | * @since EJB 3.1 52 | */ 53 | 54 | @Target(METHOD) 55 | @Retention(RUNTIME) 56 | public @interface AfterCompletion { 57 | } 58 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/ApplicationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Applied to an exception to denote that it is an application exception and should be reported to the client directly 26 | * (i.e., unwrapped). 27 | * 28 | * @since EJB 3.0 29 | */ 30 | 31 | @Target(TYPE) 32 | @Retention(RUNTIME) 33 | public @interface ApplicationException { 34 | 35 | /** 36 | * Indicates whether the container should cause the transaction to rollback when the exception is thrown. 37 | * 38 | * @return a boolean. 39 | */ 40 | boolean rollback() default false; 41 | 42 | /** 43 | * Indicates whether the application exception designation should apply to subclasses of the annotated exception class. 44 | * 45 | * @since EJB 3.1 46 | * @return a boolean. 47 | */ 48 | boolean inherited() default true; 49 | 50 | } 51 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Asynchronous.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Used to mark a session bean method as an asynchronous method or to designate all business methods of a session bean 26 | * class as asynchronous. 27 | *

28 | * An asychronous method must have return type void or Future<V>, where 29 | * V is the result value type. 30 | *

31 | * Asynchronous method invocation semantics only apply to the no-interface, local business, and remote business client 32 | * views. Methods exposed through the enterprise bean 2.x local, enterprise bean 2.x remote, and web service client 33 | * views must not be designated as asynchronous. 34 | * 35 | * @see AsyncResult 36 | * @since EJB 3.1 37 | */ 38 | 39 | @Target({ METHOD, TYPE }) 40 | @Retention(RUNTIME) 41 | public @interface Asynchronous { 42 | } 43 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/BeforeCompletion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Designate a stateful session bean method to receive the before completion session synchronization callback. 26 | *

27 | * 28 | * The before completion callback notifies a stateful session bean instance that a transaction is about to be committed. 29 | *

30 | * This method executes in the proper transaction context. 31 | * 32 | *

33 | * Note: The instance may still cause the container to rollback the transaction by invoking the 34 | * setRollbackOnly() method on the session context or by throwing an exception. 35 | * 36 | * A bean must have at most one BeforeCompletion method. The signature of this method must observe the 37 | * following rules: 38 | *

44 | * 45 | *

46 | * A stateful session bean class may use either the SessionSynchronization interface or the session 47 | * synchronization annotations, but not both. 48 | * 49 | * @see SessionSynchronization 50 | * @see AfterBegin 51 | * @see AfterCompletion 52 | * @since EJB 3.1 53 | */ 54 | 55 | @Target(METHOD) 56 | @Retention(RUNTIME) 57 | public @interface BeforeCompletion { 58 | } 59 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/ConcurrencyManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Declares a singleton session bean's concurrency management type. 26 | * 27 | *

28 | * If this annotation is not specified, the singleton bean is assumed to have container managed concurrency. 29 | * 30 | *

31 | * This annotation may be applied to stateful session beans, but doing so has no impact on the semantics of concurrency 32 | * management for such beans. The concurrency management type for bean-managed concurrency (BEAN) does not 33 | * apply to stateful session beans. 34 | * 35 | * @see ConcurrencyManagementType 36 | * @see Lock 37 | * @since EJB 3.1 38 | */ 39 | 40 | @Target({ TYPE }) 41 | @Retention(RUNTIME) 42 | public @interface ConcurrencyManagement { 43 | 44 | /** 45 | *

value.

46 | * 47 | * @return a {@link jakarta.ejb.ConcurrencyManagementType} object. 48 | */ 49 | ConcurrencyManagementType value() default ConcurrencyManagementType.CONTAINER; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/ConcurrencyManagementType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * Used to specify the value of the ConcurrencyManagement annotation for a singleton session bean. 21 | * 22 | * @see ConcurrencyManagement 23 | * @since EJB 3.1 24 | */ 25 | public enum ConcurrencyManagementType { 26 | /** 27 | * Container is responsible for managing concurrent access to the bean instance. 28 | */ 29 | CONTAINER, 30 | 31 | /** 32 | * Bean developer is responsible for managing concurrent access to the bean instance. 33 | */ 34 | BEAN 35 | } 36 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/ConcurrentAccessException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * A ConcurrentAccessException indicates that the client has attempted an invocation on a stateful session bean or 21 | * singleton bean while another invocation is in progress and such concurrent access is not allowed. 22 | * 23 | * @see AccessTimeout 24 | * @since EJB 3.1 25 | */ 26 | public class ConcurrentAccessException extends EJBException { 27 | 28 | private static final long serialVersionUID = -8980855319866981477L; 29 | 30 | /** 31 | * Constructs an ConcurrentAccessException with no detail message. 32 | */ 33 | public ConcurrentAccessException() { 34 | } 35 | 36 | /** 37 | * Constructs an ConcurrentAccessException with the specified detailed message. 38 | * 39 | * @param message a {@link java.lang.String} object. 40 | */ 41 | public ConcurrentAccessException(String message) { 42 | super(message); 43 | } 44 | 45 | /** 46 | * Constructs an ConcurrentAccessException with the specified detail message and a nested exception. 47 | * 48 | * @param message a {@link java.lang.String} object. 49 | * @param ex a {@link java.lang.Exception} object. 50 | */ 51 | public ConcurrentAccessException(String message, Exception ex) { 52 | super(message, ex); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/ConcurrentAccessTimeoutException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception indicates that an attempt to concurrently access a stateful session or singleton bean method resulted 21 | * in a timeout. 22 | * 23 | * @see AccessTimeout 24 | * @since EJB 3.1 25 | */ 26 | public class ConcurrentAccessTimeoutException extends ConcurrentAccessException { 27 | 28 | private static final long serialVersionUID = 7899534274371798660L; 29 | 30 | /** 31 | *

Constructor for ConcurrentAccessTimeoutException.

32 | */ 33 | public ConcurrentAccessTimeoutException() { 34 | } 35 | 36 | /** 37 | *

Constructor for ConcurrentAccessTimeoutException.

38 | * 39 | * @param message a {@link java.lang.String} object. 40 | */ 41 | public ConcurrentAccessTimeoutException(String message) { 42 | super(message); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/CreateException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The CreateException exception must be included in the throws clauses of all create methods defined in an enterprise 21 | * bean's home or local home interface. 22 | * 23 | *

24 | * This exception is used as a standard application-level exception to report a failure to create an enterprise bean 25 | * object or local object. 26 | * 27 | * @since EJB 1.0 28 | */ 29 | public class CreateException extends java.lang.Exception { 30 | 31 | private static final long serialVersionUID = 6295951740865457514L; 32 | 33 | /** 34 | * Constructs a CreateException with no detail message. 35 | */ 36 | public CreateException() { 37 | } 38 | 39 | /** 40 | * Constructs a CreateException with the specified detail message. 41 | * 42 | * @param message a {@link java.lang.String} object. 43 | */ 44 | public CreateException(String message) { 45 | super(message); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/DependsOn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Used to express an initialization dependency between singleton components. 26 | *

27 | * 28 | * The container ensures that all singleton beans with which a singleton has a DependsOn relationship have 29 | * been initialized before the singleton's PostConstruct method is called. 30 | *

31 | * During application shutdown the container ensures that all singleton beans on with which the singleton has a 32 | * DependsOn relationship are still available during the singleton's PreDestroy method. 33 | * 34 | * @since EJB 3.1 35 | */ 36 | @Target(TYPE) 37 | @Retention(RUNTIME) 38 | public @interface DependsOn { 39 | 40 | /** 41 | * The ejb-names of singleton components whose initialization must occur before this singleton. The order in which these 42 | * names are listed is not significant. 43 | * 44 | * @return an array of {@link java.lang.String} objects. 45 | */ 46 | String[] value(); 47 | 48 | } 49 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/DuplicateKeyException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The DuplicateKeyException exception is thrown if an entity EJB object or enterprise bean local object cannot be 21 | * created because an object with the same key already exists. This exception is thrown by the create methods defined in 22 | * an entity bean's home or local home interface. 23 | * 24 | *

25 | * Note: Support for entity beans is optional as of EJB 3.2 26 | * 27 | * @since EJB 1.0 28 | */ 29 | public class DuplicateKeyException extends CreateException { 30 | 31 | private static final long serialVersionUID = -7287399994705270076L; 32 | 33 | /** 34 | * Constructs a DuplicateKeyException with no detail message. 35 | */ 36 | public DuplicateKeyException() { 37 | } 38 | 39 | /** 40 | * Constructs a DuplicateKeyException with the specified detail message. 41 | * 42 | * @param message a {@link java.lang.String} object. 43 | */ 44 | public DuplicateKeyException(String message) { 45 | super(message); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EJBAccessException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception indicates that client access to a business method was denied. 21 | * 22 | * @since EJB 3.0 23 | */ 24 | public class EJBAccessException extends EJBException { 25 | 26 | private static final long serialVersionUID = 4923220329322198628L; 27 | 28 | /** 29 | * Constructs an EJBAccessException with no detail message. 30 | */ 31 | public EJBAccessException() { 32 | } 33 | 34 | /** 35 | * Constructs an EJBAccessException with the specified detailed message. 36 | * 37 | * @param message a {@link java.lang.String} object. 38 | */ 39 | public EJBAccessException(String message) { 40 | super(message); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EJBException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The EJBException is thrown to report that the invoked business method or callback method could not be completed 21 | * because of an unexpected error (e.g. the instance failed to open a database connection). 22 | * 23 | * @since EJB 1.1 24 | */ 25 | public class EJBException extends java.lang.RuntimeException { 26 | 27 | private static final long serialVersionUID = 796770993296843510L; 28 | 29 | /** 30 | * Constructs an EJBException with no detail message. 31 | */ 32 | public EJBException() { 33 | } 34 | 35 | /** 36 | * Constructs an EJBException with the specified detailed message. 37 | * 38 | * @param message a {@link java.lang.String} object. 39 | */ 40 | public EJBException(String message) { 41 | super(message); 42 | } 43 | 44 | /** 45 | * Constructs an EJBException that embeds the originally thrown exception. 46 | * 47 | * @param ex a {@link java.lang.Exception} object. 48 | */ 49 | public EJBException(Exception ex) { 50 | super(ex); 51 | } 52 | 53 | /** 54 | * Constructs an EJBException that embeds the originally thrown exception with the specified detail message. 55 | * 56 | * @param message a {@link java.lang.String} object. 57 | * @param ex a {@link java.lang.Exception} object. 58 | */ 59 | public EJBException(String message, Exception ex) { 60 | super(message, ex); 61 | } 62 | 63 | /** 64 | * Obtain the exception that caused the EJBException to be thrown. It is recommended that the inherited 65 | * Throwable.getCause() method be used to retrieve the cause instead of this method. 66 | * 67 | * @return a {@link java.lang.Exception} object. 68 | */ 69 | public Exception getCausedByException() { 70 | return (Exception) getCause(); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EJBLocalHome.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The EJBLocalHome interface must be extended by all enterprise beans' local home interfaces. An enterprise bean's 21 | * local home interface defines the methods that allow local clients to create, find, and remove enterprise bean 22 | * objects. 23 | * 24 | *

25 | * The local home interface is defined by the enterprise bean provider and implemented by the enterprise bean container. 26 | *

27 | * Enterprise beans written to the EJB 3.0 and later APIs do not require a local home interface. 28 | * 29 | * @since EJB 2.0 30 | */ 31 | public interface EJBLocalHome { 32 | 33 | /** 34 | * Remove an enterprise bean object identified by its primary key. 35 | * 36 | *

37 | * This method can only be used by local clients of an entity bean. An attempt to call this method on a session bean 38 | * will result in a RemoveException. 39 | * 40 | *

41 | * Note: Support for entity beans is optional as of EJB 3.2. 42 | * 43 | * @param primaryKey the primary key of the enterprise bean object to be removed 44 | * @exception RemoveException Thrown if the enterprise bean or the container does not allow the client to remove the 45 | * object. 46 | * @exception EJBException Thrown when the method failed due to a system-level failure. 47 | */ 48 | void remove(Object primaryKey) throws RemoveException, EJBException; 49 | 50 | } 51 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EJBMetaData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The EJBMetaData interface allows a client to obtain the enterprise bean's meta-data information. 21 | * 22 | *

23 | * The meta-data is intended for development tools used for building applications that use deployed enterprise beans, 24 | * and for clients using a scripting language to access the enterprise bean. 25 | * 26 | *

27 | * Note that the EJBMetaData is not a remote interface. The class that implements this interface (this class is 28 | * typically generated by container tools) must be serializable, and must be a valid RMI/IDL value type. 29 | * 30 | * @since EJB 1.0 31 | */ 32 | public interface EJBMetaData { 33 | /** 34 | * Obtain the remote home interface of the enterprise bean. 35 | * 36 | * @return the remote home interface of the enterprise bean. 37 | */ 38 | EJBHome getEJBHome(); 39 | 40 | /** 41 | * Obtain the class object for the enterprise bean's remote home interface. 42 | * 43 | * @return the class object for the enterprise bean's remote home interface. 44 | */ 45 | Class getHomeInterfaceClass(); 46 | 47 | /** 48 | * Obtain the class object for the enterprise bean's remote interface. 49 | * 50 | * @return the class object for the enterprise bean's remote interface. 51 | */ 52 | Class getRemoteInterfaceClass(); 53 | 54 | /** 55 | * Obtain the class object for the enterprise bean's primary key class. 56 | * 57 | * @return the class object for the enterprise bean's primary key class. 58 | */ 59 | Class getPrimaryKeyClass(); 60 | 61 | /** 62 | * Test if the enterprise bean's type is "session". 63 | * 64 | * @return True if the type of the enterprise bean is session bean. 65 | */ 66 | boolean isSession(); 67 | 68 | /** 69 | * Test if the enterprise bean's type is "stateless session". 70 | * 71 | * @return True if the type of the enterprise Bean is stateless session. 72 | * @since EJB 1.1 73 | */ 74 | boolean isStatelessSession(); 75 | } 76 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EJBTransactionRequiredException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception indicates that a request carried a null transaction context, but the target object requires an active 21 | * transaction. 22 | * 23 | * @since EJB 3.0 24 | */ 25 | public class EJBTransactionRequiredException extends EJBException { 26 | 27 | private static final long serialVersionUID = 8880799605373282306L; 28 | 29 | /** 30 | * Constructs an EJBTransactionRequiredException with no detail message. 31 | */ 32 | public EJBTransactionRequiredException() { 33 | } 34 | 35 | /** 36 | * Constructs an EJBTransactionRequiredException with the specified detailed message. 37 | * 38 | * @param message a {@link java.lang.String} object. 39 | */ 40 | public EJBTransactionRequiredException(String message) { 41 | super(message); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EJBTransactionRolledbackException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception is thrown to a caller of bean business method to indicate that the transaction associated with processing of the 21 | * request has been rolled back, or marked to roll back. Thus the requested operation either could not be performed or 22 | * was not performed because further computation on behalf of the transaction would be fruitless. 23 | * 24 | * @since EJB 2.0 25 | */ 26 | public class EJBTransactionRolledbackException extends EJBException { 27 | 28 | private static final long serialVersionUID = -8301720350425840333L; 29 | 30 | /** 31 | * Constructs an EJBTransactionRolledbackException with no detail message. 32 | */ 33 | public EJBTransactionRolledbackException() { 34 | } 35 | 36 | /** 37 | * Constructs an EJBTransactionRolledbackException with the specified detailed message. 38 | * 39 | * @param message a {@link java.lang.String} object. 40 | */ 41 | public EJBTransactionRolledbackException(String message) { 42 | super(message); 43 | } 44 | 45 | /** 46 | * Constructs an EJBTransactionRolledbackException with the specified detail message and a nested exception. 47 | * 48 | * @param message a {@link java.lang.String} object. 49 | * @param ex a {@link java.lang.Exception} object. 50 | */ 51 | public EJBTransactionRolledbackException(String message, Exception ex) { 52 | super(message, ex); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EJBs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Declares multiple EJB annotations. 26 | * 27 | * @see EJB 28 | * @since EJB 3.0 29 | */ 30 | @Target(TYPE) 31 | @Retention(RUNTIME) 32 | public @interface EJBs { 33 | 34 | /** 35 | *

value.

36 | * 37 | * @return an array of {@link jakarta.ejb.EJB} objects. 38 | */ 39 | EJB[] value(); 40 | } 41 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/EnterpriseBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The EnterpriseBean interface is a common superinterface for the SessionBean, EntityBean and MessageDrivenBean 21 | * interfaces. 22 | * 23 | * @see SessionBean 24 | * @see MessageDrivenBean 25 | * @see EntityBean 26 | * @since EJB 1.0 27 | */ 28 | public interface EnterpriseBean extends java.io.Serializable { 29 | } 30 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/FinderException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The FinderException exception must be included in the throws clause of every finder method of an entity bean's home 21 | * or local home interface. 22 | * 23 | *

24 | * The exception is used as a standard application-level exception to report a failure to find the requested enterprise 25 | * bean object(s). 26 | * 27 | *

28 | * Note: Support for entity beans is optional as of EJB 3.2. 29 | * 30 | * @since EJB 1.0 31 | */ 32 | public class FinderException extends java.lang.Exception { 33 | 34 | private static final long serialVersionUID = 8785983102057433621L; 35 | 36 | /** 37 | * Constructs an FinderException with no detail message. 38 | */ 39 | public FinderException() { 40 | } 41 | 42 | /** 43 | * Constructs an FinderException with the specified detail message. 44 | * 45 | * @param message a {@link java.lang.String} object. 46 | */ 47 | public FinderException(String message) { 48 | super(message); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Handle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.rmi.RemoteException; 20 | 21 | /** 22 | * The Handle interface is implemented by all enterprise bean object handles. A handle is an abstraction of a network 23 | * reference to an enterprise bean object. A handle is intended to be used as a "robust" persistent reference to an 24 | * enterprise bean object. 25 | * 26 | * @since EJB 1.0 27 | */ 28 | public interface Handle extends java.io.Serializable { 29 | /** 30 | * Obtain the enterprise bean object reference represented by this handle. 31 | * 32 | * @return the enterprise bean object reference represented by this handle. 33 | * @exception RemoteException The enterprise bean object could not be obtained because of a system-level failure. 34 | */ 35 | public EJBObject getEJBObject() throws RemoteException; 36 | } 37 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/HomeHandle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.rmi.RemoteException; 20 | 21 | /** 22 | * The HomeHandle interface is implemented by all home object handles. A handle is an abstraction of a network reference 23 | * to a home object. A handle is intended to be used as a "robust" persistent reference to a home object. 24 | * 25 | * @since EJB 1.1 26 | */ 27 | public interface HomeHandle extends java.io.Serializable { 28 | /** 29 | * Obtain the home object represented by this handle. 30 | * 31 | * @return the home object represented by this handle. 32 | * @exception RemoteException The home object could not be obtained because of a system-level failure. 33 | */ 34 | public EJBHome getEJBHome() throws RemoteException; 35 | } 36 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/IllegalLoopbackException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception indicates that an attempt was made to perform an illegal loopback invocation. One possible cause is a 21 | * loopback call to a singleton bean's container-managed concurrency Lock(WRITE) method where the current 22 | * thread does not already hold a WRITE lock. 23 | * 24 | * @since EJB 3.1 25 | */ 26 | public class IllegalLoopbackException extends ConcurrentAccessException { 27 | 28 | private static final long serialVersionUID = -8854624128500916709L; 29 | 30 | /** 31 | *

Constructor for IllegalLoopbackException.

32 | */ 33 | public IllegalLoopbackException() { 34 | } 35 | 36 | /** 37 | *

Constructor for IllegalLoopbackException.

38 | * 39 | * @param message a {@link java.lang.String} object. 40 | */ 41 | public IllegalLoopbackException(String message) { 42 | super(message); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Init.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.ElementType; 21 | 22 | import java.lang.annotation.Target; 23 | import java.lang.annotation.Retention; 24 | 25 | /** 26 | * Designates a method of a session bean that corresponds to a create<METHOD> method of an 27 | * adapted home or local home interface (an interface that adapts an enterprise bean 2.1 or earlier EJBHome or 28 | * EJBLocalHome client view respectively). 29 | * 30 | *

31 | * The result type of such an Init method is required to be void, and its parameter types must 32 | * be exactly the same as those of the referenced create<METHOD> method(s). 33 | * 34 | *

35 | * An Init method is only required to be specified for stateful session beans that provide a 36 | * RemoteHome or LocalHome interface. 37 | * 38 | *

39 | * The name of the adapted create<METHOD> method of the home or local home interface must be 40 | * specified if the adapted interface has more than one create<METHOD> method and the method 41 | * signatures are not the same. 42 | * 43 | * @see LocalHome 44 | * @see RemoteHome 45 | * @since EJB 3.0 46 | */ 47 | @Target({ ElementType.METHOD }) 48 | @Retention(RetentionPolicy.RUNTIME) 49 | public @interface Init { 50 | 51 | /** 52 | * The name of the corresponding create<METHOD> method of the adapted home or local home 53 | * interface. This value is used to disambiguate the case where there are multiple create<METHOD> 54 | * methods on an adapted home and/or local home interface. If there are multiple create<METHOD> 55 | * methods on the adapted interface(s) and no value is specified, the create<METHOD> matching is 56 | * based on signature only. 57 | *

58 | * Note that this value is not required to be specified if there is only a single create<METHOD> 59 | * method even if the name of the method to which the Init annotation is applied does not match that of the 60 | * create<METHOD> method. 61 | * 62 | * @return a {@link java.lang.String} object. 63 | */ 64 | String value() default ""; 65 | 66 | } 67 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/LocalBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Designates that a session bean exposes a no-interface view. 26 | *

27 | * This annotation is required if a session bean exposes any other client views (local, remote, no-interface, 2.x Remote 28 | * Home, 2.x Local Home, Web Service) in addition to the no-interface view or its implements clause contains an 29 | * interface other than java.io.Serializable; java.io.Externalizable; or any of the interfaces 30 | * defined by the jakarta.ejb package. 31 | *

32 | * This annotation is optional if a session bean exposes only a no-interface view. 33 | * 34 | * @since EJB 3.1 35 | */ 36 | 37 | @Target({ TYPE }) 38 | @Retention(RUNTIME) 39 | public @interface LocalBean { 40 | } 41 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/LocalHome.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.ElementType; 21 | 22 | import java.lang.annotation.Target; 23 | import java.lang.annotation.Retention; 24 | 25 | /** 26 | * Declares the local home or adapted local home interface for a session bean. 27 | *

28 | * Clients written to the enterprise bean 2.1 and earlier client view depend upon the existence of a home and component 29 | * interface. A session bean written to the enterprise bean 3.x API may be adapted to such earlier preexisting client 30 | * view interfaces. 31 | *

32 | * The session bean designates the local home interface to be adapted by using the LocalHome annotation on 33 | * the bean class. The corresponding local component interface need not be explicitly specified, as it is derived from 34 | * the return type of local home interface's create method signature. 35 | * 36 | *

37 | * Session beans written to the EJB 3.0 and later APIs do not otherwise make use of local home interfaces. 38 | * 39 | * @see Init 40 | * @see RemoteHome 41 | * @since EJB 3.0 42 | */ 43 | 44 | @Target({ ElementType.TYPE }) 45 | @Retention(RetentionPolicy.RUNTIME) 46 | public @interface LocalHome { 47 | 48 | /** 49 | * The local home interface. 50 | * 51 | * @return a {@link java.lang.Class} object. 52 | */ 53 | Class value(); 54 | } 55 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Lock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Declares a concurrency lock for a singleton session bean with container managed concurrency. 26 | * 27 | *

28 | * This annotation may be specified on the bean class, the business methods of the bean class or both. Specifying the 29 | * annotation on a business method overrides the value specified at class level, if any. 30 | * 31 | *

32 | * If this annotation is not used, a value of Lock(WRITE) is assumed. 33 | * 34 | * @since EJB 3.1 35 | */ 36 | 37 | @Target({ TYPE, METHOD }) 38 | @Retention(RUNTIME) 39 | public @interface Lock { 40 | 41 | /** 42 | *

value.

43 | * 44 | * @return a {@link jakarta.ejb.LockType} object. 45 | */ 46 | LockType value() default LockType.WRITE; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/LockType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * Concurrency lock type for singleton beans with container-managed concurrency. 21 | * 22 | * @since EJB 3.1 23 | */ 24 | public enum LockType { 25 | 26 | /** 27 | * For read-only operations. Allows simultaneous access to methods designated as READ, as long as no 28 | * WRITE lock is held. 29 | */ 30 | READ, 31 | 32 | /** 33 | * For exclusive access to the bean instance. A WRITE lock can only be acquired when no other method with 34 | * either a READ or WRITE lock is currently held. 35 | */ 36 | WRITE 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/MessageDriven.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Component-defining annotation for a message driven bean. 26 | *

27 | * The message driven bean must implement the appropriate message listener interface for the messaging type that the 28 | * message-driven bean supports or specify the message listener interface using the 29 | * messageListenerInterface element of this annotation. 30 | * 31 | * @see ActivationConfigProperty 32 | * @since EJB 3.0 33 | */ 34 | @Target({ ElementType.TYPE }) 35 | @Retention(RetentionPolicy.RUNTIME) 36 | public @interface MessageDriven { 37 | 38 | /** 39 | * The ejb-name for this bean. Defaults to the unqualified name of the message driven bean class. 40 | * 41 | * @return a {@link java.lang.String} object. 42 | */ 43 | String name() default ""; 44 | 45 | /** 46 | * Message-listener interface. If the message-driven bean class implements more than one interface other than 47 | * java.io.Serializable, java.io.Externalizable, or any of the interfaces defined by the 48 | * jakarta.ejb package, the message listener interface must be specified. 49 | * 50 | * @return a {@link java.lang.Class} object. 51 | */ 52 | Class messageListenerInterface() default Object.class; 53 | 54 | /** 55 | * Activation config properties. 56 | * 57 | * @return an array of {@link jakarta.ejb.ActivationConfigProperty} objects. 58 | */ 59 | ActivationConfigProperty[] activationConfig() default {}; 60 | 61 | /** 62 | * A product specific name(e.g. global JNDI name of a queue) that this message-driven bean should be mapped to. 63 | * 64 | * Application servers are not required to support any particular form or type of mapped name, nor the ability to use 65 | * mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is 66 | * portable. 67 | * 68 | * @return a {@link java.lang.String} object. 69 | */ 70 | String mappedName() default ""; 71 | 72 | /** 73 | * A string describing the message driven bean. 74 | * 75 | * @return a {@link java.lang.String} object. 76 | */ 77 | String description() default ""; 78 | } 79 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/MessageDrivenBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The MessageDrivenBean interface defines methods that the enterprise bean container uses to notify a message driven 21 | * bean instance of the instance's life cycle events. 22 | *

23 | * As of EJB 3.0 it is no longer required that a message driven bean class implement this interface. 24 | * 25 | * @since EJB 2.0 26 | */ 27 | public interface MessageDrivenBean extends EnterpriseBean { 28 | /** 29 | * Set the associated message-driven context. The container calls this method after the instance creation. 30 | * 31 | *

32 | * The message driven bean instance should store the reference to the context object in an instance variable. 33 | * 34 | *

35 | * This method is called with no transaction context. 36 | * 37 | * @param ctx A MessageDrivenContext interface for the instance. 38 | * @exception EJBException Thrown by the method to indicate a failure caused by a system-level error. 39 | */ 40 | void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException; 41 | 42 | /** 43 | * A container invokes this method before it ends the life of the message-driven object. This happens when a container 44 | * decides to terminate the message-driven object. 45 | * 46 | *

47 | * This method is called with no transaction context. 48 | * 49 | * @exception EJBException Thrown by the method to indicate a failure caused by a system-level error. 50 | */ 51 | void ejbRemove() throws EJBException; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/MessageDrivenContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The MessageDrivenContext interface provides access to the runtime message-driven context that the container provides 21 | * for a message-driven bean instance. The container passes the MessageDrivenContext interface to an 22 | * instance after the instance has been created. The message-driven context remains associated with the instance for the 23 | * lifetime of the instance. 24 | * 25 | * @since EJB 2.0 26 | */ 27 | public interface MessageDrivenContext extends EJBContext { 28 | } 29 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/NoMoreTimeoutsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception indicates that a calendar-based timer will not result in any more timeouts. 21 | * 22 | * @since EJB 3.1 23 | */ 24 | public class NoMoreTimeoutsException extends EJBException { 25 | 26 | private static final long serialVersionUID = 1373788283844991998L; 27 | 28 | /** 29 | *

Constructor for NoMoreTimeoutsException.

30 | */ 31 | public NoMoreTimeoutsException() { 32 | } 33 | 34 | /** 35 | *

Constructor for NoMoreTimeoutsException.

36 | * 37 | * @param message a {@link java.lang.String} object. 38 | */ 39 | public NoMoreTimeoutsException(String message) { 40 | super(message); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/NoSuchEJBException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * A NoSuchEJBException is thrown if an attempt is made to invoke a business method on a stateful session or singleton 21 | * object that no longer exists. 22 | * 23 | * @since EJB 3.0 24 | */ 25 | public class NoSuchEJBException extends EJBException { 26 | 27 | private static final long serialVersionUID = -4861625171310593950L; 28 | 29 | /** 30 | * Constructs a NoSuchEJBException with no detail message. 31 | */ 32 | public NoSuchEJBException() { 33 | } 34 | 35 | /** 36 | * Constructs a NoSuchEJBException with the specified detail message. 37 | * 38 | * @param message a {@link java.lang.String} object. 39 | */ 40 | public NoSuchEJBException(String message) { 41 | super(message); 42 | } 43 | 44 | /** 45 | * Constructs a NoSuchEJBException with the specified detail message and a nested exception. 46 | * 47 | * @param message a {@link java.lang.String} object. 48 | * @param ex a {@link java.lang.Exception} object. 49 | */ 50 | public NoSuchEJBException(String message, Exception ex) { 51 | super(message, ex); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/NoSuchEntityException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The NoSuchEntityException exception is thrown by an entity bean instance to its container to report that the invoked 21 | * business method or callback method could not be completed because of the underlying entity was removed from the 22 | * database. 23 | * 24 | *

25 | * This exception may be thrown by the bean class methods that implement the business methods defined in the bean's 26 | * component interface and by the ejbLoad and ejbStore methods. 27 | * 28 | *

29 | * Note: Support for entity beans is optional as of EJB 3.2. 30 | * 31 | * @since EJB 1.1 32 | */ 33 | public class NoSuchEntityException extends EJBException { 34 | 35 | private static final long serialVersionUID = -4815730078295420703L; 36 | 37 | /** 38 | * @serial 39 | */ 40 | 41 | /** 42 | * Constructs a NoSuchEntityException with no detail message. 43 | */ 44 | public NoSuchEntityException() { 45 | } 46 | 47 | /** 48 | * Constructs a NoSuchEntityException with the specified detailed message. 49 | * 50 | * @param message a {@link java.lang.String} object. 51 | */ 52 | public NoSuchEntityException(String message) { 53 | super(message); 54 | } 55 | 56 | /** 57 | * Constructs a NoSuchEntityException that embeds the originally thrown exception. 58 | * 59 | * @param ex a {@link java.lang.Exception} object. 60 | */ 61 | public NoSuchEntityException(Exception ex) { 62 | super(ex); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/NoSuchObjectLocalException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * A NoSuchObjectLocalException is thrown if an attempt is made to invoke a method on a local object (local enterprise 21 | * bean object or timer) that no longer exists. 22 | * 23 | * @since EJB 2.0 24 | */ 25 | public class NoSuchObjectLocalException extends EJBException { 26 | 27 | private static final long serialVersionUID = 9151491108833037318L; 28 | 29 | /** 30 | * Constructs a NoSuchObjectLocalException with no detail message. 31 | */ 32 | public NoSuchObjectLocalException() { 33 | } 34 | 35 | /** 36 | * Constructs a NoSuchObjectLocalException with the specified detail message. 37 | * 38 | * @param message a {@link java.lang.String} object. 39 | */ 40 | public NoSuchObjectLocalException(String message) { 41 | super(message); 42 | } 43 | 44 | /** 45 | * Constructs a NoSuchObjectLocalException with the specified detail message and a nested exception. 46 | * 47 | * @param message a {@link java.lang.String} object. 48 | * @param ex a {@link java.lang.Exception} object. 49 | */ 50 | public NoSuchObjectLocalException(String message, Exception ex) { 51 | super(message, ex); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/ObjectNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The ObjectNotFoundException exception is thrown by a finder or select method to indicate that the specified 21 | * enterprise bean object or local object does not exist. 22 | * 23 | *

24 | * Only the finder and select methods that are declared to return a single object use this exception. This exception 25 | * should not be thrown by finder or select methods that return a collection of objects (they should return an empty 26 | * collection instead). 27 | * 28 | * @since EJB 1.0 29 | */ 30 | public class ObjectNotFoundException extends FinderException { 31 | 32 | private static final long serialVersionUID = 4624364141026778L; 33 | 34 | /** 35 | * Constructs an ObjectNotFoundException with no detail message. 36 | */ 37 | public ObjectNotFoundException() { 38 | } 39 | 40 | /** 41 | * Constructs an ObjectNotFoundException with the specified detail message. 42 | * 43 | * @param message a {@link java.lang.String} object. 44 | */ 45 | public ObjectNotFoundException(String message) { 46 | super(message); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/PostActivate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.ElementType; 21 | 22 | import java.lang.annotation.Target; 23 | import java.lang.annotation.Retention; 24 | 25 | /** 26 | * Designates a method to receive a callback after a stateful session bean has been activated. 27 | *

28 | * If the method to which this annotation is applied is defined on an interceptor class, it must have one of the 29 | * following signatures: 30 | * 31 | *

32 |  * void <METHOD>(InvocationContext)
33 |  *
34 |  * Object <METHOD>(InvocationContext) throws Exception
35 |  * 
36 | *

37 | * If the method to which this annotation is applied is defined on a target class, it must have the following signature: 38 | * 39 | *

40 |  * void <METHOD>()
41 |  * 
42 | * 43 | * The method can have public, private, protected, or package level access. It must not be declared as final or static. 44 | * 45 | * @since EJB 3.0 46 | */ 47 | 48 | @Target({ ElementType.METHOD }) 49 | @Retention(RetentionPolicy.RUNTIME) 50 | public @interface PostActivate { 51 | } 52 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/PrePassivate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.ElementType; 21 | 22 | import java.lang.annotation.Target; 23 | import java.lang.annotation.Retention; 24 | 25 | /** 26 | * Designates a method to receive a callback before a stateful session bean is passivated. 27 | *

28 | * If the method to which this annotation is applied is defined on an interceptor class, it must have one of the 29 | * following signatures: 30 | * 31 | *

32 |  * void <METHOD>(InvocationContext)
33 |  *
34 |  * Object <METHOD>(InvocationContext) throws Exception
35 |  * 
36 | *

37 | * If the method to which this annotation is applied is defined on a target class, it must have the following signature: 38 | * 39 | *

40 |  * void <METHOD>()
41 |  * 
42 | * 43 | * The method can have public, private, protected, or package level access. It must not be declared as final or static. 44 | * 45 | * @since EJB 3.0 46 | */ 47 | 48 | @Target({ ElementType.METHOD }) 49 | @Retention(RetentionPolicy.RUNTIME) 50 | public @interface PrePassivate { 51 | } 52 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Remote.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.ElementType; 21 | 22 | import java.lang.annotation.Target; 23 | import java.lang.annotation.Retention; 24 | 25 | /** 26 | * Declares the remote business interface(s) for a session bean. 27 | *

28 | * The Remote annotation is applied to the session bean class or remote business interface to designate a 29 | * remote business interface of the bean. 30 | *

31 | * When used on an interface, designates that interface as a remote business interface. In this case, no 32 | * value element should be provided. 33 | *

34 | * The Remote annotation applies only to session beans and their interfaces. 35 | * 36 | * @since EJB 3.0 37 | */ 38 | 39 | @Target({ ElementType.TYPE }) 40 | @Retention(RetentionPolicy.RUNTIME) 41 | public @interface Remote { 42 | 43 | /** 44 | * Specifies the remote business interface(s) of the bean. The value element is specified only when the 45 | * annotation is applied to the bean class. It is only required to be specified if any of the following is true: 46 | *

54 | * 55 | * @return an array of {@link java.lang.Class} objects. 56 | */ 57 | Class[] value() default {}; 58 | } 59 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/RemoteHome.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.ElementType; 21 | 22 | import java.lang.annotation.Target; 23 | import java.lang.annotation.Retention; 24 | 25 | /** 26 | * Declares the remote home interface or adapted remote home interface for a session bean. The value is never a 2.x 27 | * remote component interface. 28 | *

29 | * Clients written to the enterprise bean 2.1 and earlier client view depend upon the existence of a home and component 30 | * interface. A session bean written to the enterprise bean 3.x API may be adapted to such earlier preexisting client 31 | * view interfaces. 32 | *

33 | * The session bean designates the home interface to be adapted by using the RemoteHome annotation on the 34 | * bean class. The corresponding remote component interface need not be explicitly specified, as it is derived from the 35 | * return type of remote home interface's create method signature. 36 | *

37 | * Session beans written to the EJB 3.0 and later APIs do not otherwise make use of remote home interfaces. 38 | * 39 | * @see Init 40 | * @see LocalHome 41 | * @since EJB 3.0 42 | */ 43 | @Target({ ElementType.TYPE }) 44 | @Retention(RetentionPolicy.RUNTIME) 45 | public @interface RemoteHome { 46 | 47 | /** 48 | * The remote home interface 49 | * 50 | * @return a {@link java.lang.Class} object. 51 | */ 52 | Class value(); 53 | } 54 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Remove.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.RetentionPolicy; 20 | import java.lang.annotation.ElementType; 21 | 22 | import java.lang.annotation.Target; 23 | import java.lang.annotation.Retention; 24 | 25 | /** 26 | * Applied to a business method of a stateful session bean class to indicate to the container that the stateful session 27 | * bean is to be removed by the container after completion of the method. 28 | * 29 | * @since EJB 3.0 30 | */ 31 | 32 | @Target({ ElementType.METHOD }) 33 | @Retention(RetentionPolicy.RUNTIME) 34 | public @interface Remove { 35 | 36 | /** 37 | * If true, the stateful session bean will not be removed if an exception is thrown from the designated method. 38 | * 39 | * @return a boolean. 40 | */ 41 | boolean retainIfException() default false; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/RemoveException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The RemoveException is thrown at an attempt to remove an enterprise bean object or local enterprise bean object when 21 | * the enterprise bean or the container does not allow the enterprise bean object to be removed. 22 | * 23 | * @since EJB 1.0 24 | */ 25 | public class RemoveException extends java.lang.Exception { 26 | 27 | private static final long serialVersionUID = -4581849053220157910L; 28 | 29 | /** 30 | * Constructs an RemoveException with no detail message. 31 | */ 32 | public RemoveException() { 33 | } 34 | 35 | /** 36 | * Constructs an RemoveException with the specified detail message. 37 | * 38 | * @param message a {@link java.lang.String} object. 39 | */ 40 | public RemoveException(String message) { 41 | super(message); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Schedules.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Applied to a timer callback method to schedule multiple calendar-based timers for the method. 26 | * 27 | * The method to which the Schedules annotation is applied must have one of the following signatures, where 28 | * <METHOD> designates the method name: 29 | * 30 | * 31 | *

32 |  * void <METHOD>()
33 |  * void <METHOD>(Timer timer)
34 |  * 
35 | * 36 | * @see Schedule 37 | * @since EJB 3.1 38 | */ 39 | @Target(METHOD) 40 | @Retention(RUNTIME) 41 | public @interface Schedules { 42 | 43 | /** 44 | * One or more calendar-based timer specifications. 45 | * 46 | * @return an array of {@link jakarta.ejb.Schedule} objects. 47 | */ 48 | Schedule[] value(); 49 | } 50 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Singleton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Component-defining annotation for a singleton session bean. 26 | * 27 | * @since EJB 3.1 28 | */ 29 | 30 | @Target(TYPE) 31 | @Retention(RUNTIME) 32 | public @interface Singleton { 33 | 34 | /** 35 | * The ejb-name for this bean. Defaults to the unqualified name of the singleton session bean class. 36 | * 37 | * @return a {@link java.lang.String} object. 38 | */ 39 | String name() default ""; 40 | 41 | /** 42 | * A product specific name(for example, global JNDI name) that this session bean should be mapped to. 43 | * 44 | * Application servers are not required to support any particular form or type of mapped name, nor the ability to use 45 | * mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is 46 | * portable. 47 | * 48 | * @return a {@link java.lang.String} object. 49 | */ 50 | String mappedName() default ""; 51 | 52 | /** 53 | * A string describing the singleton session bean. 54 | * 55 | * @return a {@link java.lang.String} object. 56 | */ 57 | String description() default ""; 58 | } 59 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Startup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Mark a singleton bean for eager initialization during the application startup sequence. 26 | * 27 | * @since EJB 3.1 28 | */ 29 | 30 | @Target(TYPE) 31 | @Retention(RUNTIME) 32 | public @interface Startup { 33 | } 34 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Stateful.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Component-defining annotation for a stateful session bean. 26 | * 27 | * @since EJB 3.0 28 | */ 29 | 30 | @Target(TYPE) 31 | @Retention(RUNTIME) 32 | public @interface Stateful { 33 | 34 | /** 35 | * The ejb-name for this bean. Defaults to the unqualified name of the stateful session bean class. 36 | * 37 | * @return a {@link java.lang.String} object. 38 | */ 39 | String name() default ""; 40 | 41 | /** 42 | * A product specific name(e.g. global JNDI name) that this session bean should be mapped to. 43 | * 44 | * Application servers are not required to support any particular form or type of mapped name, nor the ability to use 45 | * mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is 46 | * portable. 47 | * 48 | * @return a {@link java.lang.String} object. 49 | */ 50 | String mappedName() default ""; 51 | 52 | /** 53 | * A string describing the stateful session bean. 54 | * 55 | * @return a {@link java.lang.String} object. 56 | */ 57 | String description() default ""; 58 | 59 | /** 60 | * Specifies whether this stateful session bean is passivation capable 61 | * 62 | * @since EJB 3.2 63 | * @return a boolean. 64 | */ 65 | boolean passivationCapable() default true; 66 | 67 | } 68 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/StatefulTimeout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | import java.util.concurrent.TimeUnit; 25 | 26 | /** 27 | * Specifies the amount of time a stateful session bean can be idle (not receive any client invocations) before it is 28 | * eligible for removal by the container. 29 | *

30 | * 31 | * The semantics of the value element are as follows: 32 | *

37 | * Values less than -1 are not valid. 38 | * 39 | * @since EJB 3.1 40 | */ 41 | 42 | @Target(TYPE) 43 | @Retention(RUNTIME) 44 | public @interface StatefulTimeout { 45 | 46 | /** 47 | * The amount of time the stateful session bean can be idle. 48 | * 49 | * The semantics of this element are as follows: 50 | * 55 | * Values less than -1 are not valid. 56 | * 57 | * @return a long. 58 | */ 59 | long value(); 60 | 61 | /** 62 | * Units used for the specified value. 63 | * 64 | * @return a {@link java.util.concurrent.TimeUnit} object. 65 | */ 66 | TimeUnit unit() default TimeUnit.MINUTES; 67 | 68 | } 69 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Stateless.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /* 18 | * Stateless.java 19 | * 20 | * Created on January 11, 2005, 3:22 PM 21 | */ 22 | 23 | package jakarta.ejb; 24 | 25 | import java.lang.annotation.Target; 26 | import static java.lang.annotation.ElementType.*; 27 | import java.lang.annotation.Retention; 28 | import static java.lang.annotation.RetentionPolicy.*; 29 | 30 | /** 31 | * Component-defining annotation for a stateless session bean. 32 | * 33 | * @since EJB 3.0 34 | */ 35 | 36 | @Target(TYPE) 37 | @Retention(RUNTIME) 38 | public @interface Stateless { 39 | 40 | /** 41 | * The ejb-name for this bean. Defaults to the unqualified name of the stateless session bean class. 42 | * 43 | * @return a {@link java.lang.String} object. 44 | */ 45 | String name() default ""; 46 | 47 | /** 48 | * A product specific name(e.g. global JNDI name) that this session bean should be mapped to. 49 | * 50 | * Application servers are not required to support any particular form or type of mapped name, nor the ability to use 51 | * mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is 52 | * portable. 53 | * 54 | * @return a {@link java.lang.String} object. 55 | */ 56 | String mappedName() default ""; 57 | 58 | /** 59 | * A string describing the stateless session bean. 60 | * 61 | * @return a {@link java.lang.String} object. 62 | */ 63 | String description() default ""; 64 | } 65 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TimedObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The TimedObject interface contains a callback method that is used to deliver timer expiration 21 | * notifications. It can be implemented by a stateless session bean class, a singleton session bean class, a 22 | * message-driven bean class, or an enterprise bean 2.x entity bean class. 23 | *

24 | * If the bean implements the TimedObject interface, the Timeout annotation, if used, can only 25 | * be applied to the ejbTimeout method. 26 | * 27 | * @see Timeout 28 | * @since EJB 2.1 29 | */ 30 | public interface TimedObject { 31 | 32 | /** 33 | * Invoked by the enterprise bean container upon timer expiration. 34 | * 35 | * @param timer timer whose expiration caused this notification. 36 | */ 37 | public void ejbTimeout(Timer timer); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/Timeout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Designates a method on a stateless session bean class, a singleton session bean class, a message driven bean class, 26 | * or an enterprise bean 2.x entity bean class that should receive enterprise bean timer expirations for that bean. 27 | *

28 | * The method to which the Timeout annotation is applied must have one of the following signatures, where 29 | * <METHOD> designates the method name: 30 | * 31 | * 32 | *

33 |  * void <METHOD>()
34 |  * void <METHOD>(Timer timer)
35 |  * 
36 | * 37 | * A timeout callback method can have public, private, protected, or package level access. A timeout callback method 38 | * must not be declared as final or static. Timeout callback methods must not throw application exceptions. 39 | *

40 | * If the bean implements the TimedObject interface, the Timeout annotation can only be 41 | * applied to the ejbTimeout method. 42 | * 43 | * @since EJB 3.0 44 | */ 45 | 46 | @Target(METHOD) 47 | @Retention(RUNTIME) 48 | public @interface Timeout { 49 | } 50 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TimerConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.io.Serializable; 20 | 21 | /** 22 | *

23 | * TimerConfig is used to specify additional timer configuration settings during timer creation. 24 | *

25 | * 26 | *

27 | * The info object represents a serializable object made available to corresponding timer callbacks. It is 28 | * optional and defaults to null. 29 | *

30 | * 31 | *

32 | * The persistent property determines whether the corresponding timer has a lifetime that spans the JVM in 33 | * which it was created. It is optional and defaults to true. 34 | *

35 | * 36 | * @since EJB 3.1 37 | */ 38 | public class TimerConfig { 39 | 40 | /** 41 | *

Constructor for TimerConfig.

42 | */ 43 | public TimerConfig() { 44 | } 45 | 46 | /** 47 | *

Constructor for TimerConfig.

48 | * 49 | * @param info a {@link java.io.Serializable} object. 50 | * @param persistent a boolean. 51 | */ 52 | public TimerConfig(Serializable info, boolean persistent) { 53 | info_ = info; 54 | persistent_ = persistent; 55 | } 56 | 57 | /** 58 | * Set the info object made available to timer callbacks. 59 | * 60 | * @param i the info object 61 | */ 62 | public void setInfo(Serializable i) { 63 | info_ = i; 64 | } 65 | 66 | /** 67 | * Return the info object made available to timer callbacks. 68 | * 69 | * @return info object 70 | */ 71 | public Serializable getInfo() { 72 | return info_; 73 | } 74 | 75 | /** 76 | * Specify whether the timer is persistent. 77 | * 78 | * @param p boolean indicating whether the timer is to be persistent. 79 | */ 80 | public void setPersistent(boolean p) { 81 | persistent_ = p; 82 | } 83 | 84 | /** 85 | * Return whether the timer is persistent. 86 | * 87 | * @return boolean indicating whether the timer is persistent 88 | */ 89 | public boolean isPersistent() { 90 | return persistent_; 91 | } 92 | 93 | /** {@inheritDoc} */ 94 | @Override 95 | public String toString() { 96 | return "TimerConfig [persistent=" + persistent_ + ";info=" + info_ + "]"; 97 | } 98 | 99 | private Serializable info_ = null; 100 | 101 | private boolean persistent_ = true; 102 | 103 | } 104 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TimerHandle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.io.Serializable; 20 | 21 | /** 22 | * 23 | * The TimerHandle interface allows the bean provider to obtain a serializable timer handle that may be persisted. 24 | *

25 | * Since timers are local objects, a timer handle must not be passed through a bean's remote business interface, remote 26 | * interface or web service interface. 27 | * 28 | * @since EJB 2.1 29 | */ 30 | public interface TimerHandle extends Serializable { 31 | 32 | /** 33 | * Obtain a reference to the timer represented by this handle. 34 | * 35 | * @return a reference to the timer represented by this handle. 36 | * @exception java.lang.IllegalStateException If this method is invoked while the instance is in a state that does not 37 | * allow access to this method. 38 | * @throws jakarta.ejb.NoSuchObjectLocalException If invoked on a handle whose associated timer has expired or has been 39 | * cancelled. 40 | * @throws jakarta.ejb.EJBException If this method could not complete due to a system-level failure. 41 | */ 42 | public Timer getTimer() throws java.lang.IllegalStateException, 43 | jakarta.ejb.NoSuchObjectLocalException, jakarta.ejb.EJBException; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TransactionAttribute.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * The TransactionAttribute annotation specifies whether the container is to invoke a business method 26 | * within a transaction context. 27 | * 28 | * The TransactionAttribute annotation can be used for session beans and message driven beans. It can only 29 | * be specified if container managed transaction demarcation is used. 30 | *

31 | * 32 | * The annotation can be specified on the bean class and/or it can be specified on methods of the class that are methods 33 | * of the business interface or no-interface view. 34 | *

35 | * Specifying the TransactionAttribute annotation on the bean class means that it applies to all applicable 36 | * business methods of the class. Specifying the annotation on a method applies it to that method only. If the 37 | * annotation is applied at both the class and the method level, the method value overrides if the two disagree. 38 | * 39 | *

40 | * The values of the TransactionAttribute annotation are defined by the enum 41 | * TransactionAttributeType. If the TransactionAttribute annotation is not specified, and the 42 | * bean uses container managed transaction demarcation, the semantics of the REQUIRED transaction attribute 43 | * are assumed. 44 | * 45 | * @see TransactionAttributeType 46 | * @since EJB 3.0 47 | */ 48 | 49 | @Target({ METHOD, TYPE }) 50 | @Retention(RUNTIME) 51 | public @interface TransactionAttribute { 52 | /** 53 | *

value.

54 | * 55 | * @return a {@link jakarta.ejb.TransactionAttributeType} object. 56 | */ 57 | TransactionAttributeType value() default TransactionAttributeType.REQUIRED; 58 | } 59 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TransactionManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | import java.lang.annotation.Target; 20 | import static java.lang.annotation.ElementType.*; 21 | import java.lang.annotation.Retention; 22 | import static java.lang.annotation.RetentionPolicy.*; 23 | 24 | /** 25 | * Specifies whether a session bean or message driven bean has container managed transactions or bean managed 26 | * transactions. 27 | * 28 | * If this annotation is not used, the bean is assumed to have container-managed transaction management. 29 | * 30 | * @see TransactionManagementType 31 | * @since EJB 3.0 32 | */ 33 | @Target(TYPE) 34 | @Retention(RUNTIME) 35 | public @interface TransactionManagement { 36 | /** 37 | *

value.

38 | * 39 | * @return a {@link jakarta.ejb.TransactionManagementType} object. 40 | */ 41 | TransactionManagementType value() default TransactionManagementType.CONTAINER; 42 | } 43 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TransactionManagementType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * The enum TransactionManagementType is used with the TransactionManagement annotation to 21 | * specify whether container-managed or bean-managed transaction management is used. 22 | * 23 | * @see TransactionManagement 24 | * @since EJB 3.0 25 | */ 26 | public enum TransactionManagementType { 27 | 28 | /** 29 | * Container-managed transaction management is used. 30 | */ 31 | CONTAINER, 32 | 33 | /** 34 | * Bean-managed transaction management is used. 35 | */ 36 | BEAN 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TransactionRequiredLocalException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception is thrown to a local client to indicate that a request carried a null transaction context, but the 21 | * target object requires an active transaction. 22 | * 23 | * @since EJB 2.0 24 | */ 25 | public class TransactionRequiredLocalException extends EJBException { 26 | 27 | private static final long serialVersionUID = -3884174204131319153L; 28 | 29 | /** 30 | * Constructs a TransactionRequiredLocalException with no detail message. 31 | */ 32 | public TransactionRequiredLocalException() { 33 | } 34 | 35 | /** 36 | * Constructs an TransactionRequiredLocalException with the specified detailed message. 37 | * 38 | * @param message a {@link java.lang.String} object. 39 | */ 40 | public TransactionRequiredLocalException(String message) { 41 | super(message); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/TransactionRolledbackLocalException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb; 18 | 19 | /** 20 | * This exception is thrown to a local client to indicate that the transaction associated with processing of the request 21 | * has been rolled back, or marked to roll back. Thus the requested operation either could not be performed or was not 22 | * performed because further computation on behalf of the transaction would be fruitless. 23 | * 24 | * @since EJB 2.0 25 | */ 26 | public class TransactionRolledbackLocalException extends EJBException { 27 | 28 | private static final long serialVersionUID = 2897658132751784821L; 29 | 30 | /** 31 | * Constructs a TransactionRolledbackLocalException with no detail message. 32 | */ 33 | public TransactionRolledbackLocalException() { 34 | } 35 | 36 | /** 37 | * Constructs a TransactionRolledbackLocalException with the specified detailed message. 38 | * 39 | * @param message a {@link java.lang.String} object. 40 | */ 41 | public TransactionRolledbackLocalException(String message) { 42 | super(message); 43 | } 44 | 45 | /** 46 | * Constructs a TransactionRolledbackLocalException with the specified detail message and a nested exception. 47 | * 48 | * @param message a {@link java.lang.String} object. 49 | * @param ex a {@link java.lang.Exception} object. 50 | */ 51 | public TransactionRolledbackLocalException(String message, Exception ex) { 52 | super(message, ex); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/embeddable/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | 23 | 24 | 25 | Defines the classes for the enterprise bean Embeddable API. 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | 23 | 24 | 25 | Contains the Enterprise Bean classes 26 | and interfaces that define the contracts between the enterprise bean 27 | and its clients and between the enterprise bean and the enterprise bean container. 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/spi/EJBContainerProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.ejb.spi; 18 | 19 | import java.util.Map; 20 | import jakarta.ejb.embeddable.EJBContainer; 21 | import jakarta.ejb.EJBException; 22 | 23 | /** 24 | * The EJBContainerProvider SPI is used by the embeddable container bootstrap class to initialize a suitable embeddable 25 | * container. 26 | * 27 | * @since EJB 3.1 28 | */ 29 | public interface EJBContainerProvider { 30 | 31 | /** 32 | * Called by the embeddable container bootstrap process to find a suitable embeddable container implementation. An 33 | * embeddable container provider may deem itself as appropriate for the embeddable application if any of the following 34 | * are true : 35 | * 36 | * 42 | * 43 | * If a provider does not qualify as the provider for the embeddable application, it must return null. 44 | * 45 | * @param properties Spec-defined and/or vendor-specific properties, that were passed to 46 | * jakarta.ejb.embeddable.EJBContainer#createEJBContainer(Map<?,?>) call 47 | * @return EJBContainer instance or null 48 | * @throws EJBException if the container could not be successfully initialized. 49 | */ 50 | public EJBContainer createEJBContainer(Map properties) throws EJBException; 51 | 52 | } 53 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/ejb/spi/package.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | 23 | 24 | 25 | Defines interfaces that are implemented by 26 | the enterprise bean container. These interfaces are not used by application components. 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /api/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Contributors to the Eclipse Foundation 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | /** 17 | * Defines the modules for jakarta.ejb 18 | */ 19 | module jakarta.ejb { 20 | requires java.rmi; 21 | requires java.naming; 22 | requires transitive jakarta.transaction; 23 | 24 | exports jakarta.ejb; 25 | exports jakarta.ejb.embeddable; 26 | exports jakarta.ejb.spi; 27 | } -------------------------------------------------------------------------------- /assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | package 22 | 23 | zip 24 | 25 | enterprise-beans/${spec.version} 26 | 27 | 28 | target/staging 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /spec/README.md: -------------------------------------------------------------------------------- 1 | Jakarta Enterprise Beans Specification 2 | ============================ 3 | 4 | This project generates the Jakarta Enterprise Beans Specifications. 5 | 6 | Building 7 | -------- 8 | 9 | Prerequisites: 10 | 11 | * JDK8+ 12 | * Maven 3.0.3+ 13 | 14 | Run the full build: 15 | 16 | `mvn install` 17 | 18 | Locate the html files: 19 | - `target/generated-docs/enterprise-beans-spec-core-.html` 20 | - `target/generated-docs/enterprise-beans-spec-opt-.html` 21 | 22 | Locate the PDF files: 23 | - `target/generated-docs/enterprise-beans-spec-core-.pdf` 24 | - `target/generated-docs/enterprise-beans-spec-opt-.pdf` 25 | -------------------------------------------------------------------------------- /spec/assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | spec 22 | 23 | zip 24 | 25 | enterprise-beans-spec 26 | 27 | 28 | target/generated-docs 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/core/EBCore.adoc: -------------------------------------------------------------------------------- 1 | include::Introduction.adoc[] 2 | 3 | include::Overview.adoc[] 4 | 5 | include::ClientViewOfSessionBean.adoc[] 6 | 7 | include::SessionBeanComponentContract.adoc[] 8 | 9 | include::MessageDrivenBeanComponentContract.adoc[] 10 | 11 | include::Persistence.adoc[] 12 | 13 | include::Interceptors.adoc[] 14 | 15 | include::SupportForTransactions.adoc[] 16 | 17 | include::ExceptionHandling.adoc[] 18 | 19 | include::EnterpriseBeanEnvironment.adoc[] 20 | 21 | include::SecurityManagement.adoc[] 22 | 23 | include::TimerService.adoc[] 24 | 25 | include::DeploymentDescriptor.adoc[] 26 | 27 | include::Packaging.adoc[] 28 | 29 | include::RuntimeEnvironment.adoc[] 30 | 31 | include::CompatibilityAndMigration.adoc[] 32 | 33 | include::EmbeddableUsage.adoc[] 34 | 35 | include::ResponsibilitiesOfEJBRoles.adoc[] 36 | 37 | include::RelatedDocuments.adoc[] 38 | 39 | include::RevisionHistory.adoc[] 40 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/core/Persistence.adoc: -------------------------------------------------------------------------------- 1 | [[a2000]] 2 | == Persistence 3 | 4 | The model for persistence and 5 | object/relational mapping was considerably revised and enhanced in the 6 | Enterprise Beans 3.0 release. The contracts and requirements for 7 | persistent entities are defined by the "_Jakarta Persistence_" 8 | specification <>, which also contains 9 | the full specification of the Jakarta Persistence query language and the 10 | metadata for object/relational mapping. 11 | 12 | 13 | :opt-doc: ./enterprise-beans-spec-opt-{revnumber}.adoc 14 | 15 | The client view of entity beans under the 16 | earlier Enterprise Beans 2.1 programming model, the contracts for Enterprise Beans 2.1 Entity 17 | Beans with Container-Managed Persistence, the contracts for the Enterprise Beans QL 18 | query language, the contracts for Enterprise Beans 2.1 Entity Beans with Bean-Managed 19 | Persistence, and the contracts for Enterprise Beans 1.1 Entity Beans with 20 | Container-Managed Persistence are described in the Enterprise Beans Optional Features 21 | document <>. See 22 | <<{opt-doc}#a41, Chapter 3>>, 23 | <<{opt-doc}#a384, Chapter 4>>, 24 | <<{opt-doc}#a1840, Chapter 5>>, 25 | <<{opt-doc}#a2456, Chapter 6>> and 26 | <<{opt-doc}#a3071, Chapter 7>> respectively. 27 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/core/ResponsibilitiesOfEJBRoles.adoc: -------------------------------------------------------------------------------- 1 | [[a9826]] 2 | == Responsibilities of Enterprise Beans Roles 3 | 4 | This chapter provides the summary of the 5 | responsibilities of each Enterprise Beans Role. 6 | 7 | === Bean Provider’s Responsibilities 8 | 9 | This section 10 | highlights the requirements for the Bean Provider. Meeting these 11 | requirements is necessary to ensure that the enterprise beans developed 12 | by the Bean Provider can be deployed in all compliant Enterprise Beans containers. 13 | 14 | ==== API Requirements 15 | 16 | The enterprise beans must meet all the API 17 | requirements defined in the individual chapters of this document. 18 | 19 | ==== Packaging Requirements 20 | 21 | The Bean Provider is responsible for 22 | packaging the enterprise beans in an ejb-jar 23 | file or `.war` file in the format described in <>. 24 | 25 | The deployment descriptor, if present, must 26 | conform to the requirements of <>. 27 | 28 | === Application Assembler’s Responsibilities 29 | 30 | The requirements 31 | for the Application Assembler are in defined in <> and <>. 32 | 33 | [[a9838]] 34 | === Container Provider’s Responsibilities 35 | 36 | The Container 37 | Provider is responsible for providing the deployment tools used by the 38 | Deployer to deploy enterprise beans packaged in the ejb-jar file. The 39 | requirements for the deployment tools are defined in the individual 40 | chapters of this document. 41 | 42 | The Container Provider is responsible for 43 | implementing its part of the Enterprise Beans contracts and its part of the contracts 44 | described in _Jakarta Persistence_ specification 45 | <>, and for providing all the runtime 46 | services described in the individual chapters of this document. 47 | 48 | === Deployer’s Responsibilities 49 | 50 | The Deployer uses 51 | the deployment tools provided by the Container Provider to deploy 52 | ejb-jar files or `.war` files produced by the Bean Providers and 53 | Application Assemblers. 54 | 55 | The individual chapters of this document 56 | describe the responsibilities of the Deployer in more detail. 57 | 58 | === System Administrator’s Responsibilities 59 | 60 | The System 61 | Administrator is responsible for configuring the Enterprise Beans container and 62 | server, setting up security management, integrating resource managers 63 | with the Enterprise Beans container, and runtime monitoring of deployed enterprise 64 | beans applications. 65 | 66 | The individual chapters of this document 67 | describe the responsibilities of the System Administrator in more 68 | detail. 69 | 70 | === Client Programmer’s Responsibilities 71 | 72 | The Enterprise Beans client programmer writes applications 73 | that access enterprise beans via their business interfaces, via their 74 | no-interface view, via their web service client view, or via messages, 75 | or view their home and component interfaces. 76 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/core/RevisionHistory.adoc: -------------------------------------------------------------------------------- 1 | [appendix] 2 | [[a9892]] 3 | == Revision History 4 | 5 | This appendix lists the significant changes that have been made to this 6 | document during the development of the Enterprise Beans 4.0 7 | Specification. 8 | 9 | === Public Draft 10 | 11 | Document updates in preparation for Enterprise Beans 4.0: 12 | 13 | - Removed the methods relying on `java.security.Identity` <> 15 | 16 | - Removed the methods relying on Jakarta XML RPC <> 18 | 19 | - Removed the deprecated `EJBContext.getEnvironment()` method <> 21 | 22 | - Marked the Enterprise Beans 2.x API Group as "Optional" <> 24 | 25 | - `@Schedule` now a repeatable annotation <> 27 | 28 | Removed documents in preparation for Enterprise Beans 4.0: 29 | 30 | - "`Support for Distributed Interoperability`" 31 | 32 | === Final Release Candidate 33 | 34 | === Final Release -------------------------------------------------------------------------------- /spec/src/main/asciidoc/enterprise-beans-spec-core.adoc: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017, 2020 Contributors to the Eclipse Foundation 3 | // 4 | 5 | = Jakarta(R) Enterprise Beans, Core Features 6 | :authors: Jakarta Enterprise Beans Team, https://projects.eclipse.org/projects/ee4j.ejb 7 | :email: https://accounts.eclipse.org/mailing-list/ejb-dev 8 | :version-label!: 9 | :doctype: book 10 | :license: Eclipse Foundation Specification License v1.0 11 | :source-highlighter: coderay 12 | :toc: left 13 | :toclevels: 4 14 | :sectnumlevels: 4 15 | :sectanchors: 16 | ifdef::backend-pdf[] 17 | :pagenums: 18 | :numbered: 19 | :title-logo-image: image:jakarta_ee_logo_schooner_color_stacked_default.png[pdfwidth=4.25in,align=right] 20 | endif::[] 21 | 22 | // == License 23 | :sectnums!: 24 | include::license-efsl.adoc[] 25 | 26 | // == Scope 27 | :sectnums: 28 | include::core/EBCore.adoc[] 29 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/enterprise-beans-spec-opt.adoc: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017, 2020 Contributors to the Eclipse Foundation 3 | // 4 | 5 | = Jakarta(R) Enterprise Beans, Optional Features 6 | :authors: Jakarta Enterprise Beans Team, https://projects.eclipse.org/projects/ee4j.ejb 7 | :email: https://accounts.eclipse.org/mailing-list/ejb-dev 8 | :version-label!: 9 | :doctype: book 10 | :license: Eclipse Foundation Specification License v1.0 11 | :source-highlighter: coderay 12 | :toc: left 13 | :toclevels: 4 14 | :sectnumlevels: 4 15 | :sectanchors: 16 | ifdef::backend-pdf[] 17 | :pagenums: 18 | :numbered: 19 | :title-logo-image: image:jakarta_ee_logo_schooner_color_stacked_default.png[pdfwidth=4.25in,align=right] 20 | endif::[] 21 | 22 | // == License 23 | :sectnums!: 24 | include::license-efsl.adoc[] 25 | 26 | // == Scope 27 | :sectnums: 28 | include::opt/EBOpt.adoc[] 29 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-11.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | does not exist 5 | 6 | 7 | 8 | 9 | 1. AroundConstruct callbacks, if any 2. constructor 3. dependency injection, if any 4. PostConstruct callbacks, if any 10 | 11 | 12 | 13 | method-ready pool 14 | 15 | 16 | 17 | method 18 | 19 | 20 | 21 | timeout callback method 22 | 23 | 24 | 25 | PreDestroy callbacks, if any 26 | 27 | 28 | 29 | method() 30 | 31 | 32 | constructor 33 | 34 | 35 | action initiated by client 36 | 37 | 38 | action initiated by container 39 | 40 | 41 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-12.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | does not exist 5 | 6 | 7 | 8 | 9 | 1. AroundConstruct callbacks, if any 2. constructor 3. dependency injection, if any 4. PostConstruct callbacks, if any 10 | 11 | 12 | 13 | method ready 14 | 15 | 16 | 17 | method 18 | 19 | 20 | 21 | timeout callback method 22 | 23 | 24 | 25 | PreDestroy callbacks, if any 26 | 27 | 28 | 29 | method() 30 | 31 | 32 | constructor 33 | 34 | 35 | action initiated by client 36 | 37 | 38 | action initiated by container 39 | 40 | 41 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-13.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Container 6 | 7 | 8 | Client 9 | 10 | 11 | 12 | 13 | destination or endpoint 14 | 15 | 16 | Message-driven bean 17 | 18 | 19 | 20 | 21 | 22 | 23 | Message-driven bean instances 24 | 25 | 26 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-14.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | does not exist 5 | 6 | 7 | 8 | 1. AroundConstruct callbacks, if any 2. constructor 3. dependency injection, if any 4. PostConstruct callbacks, if any 9 | 10 | 11 | 12 | method-ready pool 13 | 14 | 15 | 16 | message listener method 17 | 18 | 19 | 20 | 21 | timeout callback method 22 | 23 | 24 | 25 | PreDestroy callbacks, if any 26 | 27 | 28 | 29 | message listener method 30 | 31 | 32 | constructor 33 | 34 | 35 | action resulting from client message arrival 36 | 37 | 38 | action initiated by container 39 | 40 | 41 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-15.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enterprise Bean Server 5 | 6 | 7 | 8 | Client 9 | 10 | 11 | 12 | 13 | X 14 | 15 | 16 | 17 | 18 | Y 19 | 20 | 21 | 22 | 23 | database A 24 | 25 | 26 | 27 | 28 | database B 29 | 30 | 31 | 32 | 33 | database C 34 | 35 | 36 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-16.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enterprise Bean Server 5 | 6 | 7 | 8 | Client 9 | 10 | 11 | 12 | 13 | X 14 | 15 | 16 | 17 | 18 | Y 19 | 20 | 21 | 22 | 23 | queue A 24 | 25 | 26 | 27 | 28 | database B 29 | 30 | 31 | 32 | 33 | database C 34 | 35 | 36 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-17.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enterprise Bean Server 5 | 6 | 7 | 8 | Client 9 | 10 | 11 | 12 | 13 | queue A 14 | 15 | 16 | 17 | 18 | X 19 | 20 | 21 | 22 | 23 | database B 24 | 25 | 26 | 27 | 28 | database C 29 | 30 | 31 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-18.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Client 5 | 6 | 7 | 8 | Enterprise Bean Server 9 | 10 | 11 | 12 | 13 | X 14 | 15 | 16 | 17 | 18 | database A 19 | 20 | 21 | 22 | Enterprise Bean Server 23 | 24 | 25 | 26 | 27 | Y 28 | 29 | 30 | 31 | 32 | database B 33 | 34 | 35 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-19.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Client 4 | 5 | 6 | 7 | begin 8 | 9 | 10 | commit 11 | 12 | 13 | Enterprise Bean Server 14 | 15 | 16 | 17 | 18 | 19 | X 20 | 21 | 22 | 23 | 24 | database A 25 | 26 | 27 | Enterprise Bean Server 28 | 29 | 30 | 31 | 32 | 33 | Y 34 | 35 | 36 | 37 | 38 | database B 39 | 40 | 41 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-20.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Client 5 | 6 | 7 | Enterprise Bean Server 8 | 9 | 10 | 11 | begin 12 | 13 | 14 | 15 | commit 16 | 17 | 18 | 19 | X 20 | 21 | 22 | 23 | 24 | database A 25 | 26 | 27 | 28 | 29 | Y 30 | 31 | 32 | 33 | 34 | database B 35 | 36 | 37 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-21.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Program A 5 | 6 | 7 | 8 | TX 1 9 | 10 | 11 | 12 | Program B 13 | 14 | 15 | 16 | TX 1 17 | 18 | 19 | 20 | Program C 21 | 22 | 23 | Enterprise Bean Container 24 | 25 | 26 | 27 | 28 | Entity object 29 | 30 | 31 | 32 | TX 1 33 | 34 | 35 | 36 | TX 1 37 | 38 | 39 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-22.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Enterprise Bean Container 4 | 5 | 6 | 7 | 8 | Program A 9 | 10 | 11 | 12 | TX 1 13 | 14 | 15 | 16 | Session instance 1 17 | 18 | 19 | 20 | read and cache Account 100 21 | 22 | 23 | 24 | TX 1 25 | 26 | 27 | 28 | Session instance 2 29 | 30 | 31 | 32 | read and cache Account 100 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-23.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | client address space (i.e. JVM) 4 | 5 | 6 | 7 | container address space (i.e. JVM) 8 | 9 | 10 | 11 | 12 | container 13 | 14 | 15 | remote client 16 | 17 | 18 | 19 | 20 | EJB home stub 21 | 22 | 23 | 24 | 25 | EJB object stub 26 | 27 | 28 | 29 | 30 | EJB home object 31 | 32 | 33 | 34 | 35 | EJB object 36 | 37 | 38 | 39 | 40 | enterprise bean 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-24.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Jakarta Server Pages/Servlet client 5 | 6 | 7 | vendor 1 8 | 9 | 10 | 11 | Application client 12 | 13 | 14 | vendor 2 15 | 16 | 17 | 18 | CORBA client 19 | 20 | 21 | vendor 3 22 | 23 | 24 | 25 | Enterprise Beans 26 | 27 | 28 | 29 | Enterprise Beans Server 30 | 31 | 32 | vendor 4 33 | 34 | 35 | 36 | Enterprise Beans 37 | 38 | 39 | 40 | Enterprise Beans Server 41 | 42 | 43 | vendor 5 44 | 45 | 46 | 47 | IIOP 48 | 49 | 50 | 51 | IIOP 52 | 53 | 54 | 55 | IIOP 56 | 57 | 58 | 59 | IIOP 60 | 61 | 62 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-26.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | C 5 | 6 | 7 | application client orweb client(initiating client) 8 | 9 | 10 | 11 | 12 | S1 13 | 14 | 15 | Enterprise Beans orweb container(intermediate) 16 | 17 | 18 | 19 | 20 | S2 21 | 22 | 23 | Enterprise Beanscontainer (target) 24 | 25 | 26 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-27.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | C 5 | 6 | 7 | application client or web client 8 | 9 | 10 | 11 | HTTP(S) 12 | 13 | 14 | IIOP/SSL 15 | 16 | 17 | 18 | S1 19 | 20 | 21 | Enterprise Beans or web container 22 | 23 | 24 | 25 | IIOP/SSL 26 | 27 | 28 | 29 | S2 30 | 31 | 32 | Enterprise Beans container 33 | 34 | 35 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-6.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | container 6 | 7 | 8 | client 9 | 10 | 11 | 12 | 13 | Cart 14 | 15 | 16 | 17 | 18 | CartBean 19 | 20 | 21 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-7.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Client 6 | 7 | 8 | 9 | 10 | Service class 11 | 12 | 13 | 14 | 15 | Web service endpoint 16 | 17 | 18 | Container 19 | 20 | 21 | Stateless session bean 22 | 23 | 24 | 25 | 26 | 27 | 28 | Stateless session bean instances 29 | 30 | 31 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBCore-9.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | container 4 | 5 | 6 | 7 | 8 | client 9 | 10 | 11 | 12 | 13 | Cart 14 | 15 | 16 | 17 | 18 | CartBean 19 | 20 | 21 | 22 | 23 | CartHome 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-10.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | After Change: 4 | 5 | 6 | 7 | a1 8 | 9 | 10 | 11 | 12 | b1 13 | 14 | 15 | 16 | a2 17 | 18 | 19 | 20 | b2 21 | 22 | 23 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-11.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | A and B are in a one-to-one unidirectional relationship: 4 | 5 | 6 | 7 | A 8 | 9 | 10 | 11 | 0..1 12 | 13 | 14 | 0..1 15 | 16 | 17 | 18 | B 19 | 20 | 21 | Before Change: 22 | 23 | 24 | 25 | a1 26 | 27 | 28 | 29 | 30 | b1 31 | 32 | 33 | 34 | a2 35 | 36 | 37 | 38 | 39 | b2 40 | 41 | 42 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-12.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | After Change: 4 | 5 | 6 | 7 | a1 8 | 9 | 10 | 11 | 12 | b1 13 | 14 | 15 | 16 | a2 17 | 18 | 19 | 20 | b2 21 | 22 | 23 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-32.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <abstract> OrderBean 5 | 6 | 7 | 8 | getOrderStatus setOrderStatus getLineStatus setLineStatus getCreditApproved setCreditApproved getCustomer setCustomer ... 9 | 10 | 11 | 12 | * 13 | 14 | 15 | Order-Customer 16 | 17 | 18 | 1 19 | 20 | 21 | 22 | Customer 23 | 24 | 25 | 26 | 27 | 1 28 | 29 | 30 | Order-LineItem 31 | 32 | 33 | * 34 | 35 | 36 | 37 | LineItem 38 | 39 | 40 | 41 | * 42 | 43 | 44 | Product-LineItem 45 | 46 | 47 | 1 48 | 49 | 50 | 51 | Product 52 | 53 | 54 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-35.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Container 5 | 6 | 7 | 8 | 9 | enterprise bean instances 10 | 11 | 12 | 13 | Client 1 14 | 15 | 16 | 17 | TX 1 18 | 19 | 20 | 21 | Client 2 22 | 23 | 24 | 25 | TX 2 26 | 27 | 28 | 29 | Entity object Account 100 30 | 31 | 32 | 33 | 34 | Account 100 in TX 1 35 | 36 | 37 | 38 | 39 | 40 | Account 100 in TX 2 41 | 42 | 43 | 44 | 45 | 46 | Account 100 47 | 48 | 49 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-36.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Container 4 | 5 | 6 | 7 | enterprise bean instances 8 | 9 | 10 | 11 | Client 1 12 | 13 | 14 | 15 | TX 1 16 | 17 | 18 | 19 | Client 2 20 | 21 | 22 | 23 | TX 2 24 | 25 | 26 | 27 | Entity object Account 100 28 | 29 | 30 | 31 | 32 | Account 100 in TX 1 33 | 34 | 35 | container blocks Client 2 until Client 1 finishes 36 | 37 | 38 | 39 | 40 | 41 | Account 100 42 | 43 | 44 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-37.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Order 5 | 6 | 7 | 8 | m 9 | 10 | 11 | 1 12 | 13 | 14 | 15 | ShippingAddress 16 | 17 | 18 | 19 | m 20 | 21 | 22 | 1 23 | 24 | 25 | 26 | BillingAddress 27 | 28 | 29 | 30 | 1 31 | 32 | 33 | m 34 | 35 | 36 | 37 | LineItem 38 | 39 | 40 | 41 | m 42 | 43 | 44 | 1 45 | 46 | 47 | 48 | Product 49 | 50 | 51 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-41.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Container 5 | 6 | 7 | 8 | 9 | enterprise bean instances 10 | 11 | 12 | 13 | Client 1 14 | 15 | 16 | 17 | TX 1 18 | 19 | 20 | 21 | Client 2 22 | 23 | 24 | 25 | TX 2 26 | 27 | 28 | 29 | Entity object Account 100 30 | 31 | 32 | 33 | 34 | Account 100 in TX 1 35 | 36 | 37 | 38 | 39 | 40 | Account 100 in TX 2 41 | 42 | 43 | 44 | 45 | 46 | Account 100 47 | 48 | 49 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-42.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Container 4 | 5 | 6 | 7 | enterprise bean instances 8 | 9 | 10 | 11 | Client 1 12 | 13 | 14 | 15 | TX 1 16 | 17 | 18 | 19 | Client 2 20 | 21 | 22 | 23 | TX 2 24 | 25 | 26 | 27 | Entity object Account 100 28 | 29 | 30 | 31 | 32 | Account 100 in TX 1 33 | 34 | 35 | container blocks Client 2 until Client 1 finishes 36 | 37 | 38 | 39 | 40 | 41 | Account 100 42 | 43 | 44 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/EBOpt-9.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | A and B are in a one-to-one bidirectional relationship: 4 | 5 | 6 | 7 | A 8 | 9 | 10 | 11 | 0..1 12 | 13 | 14 | 0..1 15 | 16 | 17 | 18 | B 19 | 20 | 21 | Before Change: 22 | 23 | 24 | 25 | a1 26 | 27 | 28 | 29 | 30 | b1 31 | 32 | 33 | 34 | a2 35 | 36 | 37 | 38 | 39 | b2 40 | 41 | 42 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/jakarta_ee_logo_schooner_color_stacked_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/enterprise-beans/c18a21efba2a2763efef1efebd3959848a898abf/spec/src/main/asciidoc/images/jakarta_ee_logo_schooner_color_stacked_default.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/license-efsl.adoc: -------------------------------------------------------------------------------- 1 | [subs="normal"] 2 | .... 3 | Specification: {doctitle} 4 | 5 | Version: {revnumber} 6 | 7 | Status: {revremark} 8 | 9 | Release: {revdate} 10 | .... 11 | 12 | == Copyright 13 | 14 | Copyright (C) 2018, 2020 Eclipse Foundation. 15 | https://www.eclipse.org/legal/efsl.php[] 16 | 17 | === Eclipse Foundation Specification License 18 | 19 | By using and/or copying this document, or the Eclipse Foundation 20 | document from which this statement is linked, you (the licensee) agree 21 | that you have read, understood, and will comply with the following 22 | terms and conditions: 23 | 24 | Permission to copy, and distribute the contents of this document, or 25 | the Eclipse Foundation document from which this statement is linked, in 26 | any medium for any purpose and without fee or royalty is hereby 27 | granted, provided that you include the following on ALL copies of the 28 | document, or portions thereof, that you use: 29 | 30 | * link or URL to the original Eclipse Foundation document. 31 | * All existing copyright notices, or if one does not exist, a notice 32 | (hypertext is preferred, but a textual representation is permitted) 33 | of the form: "Copyright (C) [$date-of-document] 34 | Eclipse Foundation, Inc. \<>" 35 | 36 | Inclusion of the full text of this NOTICE must be provided. We 37 | request that authorship attribution be provided in any software, 38 | documents, or other items or products that you create pursuant to the 39 | implementation of the contents of this document, or any portion 40 | thereof. 41 | 42 | No right to create modifications or derivatives of Eclipse Foundation 43 | documents is granted pursuant to this license, except anyone may 44 | prepare and distribute derivative works and portions of this document 45 | in software that implements the specification, in supporting materials 46 | accompanying such software, and in documentation of such software, 47 | PROVIDED that all such works include the notice below. HOWEVER, the 48 | publication of derivative works of this document for use as a technical 49 | specification is expressly prohibited. 50 | 51 | The notice is: 52 | 53 | "Copyright (C) [$date-of-document] Eclipse Foundation. This software or 54 | document includes material copied from or derived from [title and URI 55 | of the Eclipse Foundation specification document]." 56 | 57 | ==== Disclaimers 58 | 59 | THIS DOCUMENT IS PROVIDED "AS IS," AND THE COPYRIGHT 60 | HOLDERS AND THE ECLIPSE FOUNDATION MAKE NO REPRESENTATIONS OR 61 | WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 62 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 63 | NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE 64 | SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS 65 | WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 66 | OTHER RIGHTS. 67 | 68 | THE COPYRIGHT HOLDERS AND THE ECLIPSE FOUNDATION WILL NOT BE LIABLE 69 | FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT 70 | OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE 71 | CONTENTS THEREOF. 72 | 73 | The name and trademarks of the copyright holders or the Eclipse 74 | Foundation may NOT be used in advertising or publicity pertaining to 75 | this document or its contents without specific, written prior 76 | permission. Title to copyright in this document will at all times 77 | remain with copyright holders. 78 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/opt/EBOpt.adoc: -------------------------------------------------------------------------------- 1 | include::Introduction.adoc[] 2 | 3 | include::Overview.adoc[] 4 | 5 | include::ClientViewOfEntityBean.adoc[] 6 | 7 | include::EJB2.1EntityBeanComponentContractForContainerManagedPersistence.adoc[] 8 | 9 | include::EJBQL-EJB2.1QueryLanguageForContainerManagedPersistenceQueryMethods.adoc[] 10 | 11 | include::EJB2.1EntityBeanComponentContractForBeanManagedPersistence.adoc[] 12 | 13 | include::EJB1.1EntityBeanComponentContractForContainerManagedPersistence.adoc[] 14 | 15 | include::SupportForTransactions.adoc[] 16 | 17 | include::ExceptionHandling.adoc[] 18 | 19 | include::TimerService.adoc[] 20 | 21 | include::DeploymentDescriptor.adoc[] 22 | 23 | include::PackagingRestrictions.adoc[] 24 | 25 | include::RelatedDocuments.adoc[] 26 | 27 | include::RevisionHistory.adoc[] 28 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/opt/Introduction.adoc: -------------------------------------------------------------------------------- 1 | == Introduction 2 | 3 | This document describes features for which support has been made optional as of the 3.2 release of the Enterprise Beans specification: 4 | 5 | * _Enterprise Beans 2.1 Entity Bean Component Contract for Container-Managed Persistence_ 6 | * _Enterprise Beans 2.1 Entity Bean Component Contract for Bean-Managed Persistence_ 7 | * _Enterprise Beans 1.1 Entity Bean Component Contract for Container-Managed Persistence_ 8 | * _Client View of an Entity Bean_ 9 | * _Enterprise Beans QL: Query Language for Container-Managed Persistence Query Methods_ 10 | 11 | === Acknowledgements 12 | 13 | The Enterprise Beans 3.2 specification work was conducted as part of JSR-345 under the Java Community Process Program. 14 | This specification is the result of the collaborative work of the members of the EJB 3.2 Expert Group: Caucho Technology, Inc: Reza Rahman; IBM: Jeremy Bauer; Oracle: Marina Vatkina, Linda DeMichiel; OW2: Florent Benoit; Pramati Technologies: Ravikiran Noothi; RedHat: Pete Muir, Carlo de Wolf; TmaxSoft, Inc.: Miju Byon; individual members: Adam Bien; David Blevins; Antonio Goncalves; Stefan Heldt; Richard Hightower, Jean-Louis Monteiro. 15 | 16 | === Organization of the Specification Documents 17 | 18 | This specification is organized into the following documents: 19 | 20 | * Enterprise Beans Core Contracts and Requirements 21 | * Enterprise Beans Optional Features 22 | 23 | The Enterprise Beans Core Contracts and Requirements document defines the contracts and requirements for the use and implementation of Enterprise Beans. 24 | These contracts include those for the Enterprise Beans 3.2 API, as well as for the earlier Enterprise Beans API that is required to be supported in this release. 25 | 26 | This Enterprise Beans Optional Features document defines the contracts and requirements for the use and implementation of features support for which has been made optional for the Enterprise Beans. 27 | These contracts are separated from the core contracts requirements in the Enterprise Beans 3.1 specification <>. 28 | 29 | === Document Conventions 30 | 31 | The regular font is used for information that is prescriptive by the Enterprise Beans specification. 32 | 33 | _The italic font is used for paragraphs that contain descriptive information, such as notes describing typical use, or notes clarifying the text with prescriptive specification._ 34 | 35 | `The monospace font is used for code examples.` 36 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/opt/Overview.adoc: -------------------------------------------------------------------------------- 1 | == Overview 2 | 3 | This document describes features for which support has been made optional as of the 3.2 release of the Enterprise Beans specification: 4 | 5 | * _Enterprise Beans 2.1 Entity Bean Component Contract for Container-Managed Persistence_ 6 | * _Enterprise Beans 2.1 Entity Bean Component Contract for Bean-Managed Persistence_ 7 | * _Enterprise Beans 1.1 Entity Bean Component Contract for Container-Managed Persistence_ 8 | * _Client View of an Entity Bean_ 9 | * _Enterprise Beans QL: Query Language for Container-Managed Persistence Query Methods_ 10 | 11 | If an implementation supports such features, it must do so in accordance with the requirements of this specification. 12 | In addition, the following rules apply: 13 | 14 | * If any of the following features is supported, all features in the list must be supported: 15 | ** Enterprise Beans 2.x entity beans with container-managed persistence 16 | ** Enterprise Beans 1.1 entity beans with container-managed persistence 17 | ** Enterprise Beans 2.x entity beans with bean-managed persistence 18 | ** Enterprise Beans QL 19 | 20 | See the general description of the Enterprise Beans goals and requirements in the Enterprise Beans Core Contracts and Requirements <> document. 21 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/opt/PackagingRestrictions.adoc: -------------------------------------------------------------------------------- 1 | == Packaging Restrictions 2 | 3 | === Restrictions 4 | 5 | * Entity Beans are not supported within `.war` files. 6 | These component types must only be packaged in a stand-alone ejb-jar file or an ejb-jar file packaged within an `.ear` file. 7 | 8 | * Entity Beans are not supported with the Enterprise Beans 3.2 Lite API (see Enterprise Beans Core Contracts and Requirements document <>, Subsection "`__Enterprise Beans 3.2 Lite__`"). 9 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/opt/RelatedDocuments.adoc: -------------------------------------------------------------------------------- 1 | [[a3321]] 2 | [bibliography] 3 | == Related Documents 4 | 5 | - [[[a3323, 1]]] Enterprise JavaBeans(TM), version 3.1. 6 | https://jcp.org/en/jsr/detail?id=318. 7 | 8 | - [[[a3339, 2]]] Jakarta Enterprise Beans, Core Features 4.0 9 | https://jakarta.ee/specifications/enterprise-beans/4.0/. 10 | 11 | - [[[a3327, 3]]] Java Remote Method Invocation (RMI). 12 | https://docs.oracle.com/javase/8/docs/technotes/guides/rmi/. 13 | 14 | - [[[a3334, 4]]] The Java Virtual Machine Specification. 15 | https://docs.oracle.com/javase/specs/jvms/se8/html/index.html. 16 | 17 | - [[[a3325, 5]]] Jakarta Persistence 3.0. 18 | https://jakarta.ee/specifications/persistence/3.0/. 19 | 20 | - [[[a3335, 6]]] JDBC(TM) 4.3 API (JDBC specification). 21 | https://jcp.org/en/jsr/detail?id=221. 22 | 23 | - [[[a3331, 7]]] Database Language SQL. 24 | ANSI X3.135-1992 or ISO/IEC 9075:1992. 25 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/opt/RevisionHistory.adoc: -------------------------------------------------------------------------------- 1 | == Revision History 2 | 3 | This appendix lists the significant changes 4 | that have been made to this document during the development of this 5 | Specification. 6 | 7 | === Early Draft 8 | 9 | 10 | 11 | Created document from the EJB 3.2 Draft. 12 | 13 | === Early Draft 2 14 | 15 | 16 | 17 | Updated the expert group list. 18 | 19 | === Public Draft 20 | 21 | 22 | 23 | Removed Interceptors specification from the 24 | list of the EJB 3.2 set of documents 25 | 26 | Minor editorial changes 27 | 28 | Updated related documents to their latest 29 | versions where applicable 30 | 31 | Replaced section number with the section 32 | title when referencing EJB Core Contracts and Requirements document. 33 | 34 | Removed text from 35 | link:Ejb.html#a3185[See Support for Transactions] that is 36 | exactly the same as in the EJB Core Contracts and Requirements document. 37 | Added references to the corresponding sections with the complete rules. 38 | 39 | Removed text from 40 | link:Ejb.html#a3210[See Exception Handling] that is exactly the 41 | same as in the EJB Core Contracts and Requirements document. Added 42 | references to the corresponding sections with the complete rules. 43 | 44 | Removed most of the text from 45 | link:Ejb.html#a3253[See Support for Distributed 46 | Interoperability] as it was an unnecessary duplication of the 47 | corresponding chapter in the EJB Core Contracts and Requirements 48 | document. Left only section “Mapping Objects Returned by Entity Bean 49 | Finder Methods to IDL” 50 | 51 | Removed chapters “Enterprise Bean 52 | Environment” and “Security Management” as it was an unnecessary 53 | duplication of the corresponding chapters in the EJB Core Contracts and 54 | Requirements document. 55 | 56 | === Proposed Final Draft 57 | 58 | 59 | 60 | Minor editorial changes 61 | 62 | Updated to the final versions of the related 63 | documents 64 | 65 | Changed the rule for optional feature support 66 | for CMP/BMP beans and EJBQL to be that if any of the features is 67 | supported, all these features must be supported 68 | 69 | === Final Release Candidate 70 | 71 | 72 | 73 | Editorial changes 74 | 75 | {empty}Rearranged sections in the 76 | link:Ejb.html#a3139[See Support for JAX-RPC Web Service 77 | Endpoints] 78 | 79 | === Final Release 80 | 81 | 82 | 83 | Minor editorial changes 84 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/opt/TimerService.adoc: -------------------------------------------------------------------------------- 1 | [[a3258]] 2 | == Timer Service 3 | 4 | This chapter defines limitations of the Enterprise Beans container-managed timer service when used with Enterprise Beans 2.1 entity beans. 5 | 6 | === Bean Provider’s View of the Timer Service 7 | 8 | Timers can be created for Enterprise Beans 2.1 entity beans. 9 | A timer that is created for the Enterprise Beans 2.1 entity bean is associated with the entity bean’s identity. 10 | 11 | Use of the Enterprise Beans Timer Service is not supported for an Enterprise Beans 1.1 entity bean with container-managed persistence. 12 | 13 | ==== Calendar-Based Time Expressions 14 | 15 | Calendar based timers are not supported for entity beans. 16 | 17 | ==== Non-persistent Timers 18 | 19 | Non-persistent timers are not supported for entity beans. 20 | 21 | ==== The TimerService Interface 22 | 23 | For an Enterprise Beans 2.1 entity bean, the result of `getTimers` is a collection of those timers that are associated with the bean’s identity. 24 | 25 | ==== Timer Expiration and Timeout Callback Method 26 | 27 | If a timer for an Enterprise Beans 2.1 entity bean expires, and the bean has been passivated, the container must call the `ejbActivate` and `ejbLoad` methods on the entity bean class before calling the timeout callback method, as described in <> and <>. 28 | 29 | ==== Entity Bean Removal 30 | 31 | If an entity bean is removed, the container must remove the timers for that bean. 32 | --------------------------------------------------------------------------------