├── .github
└── dependabot.yml
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE.md
├── NOTICE.md
├── README.md
├── api
├── pom.xml
└── src
│ └── main
│ ├── java
│ ├── jakarta
│ │ └── resource
│ │ │ ├── AdministeredObjectDefinition.java
│ │ │ ├── AdministeredObjectDefinitions.java
│ │ │ ├── ConnectionFactoryDefinition.java
│ │ │ ├── ConnectionFactoryDefinitions.java
│ │ │ ├── NotSupportedException.java
│ │ │ ├── Referenceable.java
│ │ │ ├── ResourceException.java
│ │ │ ├── cci
│ │ │ ├── Connection.java
│ │ │ ├── ConnectionFactory.java
│ │ │ ├── ConnectionMetaData.java
│ │ │ ├── ConnectionSpec.java
│ │ │ ├── IndexedRecord.java
│ │ │ ├── Interaction.java
│ │ │ ├── InteractionSpec.java
│ │ │ ├── LocalTransaction.java
│ │ │ ├── MappedRecord.java
│ │ │ ├── MessageListener.java
│ │ │ ├── Record.java
│ │ │ ├── RecordFactory.java
│ │ │ ├── ResourceAdapterMetaData.java
│ │ │ ├── ResourceWarning.java
│ │ │ ├── ResultSet.java
│ │ │ ├── ResultSetInfo.java
│ │ │ ├── Streamable.java
│ │ │ └── package-info.java
│ │ │ ├── package-info.java
│ │ │ └── spi
│ │ │ ├── Activation.java
│ │ │ ├── ActivationSpec.java
│ │ │ ├── AdministeredObject.java
│ │ │ ├── ApplicationServerInternalException.java
│ │ │ ├── AuthenticationMechanism.java
│ │ │ ├── BootstrapContext.java
│ │ │ ├── CommException.java
│ │ │ ├── ConfigProperty.java
│ │ │ ├── ConnectionDefinition.java
│ │ │ ├── ConnectionDefinitions.java
│ │ │ ├── ConnectionEvent.java
│ │ │ ├── ConnectionEventListener.java
│ │ │ ├── ConnectionManager.java
│ │ │ ├── ConnectionRequestInfo.java
│ │ │ ├── Connector.java
│ │ │ ├── DissociatableManagedConnection.java
│ │ │ ├── EISSystemException.java
│ │ │ ├── IllegalStateException.java
│ │ │ ├── InvalidPropertyException.java
│ │ │ ├── LazyAssociatableConnectionManager.java
│ │ │ ├── LazyEnlistableConnectionManager.java
│ │ │ ├── LazyEnlistableManagedConnection.java
│ │ │ ├── LocalTransaction.java
│ │ │ ├── LocalTransactionException.java
│ │ │ ├── ManagedConnection.java
│ │ │ ├── ManagedConnectionFactory.java
│ │ │ ├── ManagedConnectionMetaData.java
│ │ │ ├── ResourceAdapter.java
│ │ │ ├── ResourceAdapterAssociation.java
│ │ │ ├── ResourceAdapterInternalException.java
│ │ │ ├── ResourceAllocationException.java
│ │ │ ├── RetryableException.java
│ │ │ ├── RetryableUnavailableException.java
│ │ │ ├── SecurityException.java
│ │ │ ├── SecurityPermission.java
│ │ │ ├── SharingViolationException.java
│ │ │ ├── TransactionSupport.java
│ │ │ ├── UnavailableException.java
│ │ │ ├── ValidatingManagedConnectionFactory.java
│ │ │ ├── XATerminator.java
│ │ │ ├── endpoint
│ │ │ ├── MessageEndpoint.java
│ │ │ ├── MessageEndpointFactory.java
│ │ │ └── package-info.java
│ │ │ ├── package-info.java
│ │ │ ├── security
│ │ │ ├── GenericCredential.java
│ │ │ ├── PasswordCredential.java
│ │ │ └── package-info.java
│ │ │ └── work
│ │ │ ├── DistributableWork.java
│ │ │ ├── DistributableWorkManager.java
│ │ │ ├── ExecutionContext.java
│ │ │ ├── HintsContext.java
│ │ │ ├── RetryableWorkRejectedException.java
│ │ │ ├── SecurityContext.java
│ │ │ ├── TransactionContext.java
│ │ │ ├── Work.java
│ │ │ ├── WorkAdapter.java
│ │ │ ├── WorkCompletedException.java
│ │ │ ├── WorkContext.java
│ │ │ ├── WorkContextErrorCodes.java
│ │ │ ├── WorkContextLifecycleListener.java
│ │ │ ├── WorkContextProvider.java
│ │ │ ├── WorkEvent.java
│ │ │ ├── WorkException.java
│ │ │ ├── WorkListener.java
│ │ │ ├── WorkManager.java
│ │ │ ├── WorkRejectedException.java
│ │ │ └── package-info.java
│ └── module-info.java
│ └── javadoc
│ └── doc-files
│ └── speclicense.html
├── pom.xml
└── spec
├── LICENSE
├── README.md
├── assembly.xml
├── pom.xml
└── src
├── main
└── asciidoc
│ ├── Connectors.adoc
│ ├── images
│ ├── conn-10.png
│ ├── conn-100.png
│ ├── conn-101.svg
│ ├── conn-102.svg
│ ├── conn-103.svg
│ ├── conn-104.svg
│ ├── conn-105.svg
│ ├── conn-106.svg
│ ├── conn-107.svg
│ ├── conn-108.svg
│ ├── conn-109.svg
│ ├── conn-11.png
│ ├── conn-110.svg
│ ├── conn-111.png
│ ├── conn-112.png
│ ├── conn-113.png
│ ├── conn-114.svg
│ ├── conn-115.png
│ ├── conn-116.png
│ ├── conn-117.png
│ ├── conn-118.svg
│ ├── conn-119.svg
│ ├── conn-12.png
│ ├── conn-120.svg
│ ├── conn-121.svg
│ ├── conn-122.svg
│ ├── conn-123.png
│ ├── conn-124.png
│ ├── conn-125.png
│ ├── conn-126.svg
│ ├── conn-127.svg
│ ├── conn-128.svg
│ ├── conn-129.svg
│ ├── conn-13.png
│ ├── conn-130.svg
│ ├── conn-131.svg
│ ├── conn-132.svg
│ ├── conn-133.png
│ ├── conn-134.png
│ ├── conn-135.png
│ ├── conn-136.svg
│ ├── conn-137.svg
│ ├── conn-138.png
│ ├── conn-139.svg
│ ├── conn-14.png
│ ├── conn-140.svg
│ ├── conn-141.svg
│ ├── conn-142.svg
│ ├── conn-143.svg
│ ├── conn-144.svg
│ ├── conn-145.png
│ ├── conn-146.png
│ ├── conn-147.png
│ ├── conn-148.png
│ ├── conn-149.png
│ ├── conn-15.svg
│ ├── conn-150.png
│ ├── conn-151.png
│ ├── conn-152.png
│ ├── conn-153.png
│ ├── conn-154.svg
│ ├── conn-155.svg
│ ├── conn-156.png
│ ├── conn-157.svg
│ ├── conn-158.png
│ ├── conn-159.png
│ ├── conn-16.png
│ ├── conn-160.png
│ ├── conn-161.png
│ ├── conn-162.png
│ ├── conn-163.png
│ ├── conn-164.png
│ ├── conn-165.png
│ ├── conn-166.png
│ ├── conn-167.png
│ ├── conn-168.png
│ ├── conn-169.png
│ ├── conn-17.png
│ ├── conn-170.png
│ ├── conn-171.png
│ ├── conn-172.png
│ ├── conn-173.png
│ ├── conn-174.png
│ ├── conn-175.svg
│ ├── conn-176.png
│ ├── conn-177.png
│ ├── conn-178.png
│ ├── conn-179.png
│ ├── conn-18.svg
│ ├── conn-180.svg
│ ├── conn-181.png
│ ├── conn-182.svg
│ ├── conn-183.svg
│ ├── conn-184.svg
│ ├── conn-185.svg
│ ├── conn-186.svg
│ ├── conn-187.png
│ ├── conn-188.png
│ ├── conn-189.png
│ ├── conn-19.png
│ ├── conn-190.svg
│ ├── conn-191.png
│ ├── conn-192.svg
│ ├── conn-193.svg
│ ├── conn-194.svg
│ ├── conn-195.svg
│ ├── conn-196.svg
│ ├── conn-197.png
│ ├── conn-198.png
│ ├── conn-199.png
│ ├── conn-20.png
│ ├── conn-200.png
│ ├── conn-201.png
│ ├── conn-202.png
│ ├── conn-203.png
│ ├── conn-204.png
│ ├── conn-205.png
│ ├── conn-206.png
│ ├── conn-207.png
│ ├── conn-208.png
│ ├── conn-209.png
│ ├── conn-21.png
│ ├── conn-210.png
│ ├── conn-22.png
│ ├── conn-23.svg
│ ├── conn-24.svg
│ ├── conn-25.png
│ ├── conn-26.png
│ ├── conn-27.png
│ ├── conn-28.svg
│ ├── conn-29.svg
│ ├── conn-30.svg
│ ├── conn-31.svg
│ ├── conn-32.svg
│ ├── conn-33.png
│ ├── conn-34.png
│ ├── conn-35.png
│ ├── conn-36.svg
│ ├── conn-37.png
│ ├── conn-38.svg
│ ├── conn-39.svg
│ ├── conn-40.svg
│ ├── conn-41.svg
│ ├── conn-42.svg
│ ├── conn-43.svg
│ ├── conn-44.svg
│ ├── conn-45.svg
│ ├── conn-46.png
│ ├── conn-47.png
│ ├── conn-48.png
│ ├── conn-49.svg
│ ├── conn-50.svg
│ ├── conn-51.svg
│ ├── conn-52.svg
│ ├── conn-53.svg
│ ├── conn-54.svg
│ ├── conn-55.svg
│ ├── conn-56.svg
│ ├── conn-57.svg
│ ├── conn-58.svg
│ ├── conn-59.png
│ ├── conn-60.svg
│ ├── conn-61.svg
│ ├── conn-62.svg
│ ├── conn-63.svg
│ ├── conn-64.svg
│ ├── conn-65.svg
│ ├── conn-66.png
│ ├── conn-67.png
│ ├── conn-68.png
│ ├── conn-69.png
│ ├── conn-70.png
│ ├── conn-71.png
│ ├── conn-72.png
│ ├── conn-73.svg
│ ├── conn-74.svg
│ ├── conn-75.png
│ ├── conn-76.png
│ ├── conn-77.png
│ ├── conn-78.svg
│ ├── conn-79.svg
│ ├── conn-80.png
│ ├── conn-81.svg
│ ├── conn-82.svg
│ ├── conn-83.svg
│ ├── conn-84.svg
│ ├── conn-85.svg
│ ├── conn-86.png
│ ├── conn-87.png
│ ├── conn-88.png
│ ├── conn-89.svg
│ ├── conn-9.png
│ ├── conn-90.svg
│ ├── conn-91.svg
│ ├── conn-92.svg
│ ├── conn-93.png
│ ├── conn-94.png
│ ├── conn-95.png
│ ├── conn-96.svg
│ ├── conn-97.svg
│ ├── conn-98.png
│ ├── conn-99.png
│ └── jakarta_ee_logo_schooner_color_stacked_default.png
│ ├── jakarta-connectors-spec.adoc
│ └── license-efsl.adoc
└── theme
└── jakartaee-theme.yml
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: maven
4 | directory: /
5 | schedule:
6 | interval: daily
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target/
2 | .classpath
3 | .project
4 | .settings/
5 | *.iml
6 | *nbactions.xml
7 | .vscode/
8 | .idea
9 | nb-configuration.xml
10 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Jakarta™ Connectors
2 |
3 | Thanks for your interest in this project.
4 |
5 | ## Project description
6 |
7 | The Jakarta Connectors specification defines a standard architecture for
8 | Jakarta EE application components to connect to Enterprise Information Systems.
9 |
10 | * https://projects.eclipse.org/projects/ee4j.jca
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.jca/developer
18 |
19 | The project maintains the following source code repositories
20 |
21 | * https://github.com/eclipse-ee4j/jca-api
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/jca-dev
59 |
--------------------------------------------------------------------------------
/NOTICE.md:
--------------------------------------------------------------------------------
1 | # Notices for Jakarta™ Connectors
2 |
3 | This content is produced and maintained by the Jakarta Connectors project.
4 |
5 | * Project home: https://projects.eclipse.org/projects/ee4j.jca
6 |
7 | ## Trademarks
8 |
9 | Jakarta Connectors 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/eclipse-ee4j/jca-api
34 |
35 | ## Third-party Content
36 |
37 | This project leverages the following third party content.
38 |
39 | None
40 |
41 | ## Cryptography
42 |
43 | Content may contain encryption software. The country in which you are currently
44 | may have restrictions on the import, possession, and use, and/or re-export to
45 | another country, of encryption software. BEFORE using any encryption software,
46 | please check the country's laws, regulations and policies concerning the import,
47 | possession, or use, and re-export of encryption software, to see if this is
48 | permitted.
49 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Jakarta™ Connectors
2 | The Jakarta Connectors specification defines a standard architecture for
3 | Jakarta EE application components to connect to Enterprise Information Systems.
4 |
5 | * https://projects.eclipse.org/projects/ee4j.jca
6 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/AdministeredObjectDefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
3 | * Copyright (c) 2025 Contributors to Eclipse Foundation. All rights reserved.
4 | *
5 | * This program and the accompanying materials are made available under the
6 | * terms of the Eclipse Public License v. 2.0, which is available at
7 | * http://www.eclipse.org/legal/epl-2.0.
8 | *
9 | * This Source Code may also be made available under the following Secondary
10 | * Licenses when the conditions for such availability set forth in the
11 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
12 | * version 2 with the GNU Classpath Exception, which is available at
13 | * https://www.gnu.org/software/classpath/license.html.
14 | *
15 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
16 | */
17 |
18 | package jakarta.resource;
19 |
20 | import static java.lang.annotation.ElementType.TYPE;
21 | import java.lang.annotation.Repeatable;
22 | import java.lang.annotation.Retention;
23 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
24 | import java.lang.annotation.Target;
25 |
26 | /**
27 | * Annotation used to define a Connector administered object to be
28 | * registered in JNDI.
29 | *
30 | * Once defined, an administered object may be referenced
31 | * by a component using the lookup
element of the
32 | * Resource
annotation.
33 | *
34 | * @see jakarta.annotation.Resource
35 | * @version 1.7
36 | * @since 1.7
37 | */
38 | @Retention(RUNTIME)
39 | @Target({TYPE})
40 | @Repeatable(AdministeredObjectDefinitions.class)
41 | public @interface AdministeredObjectDefinition {
42 |
43 | /**
44 | * JNDI name of the administered object being defined.
45 | * @return name
46 | */
47 | String name();
48 |
49 | /**
50 | * Description of the administered object.
51 | * @return description
52 | */
53 | String description() default "";
54 |
55 | /**
56 | * The name of the resource adapter that the administered object must be
57 | * created from. The resource adapter is required to be available at
58 | * deployment time.
59 | * @return resource adapter
60 | */
61 | String resourceAdapter();
62 |
63 | /**
64 | * Fully qualified name of the administered object’s class
65 | * @return className
66 | */
67 | String className();
68 |
69 | /**
70 | * Fully qualified name of the administered object’s interface
71 | * @return fully qualified name
72 | */
73 | String interfaceName() default "";
74 |
75 | /**
76 | * Properties of the administered object. These properties may be
77 | * vendor-specific properties. Vendor-specific properties may be combined
78 | * with or used to override the administered object properties
79 | * defined using this annotation.
80 | *
81 | * Administered Object properties that are specified and are not supported
82 | * in a given resource adapter or cannot be mapped to a vendor specific
83 | * configuration property may be ignored.
84 | * @return properties of the administered object.
85 | */
86 | String[] properties() default {};
87 | }
88 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/AdministeredObjectDefinitions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012, 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.resource;
18 |
19 | import static java.lang.annotation.ElementType.TYPE;
20 | import java.lang.annotation.Retention;
21 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
22 | import java.lang.annotation.Target;
23 |
24 | /**
25 | * Declares one or more AdministeredObjectDefinition
26 | * annotations.
27 | *
28 | * @see AdministeredObjectDefinition
29 | * @version 1.7
30 | * @since 1.7
31 | */
32 | @Retention(RUNTIME)
33 | @Target({TYPE})
34 | public @interface AdministeredObjectDefinitions {
35 |
36 | AdministeredObjectDefinition[] value();
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/ConnectionFactoryDefinitions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012, 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.resource;
18 |
19 | import static java.lang.annotation.ElementType.TYPE;
20 | import java.lang.annotation.Retention;
21 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
22 | import java.lang.annotation.Target;
23 |
24 | /**
25 | * Declares one or more ConnectionFactoryDefinition
26 | * annotations.
27 | *
28 | * @see ConnectionFactoryDefinition
29 | * @version 1.7
30 | * @since 1.7
31 | */
32 | @Retention(RUNTIME)
33 | @Target({TYPE})
34 | public @interface ConnectionFactoryDefinitions {
35 |
36 | ConnectionFactoryDefinition[] value();
37 | }
38 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/NotSupportedException.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.resource;
18 |
19 | /**
20 | * A NotSupportedException
is thrown to indicate that
21 | * callee (resource adapter
22 | * or application server for system contracts) cannot execute an operation
23 | * because the operation is not a supported feature. For example, if the
24 | * transaction support level for a resource adapter is
25 | * NO_TRANSACTION
, an invocation of getXAResource
26 | * method on a ManagedConnection
object should throw a
27 | * NotSupportedException
exception.
28 | *
29 | * @version 1.0
30 | * @author Rahul Sharma
31 | * @author Ram Jeyaraman
32 | */
33 |
34 | public class NotSupportedException extends ResourceException {
35 |
36 | /**
37 | * Constructs a new instance with null as its detail message.
38 | */
39 | public NotSupportedException() { super(); }
40 |
41 | /**
42 | * Constructs a new instance with the specified detail message.
43 | *
44 | * @param message the detail message.
45 | */
46 | public NotSupportedException(String message) {
47 | super(message);
48 | }
49 |
50 | /**
51 | * Constructs a new throwable with the specified cause.
52 | *
53 | * @param cause a chained exception of type Throwable
.
54 | */
55 | public NotSupportedException(Throwable cause) {
56 | super(cause);
57 | }
58 |
59 | /**
60 | * Constructs a new throwable with the specified detail message and cause.
61 | *
62 | * @param message the detail message.
63 | *
64 | * @param cause a chained exception of type Throwable
.
65 | */
66 | public NotSupportedException(String message, Throwable cause) {
67 | super(message, cause);
68 | }
69 |
70 | /**
71 | * Constructs a new throwable with the specified detail message and
72 | * error code.
73 | *
74 | * @param message a description of the exception.
75 | * @param errorCode a string specifying the vendor specific error code.
76 | */
77 | public NotSupportedException(String message, String errorCode) {
78 | super(message, errorCode);
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/Referenceable.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.resource;
18 |
19 | import javax.naming.Reference;
20 |
21 | /** The Referenceable interface extends the javax.naming.Referenceable
22 | * interface. It enables support for JNDI Reference mechanism for
23 | * the registration of the connection factory in the JNDI name space.
24 | * Note that the implementation and structure of Reference is specific
25 | * to an application server.
26 | *
27 | *
The implementation class for a connection factory interface is
28 | * required to implement both java.io.Serializable and
29 | * jakarta.resource.Referenceable interfaces to support JNDI registration.
30 | *
31 | * @version 0.9
32 | * @author Rahul Sharma
33 | *
34 | **/
35 |
36 | public interface Referenceable extends javax.naming.Referenceable {
37 |
38 | /** Sets the Reference instance. This method is called by the
39 | * deployment code to set the Reference that can be later
40 | * returned by the getReference method (as defined in the
41 | * javax.naming.Referenceable interface).
42 | *
43 | * @param reference A Reference instance
44 | * @see javax.naming.Referenceable#getReference
45 | *
46 | **/
47 | public
48 | void setReference(Reference reference);
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/ConnectionMetaData.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.resource.cci;
18 |
19 |
20 | import jakarta.resource.ResourceException;
21 |
22 | /** The interface ConnectionMetaData
provides information
23 | * about an EIS instance connected through a Connection instance. A
24 | * component calls the method Connection.getMetaData
to
25 | * get a ConnectionMetaData
instance.
26 | *
27 | * @version 0.8
28 | * @author Rahul Sharma
29 | * @see jakarta.resource.cci.Connection
30 | * @see jakarta.resource.cci.ResultSetInfo
31 | **/
32 |
33 | public interface ConnectionMetaData {
34 |
35 | /** Returns product name of the underlying EIS instance connected
36 | * through the Connection that produced this metadata.
37 | *
38 | * @return Product name of the EIS instance
39 | * @throws ResourceException Failed to get the information for
40 | * the EIS instance
41 | **/
42 | public
43 | String getEISProductName() throws ResourceException;
44 |
45 | /** Returns product version of the underlying EIS instance.
46 | *
47 | * @return Product version of an EIS instance.
48 | * @throws ResourceException Failed to get the information for
49 | * the EIS instance
50 | **/
51 | public
52 | String getEISProductVersion() throws ResourceException;
53 |
54 | /** Returns the user name for an active connection as known to
55 | * the underlying EIS instance. The name corresponds the resource
56 | * principal under whose security context a connection to the
57 | * EIS instance has been established.
58 | *
59 | * @return String representing the user name
60 | * @throws ResourceException Failed to get the information for
61 | * the EIS instance
62 | **/
63 | public
64 | String getUserName() throws ResourceException;
65 | }
66 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/ConnectionSpec.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.resource.cci;
18 |
19 | /** ConnectionSpec is used by an application component to pass
20 | * connection request-specific properties to the ConnectionFactory.
21 | * getConnection method.
22 | *
23 | *
It is recommended that the ConnectionSpec interface be 24 | * implemented as a JavaBean to support tools. The properties 25 | * on the ConnectionSpec implementation class must be defined 26 | * through the getter and setter methods pattern. 27 | * 28 | *
The CCI specification defines a set of standard properties
29 | * for an ConnectionSpec. The properties are defined either on
30 | * a derived interface or an implementation class of an empty
31 | * ConnectionSpec interface. In addition, a resource adapter may
32 | * define additional properties specific to its underlying EIS.
33 | *
34 | * @author Rahul Sharma
35 | * @version 1.0 Public Draft 1
36 | * @see jakarta.resource.cci.ConnectionFactory
37 | **/
38 |
39 | public interface ConnectionSpec {
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/IndexedRecord.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1997, 2021 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.resource.cci;
18 |
19 | /** IndexedRecord represents an ordered collection of record elements
20 | * based on the The CCI specification defines a set of standard properties for
26 | * an InteractionSpec. An InteractionSpec implementation is not
27 | * required to support a standard property if that property does
28 | * not apply to its underlying EIS.
29 | *
30 | * The InteractionSpec implementation class must provide getter and
31 | * setter methods for each of its supported properties. The getter and
32 | * setter methods convention should be based on the Java Beans design
33 | * pattern.
34 | *
35 | * The standard properties are as follows:
36 | * The following standard properties are used to give hints to an
45 | * Interaction instance about the ResultSet requirements:
46 | * A CCI implementation can provide additional properties beyond
55 | * that described in the InteractionSpec interface. Note that the
56 | * format and type of the additional properties is specific to an EIS
57 | * and is outside the scope of the CCI specification.
58 | *
59 | * It is required that the InteractionSpec interface be implemented
60 | * as a JavaBean for the toolability support. The properties on the
61 | * InteractionSpec implementation class should be defined through the
62 | * getter and setter methods pattern. An implementation class for
63 | * InteractionSpec interface is required to implement the
64 | * java.io.Serializable interface.
65 | *
66 | * @author Rahul Sharma
67 | * @version 0.8
68 | * @since 0.8
69 | * @see jakarta.resource.cci.Interaction
70 | **/
71 |
72 | public interface InteractionSpec extends Serializable {
73 |
74 | /**Interaction Verb type: The execution of an Interaction does only a
75 | * send to the target EIS instance. The input record is sent to the
76 | * EIS instance without any synchronous response in terms of an
77 | * output Record or ResultSet.
78 | */
79 | public static final int SYNC_SEND = 0;
80 |
81 | /**Interaction Verb type: The execution of an Interaction sends a
82 | * request to the EIS instance and receives response synchronously.
83 | * The input record is sent to the EIS instance with the output
84 | * received either as Record or CCIResultSet.
85 | **/
86 | public static final int SYNC_SEND_RECEIVE = 1;
87 |
88 | /**The execution of an Interaction results in a synchronous
89 | * receive of an output Record. An example is: a session bean gets
90 | * a method invocation and it uses this SEND_RECEIVE form of
91 | * interaction to retrieve messages that have been delivered to a
92 | * message queue.
93 | **/
94 | public static final int SYNC_RECEIVE = 2;
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/MappedRecord.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.resource.cci;
18 |
19 | /** The interface Refer the CCI specification in Connectors 1.0 for detailed
24 | * requirements on the implementation of a CCI ResultSet.
25 | *
26 | * @author Rahul Sharma
27 | * @since 0.8
28 | * @see java.sql.ResultSet
29 | **/
30 | public interface ResultSet extends Record, java.sql.ResultSet {
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/Streamable.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.resource.cci;
18 |
19 |
20 | import java.io.InputStream;
21 | import java.io.OutputStream;
22 | import java.io.IOException;
23 |
24 | /** Streamable interface enables a resource adapter to extract data from
25 | * an input Record or set data into an output Record as a stream of
26 | * bytes.
27 | *
28 | * The Streamable interface provides a resource adapter's view
29 | * of the data that has been set in a Record instance by a component.
30 | *
31 | * The Streamable interface is not directly used by a component. It
32 | * is used by a resource adapter implementation. A component uses Record
33 | * or any derived interfaces to manage records.
34 | *
35 | * @author Rahul Sharma
36 | * @since 0.8
37 | * @see jakarta.resource.cci.Record
38 | **/
39 |
40 | public interface Streamable {
41 |
42 | /** Read data from an InputStream and initialize fields of a
43 | * Streamable object.
44 | *
45 | * @param istream InputStream that represents a resource
46 | * adapter specific internal representation
47 | * of fields of a Streamable object
48 | * @throws java.io.IOException if there is an error reading from the stream
49 | **/
50 | public
51 | void read(InputStream istream) throws IOException;
52 |
53 |
54 | /** Write fields of a Streamable object to an OutputStream
55 | * @param ostream OutputStream that holds value of a
56 | * Streamable object
57 | * @throws java.io.IOException if there is an error writing to the stream
58 | **/
59 | public
60 | void write(OutputStream ostream) throws IOException;
61 |
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 | * The jakarta.resource.cci package contains API specification for the Common
19 | * Client Interface (CCI).
20 | */
21 | package jakarta.resource.cci;
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 | * The jakarta.resource package is the top-level package for the Jakarta™ Connectors specification.
19 | */
20 | package jakarta.resource;
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/Activation.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.resource.spi;
18 |
19 | import java.lang.annotation.Target;
20 | import static java.lang.annotation.ElementType.*;
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Documented;
23 | import static java.lang.annotation.RetentionPolicy.*;
24 |
25 | /**
26 | * Designates a JavaBean as an The ActivationSpec JavaBean contains the configuration information pertaining
32 | * to inbound connectivity from an EIS instance. A resource adapter capable of
33 | * message delivery to message endpoints must provide an JavaBean class
34 | * implementing the {@link ActivationSpec ActivationSpec} interface or annotate
35 | * a JavaBean with the The ActivationSpec JavaBean has a set of configurable properties specific to
39 | * the messaging style and the message provider.
40 | *
41 | * Together with the messageListener annotation element, this annotation
42 | * specifies information about a specific message listener type supported by the
43 | * messaging resource adapter.
44 | *
45 | * @since 1.6
46 | */
47 |
48 | @Documented
49 | @Retention(RUNTIME)
50 | @Target(TYPE)
51 | public @interface Activation {
52 |
53 | /**
54 | * Indicates the message listener type(s) associated with this activation.
55 | *
56 | * @return The Java types of the Message Listener interface this
57 | * activation-spec is associated with.
58 | */
59 | Class[] messageListeners();
60 | }
61 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ActivationSpec.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.resource.spi;
18 |
19 | /**
20 | * This interface serves as a marker. An instance of an ActivationSpec must be a
21 | * JavaBean and must be serializable. This holds the activation configuration
22 | * information for a message endpoint.
23 | *
24 | * @version 1.0
25 | * @author Ram Jeyaraman
26 | */
27 | public interface ActivationSpec extends ResourceAdapterAssociation {
28 |
29 | /**
30 | * This method may be called by a deployment tool to validate the overall
31 | * activation configuration information provided by the endpoint deployer.
32 | * This helps to catch activation configuration errors earlier on without
33 | * having to wait until endpoint activation time for configuration
34 | * validation. The implementation of this self-validation check behavior is
35 | * optional.
36 | *
37 | * Note: Since Java EE Connector 1.6 specification, resource adapter
38 | * implementations are recommended to use the annotations or the XML
39 | * validation deployment descriptor facilities defined by the Bean Validation
40 | * specification to express their validation requirements of its configuration
41 | * properties to the application server.
42 | *
43 | * @throws InvalidPropertyException indicates invalid
44 | * configuration property settings.
45 | */
46 | void validate() throws InvalidPropertyException;
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/AdministeredObject.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.resource.spi;
18 |
19 | import java.lang.annotation.Target;
20 | import static java.lang.annotation.ElementType.*;
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Documented;
23 | import static java.lang.annotation.RetentionPolicy.*;
24 |
25 | /**
26 | * Designates a JavaBean as an administered object.Administered objects are
27 | * specific to a messaging style or message provider.
28 | *
29 | * @since 1.6
30 | */
31 |
32 | @Documented
33 | @Retention(RUNTIME)
34 | @Target(TYPE)
35 | public @interface AdministeredObject {
36 |
37 | /**
38 | * Specifies the Java type of the interface implemented by the administered
39 | * object.
40 | * @return the Java type of the interface implemented by the administered
41 | * object.
42 | */
43 | Class[] adminObjectInterfaces() default {};
44 | }
45 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ApplicationServerInternalException.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.resource.spi;
18 |
19 | /**
20 | * An The ConnectionRequestInfo interface enables a resource adapter to
20 | * pass its own request specific data structure across the connection
21 | * request flow. A resource adapter extends the empty interface to
22 | * supports its own data structures for connection request.
23 | *
24 | * A typical use allows a resource adapter to handle
25 | * application component specified per-connection request properties
26 | * (example - client ID, language). The application server passes these
27 | * properties back across to match/createManagedConnection calls on
28 | * the resource adapter. These properties remain opaque to the
29 | * application server during the connection request flow.
30 | *
31 | * Once the ConnectionRequestInfo reaches match/createManagedConnection
32 | * methods on the ManagedConnectionFactory instance, resource adapter
33 | * uses this additional per-request information to do connection
34 | * creation and matching.
35 | *
36 | * @version 0.8
37 | * @author Rahul Sharma
38 | * @see jakarta.resource.spi.ManagedConnectionFactory
39 | * @see jakarta.resource.spi.ManagedConnection
40 | **/
41 |
42 | public interface ConnectionRequestInfo {
43 |
44 | /**
45 | * Checks whether this instance is equal to another. Since
46 | * connectionRequestInfo is defined specific to a resource
47 | * adapter, the resource adapter is required to implement
48 | * this method. The conditions for equality are specific
49 | * to the resource adapter.
50 | *
51 | * @param other to check
52 | * @return True if the two instances are equal.
53 | **/
54 | public boolean equals(Object other);
55 |
56 | /** Returns the hashCode of the ConnectionRequestInfo.
57 | *
58 | * @return hash code os this instance
59 | **/
60 | public int hashCode();
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/DissociatableManagedConnection.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.resource.spi;
18 |
19 | import jakarta.resource.ResourceException;
20 |
21 | /**
22 | * This is a mix-in interface that may be optionally implemented by a
23 | * The application server can then perform any cleanup operations
65 | * related to the disassociated connection handle in its connection pool.
66 | *
67 | * @param connection the disassociated connection object handle that
68 | * has been closed
69 | *
70 | * @param mcf The A resource adapter implements the jakarta.resource.spi.LocalTransaction
26 | * interface to provide support for local transactions that are performed
27 | * on the underlying resource manager.
28 | *
29 | * If a resource adapter supports the LocalTransaction interface, then
30 | * the application server can choose to perform local transaction
31 | * optimization (uses local transaction instead of a Jakarta™ Transactions transaction for
32 | * a single resource manager case).
33 | *
34 | * @version 0.5
35 | * @author Rahul Sharma
36 | * @see jakarta.resource.spi.ManagedConnection
37 | **/
38 |
39 |
40 |
41 | public interface LocalTransaction {
42 | /** Begin a local transaction
43 | *
44 | * @throws ResourceException generic exception if operation fails
45 | * @throws LocalTransactionException
46 | * error condition related
47 | * to local transaction management
48 | * @throws ResourceAdapterInternalException
49 | * error condition internal to resource
50 | * adapter
51 | * @throws EISSystemException EIS instance specific error condition
52 | **/
53 | public
54 | void begin() throws ResourceException;
55 |
56 | /** Commit a local transaction
57 | *
58 | * @throws ResourceException generic exception if operation fails
59 | * @throws LocalTransactionException
60 | * error condition related
61 | * to local transaction management
62 | * @throws ResourceAdapterInternalException
63 | * error condition internal to resource
64 | * adapter
65 | * @throws EISSystemException EIS instance specific error condition
66 | **/
67 | public
68 | void commit() throws ResourceException;
69 |
70 | /** Rollback a local transaction
71 | * @throws ResourceException generic exception if operation fails
72 | * @throws LocalTransactionException
73 | * error condition related
74 | * to local transaction management
75 | * @throws ResourceAdapterInternalException
76 | * error condition internal to resource
77 | * adapter
78 | * @throws EISSystemException EIS instance specific error condition
79 | **/
80 | public
81 | void rollback() throws ResourceException;
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/LocalTransactionException.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.resource.spi;
18 |
19 | /**
20 | * A The The method ManagedConnection.getMetaData returns a
27 | * ManagedConnectionMetaData instance.
28 | *
29 | * @version 0.8
30 | * @author Rahul Sharma
31 | * @see jakarta.resource.spi.ManagedConnection
32 | **/
33 |
34 | public interface ManagedConnectionMetaData {
35 |
36 | /** Returns Product name of the underlying EIS instance connected
37 | * through the ManagedConnection.
38 | * @throws ResourceException if an error occurs
39 | * @return Product name of the EIS instance.
40 | **/
41 | public
42 | String getEISProductName() throws ResourceException;
43 |
44 | /** Returns product version of the underlying EIS instance connected
45 | * through the ManagedConnection.
46 | * @throws ResourceException if an error occurs
47 | * @return Product version of the EIS instance
48 | **/
49 | public
50 | String getEISProductVersion() throws ResourceException;
51 |
52 | /** Returns maximum limit on number of active concurrent connections
53 | * that an EIS instance can support across client processes. If an EIS
54 | * instance does not know about (or does not have) any such limit, it
55 | * returns a 0.
56 | * @throws ResourceException if an error occurs
57 | * @return Maximum limit for number of active concurrent connections
58 | **/
59 | public
60 | int getMaxConnections() throws ResourceException;
61 |
62 | /** Returns name of the user associated with the ManagedConnection
63 | * instance. The name corresponds to the resource principal under whose
64 | * whose security context, a connection to the EIS instance has been
65 | * established.
66 | * @throws ResourceException if an error occurs
67 | * @return name of the user
68 | **/
69 | public
70 | String getUserName() throws ResourceException;
71 | }
72 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ResourceAdapterAssociation.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.resource.spi;
18 |
19 | import jakarta.resource.ResourceException;
20 |
21 | /**
22 | * This interface specifies the methods to associate a
23 | * This may be thrown by a resource adapter when an application
23 | * uses a shareable connection in an unshareable manner.
24 | *
25 | * @version 1.0
26 | * @author Ram Jeyaraman
27 | */
28 | public class SharingViolationException
29 | extends jakarta.resource.ResourceException {
30 |
31 | /**
32 | * Constructs a new instance with null as its detail message.
33 | */
34 | public SharingViolationException() { super(); }
35 |
36 | /**
37 | * Constructs a new instance with the specified detail message.
38 | *
39 | * @param message the detail message.
40 | */
41 | public SharingViolationException(String message) {
42 | super(message);
43 | }
44 |
45 | /**
46 | * Constructs a new throwable with the specified cause.
47 | *
48 | * @param cause a chained exception of type
49 | * When a This may be used by the application server to prune invalid
28 | * The application server may use this functionality to test the
31 | * validity of a
24 | * A
31 | * A Some reasons why it is better for
24 | *
25 | * This class extends
29 | *
30 | * @since 1.6
31 | * @see jakarta.resource.spi.work.WorkContext
32 | * @see jakarta.resource.spi.work.ExecutionContext
33 | *
34 | */
35 |
36 | public class TransactionContext extends ExecutionContext implements
37 | WorkContext {
38 | /**
39 | * Determines if a deserialized instance of this class
40 | * is compatible with this class.
41 | */
42 | private static final long serialVersionUID = 6205067498708597824L;
43 |
44 | /**
45 | * {@inheritDoc}
46 | */
47 | public String getDescription() {
48 | return "Transaction Context";
49 | }
50 |
51 | /**
52 | * {@inheritDoc}
53 | */
54 | public String getName() {
55 | return "TransactionContext";
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/Work.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.resource.spi.work;
18 |
19 | /**
20 | * This models a This could be thrown only after the execution of a
24 | * Any exception thrown during execution context setup or during
30 | * An associated error code indicates the nature of the error condition.
34 | * Possible error codes are
27 | * A
45 | *
46 | * @return the associated name of the
56 | *
57 | * @return the associated description of the
24 | * This class is not designed as an Enumerated type (Enum), as the error codes
25 | * listed below could be expanded to accommodate custom error conditions for
26 | * custom
45 | *
46 | * @since 1.6
47 | */
48 | public static final String DUPLICATE_CONTEXTS = "2";
49 |
50 | /**
51 | * Indicates a failure in recreating the
27 | *
28 | * When a
33 | *
34 | * When a
40 | *
41 | * The possible error conditions that might occur during associating an
42 | *
45 | *
46 | * @since 1.6
47 | */
48 |
49 | public interface WorkContextLifecycleListener {
50 |
51 | /**
52 | * Invoked when the
29 | * A
39 | *
40 | * @since 1.6
41 | */
42 | public interface WorkContextProvider extends Serializable {
43 |
44 | /**
45 | * Gets an list of This could be thrown only before the execution of a
25 | * An associated error code indicates the nature of the error condition.
29 | * Possible error codes are By using and/or copying this document, or the Eclipse Foundation
8 | document from which this statement is linked, you (the licensee) agree
9 | that you have read, understood, and will comply with the following
10 | terms and conditions: Permission to copy, and distribute the contents of this document, or
13 | the Eclipse Foundation document from which this statement is linked, in
14 | any medium for any purpose and without fee or royalty is hereby
15 | granted, provided that you include the following on ALL copies of the
16 | document, or portions thereof, that you use: Inclusion of the full text of this NOTICE must be provided. We
29 | request that authorship attribution be provided in any software,
30 | documents, or other items or products that you create pursuant to the
31 | implementation of the contents of this document, or any portion
32 | thereof. No right to create modifications or derivatives of Eclipse Foundation
35 | documents is granted pursuant to this license, except anyone may
36 | prepare and distribute derivative works and portions of this document
37 | in software that implements the specification, in supporting materials
38 | accompanying such software, and in documentation of such software,
39 | PROVIDED that all such works include the notice below. HOWEVER, the
40 | publication of derivative works of this document for use as a technical
41 | specification is expressly prohibited. The notice is: "Copyright © 2018, 2020 Eclipse Foundation. This software or
46 | document includes material copied from or derived from
47 | Jakarta® Connectors
48 |
49 | https://jakarta.ee/specifications/connectors/2.0." THIS DOCUMENT IS PROVIDED "AS IS," AND THE COPYRIGHT
54 | HOLDERS AND THE ECLIPSE FOUNDATION MAKE NO REPRESENTATIONS OR
55 | WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
56 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
57 | NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE
58 | SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS
59 | WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
60 | OTHER RIGHTS. THE COPYRIGHT HOLDERS AND THE ECLIPSE FOUNDATION WILL NOT BE LIABLE
63 | FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT
64 | OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE
65 | CONTENTS THEREOF. The name and trademarks of the copyright holders or the Eclipse
68 | Foundation may NOT be used in advertising or publicity pertaining to
69 | this document or its contents without specific, written prior
70 | permission. Title to copyright in this document will at all times
71 | remain with copyright holders.java.util.List
interface. This interface
21 | * allows a client to access elements by their integer index (position
22 | * in the list) and search for elements in the List.
23 | *
24 | * @author Rahul Sharma
25 | * @since 0.8
26 | **/
27 | public interface IndexedRecord
37 | *
43 | *
44 | *
47 | *
53 | *
54 | * jakarta.resource.cci.MappedRecord
is
20 | * used for key-value map based representation of record elements.
21 | * The MappedRecord interface extends both Record
and
22 | * java.util.Map
interfaces.
23 | *
24 | * @author Rahul Sharma
25 | * @version 0.8
26 | **/
27 | public interface MappedRecordRecord
instance.
36 | *
37 | * @return a Record
instance or null.
38 | *
39 | * @throws ResourceException indicates an exceptional condition.
40 | */
41 | Record onMessage(Record inputData) throws ResourceException;
42 | }
43 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/RecordFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1997, 2021 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.resource.cci;
18 |
19 | import jakarta.resource.ResourceException;
20 | import jakarta.resource.NotSupportedException;
21 |
22 |
23 | /** The RecordFactory interface is used for creating MappedRecord and
24 | * IndexedRecord instances. Note that the RecordFactory is only used
25 | * for creation of generic record instances. A CCI implementation
26 | * provides an implementation class for the RecordFactory interface.
27 | *
28 | * @author Rahul Sharma
29 | * @since 0.8
30 | * @see jakarta.resource.cci.IndexedRecord
31 | * @see jakarta.resource.cci.MappedRecord
32 | **/
33 | public interface RecordFactory {
34 |
35 | /** Creates a MappedRecord. The method takes the name of the record
36 | * that is to be created by the RecordFactory. The name of the
37 | * record acts as a pointer to the meta information (stored in
38 | * the metadata repository) for a specific record type.
39 | *
40 | * @param recordName Name of the Record
41 | * @return MappedRecord
42 | * @throws ResourceException Failed to create a MappedRecord.
43 | * Example error cases are:
44 | *
45 | *
46 | *
50 | * @throws NotSupportedException Operation not supported
51 | *
52 | **/
53 | public
54 |
68 | *
72 | * @throws NotSupportedException Operation not supported
73 | **/
74 | public
75 | ResourceWarning
provides information on warnings related to
22 | * execution of an interaction with an EIS. Warnings are silently
23 | * chained to the object whose method caused it to be reported.
24 | *
25 | * @see Interaction#getWarnings
26 | */
27 | public class ResourceWarning extends jakarta.resource.ResourceException {
28 |
29 | /**
30 | * Constructs a new instance with null as its detail message.
31 | */
32 | public ResourceWarning() { super(); }
33 |
34 | /**
35 | * Constructs a new instance with the specified detail message.
36 | *
37 | * @param message the detail message.
38 | */
39 | public ResourceWarning(String message) {
40 | super(message);
41 | }
42 |
43 | /**
44 | * Constructs a new throwable with the specified cause.
45 | *
46 | * @param cause a chained exception of type
47 | * Throwable
.
48 | */
49 | public ResourceWarning(Throwable cause) {
50 | super(cause);
51 | }
52 |
53 | /**
54 | * Constructs a new throwable with the specified detail message and cause.
55 | *
56 | * @param message the detail message.
57 | *
58 | * @param cause a chained exception of type
59 | * Throwable
.
60 | */
61 | public ResourceWarning(String message, Throwable cause) {
62 | super(message, cause);
63 | }
64 |
65 | /**
66 | * Constructs a new throwable with the specified detail message and
67 | * an error code.
68 | *
69 | * @param message a description of the exception.
70 | * @param errorCode a string specifying the vendor specific error code.
71 | */
72 | public ResourceWarning(String message, String errorCode) {
73 | super(message, errorCode);
74 | }
75 |
76 | /**
77 | * Retrieves the warning chained to this ResourceWarning
78 | * object.
79 | *
80 | * @return next ResourceWarning
in the chain; null if none.
81 | *
82 | * @deprecated Java™ release 1.4 supports a chained exception facility
83 | * that allows any throwable to know about another throwable, if any,
84 | * that caused it to get thrown. Refer to getCause
and
85 | * initCause
methods of the
86 | * java.lang.Throwable
class.
87 | */
88 | public ResourceWarning getLinkedWarning() {
89 | try {
90 | return (ResourceWarning)getLinkedException();
91 | }
92 | catch (ClassCastException ex) {
93 | return null;
94 | }
95 | }
96 |
97 | /**
98 | * Adds an ResourceWarning
object to the end of the chain.
99 | *
100 | * @param warning ResourceWarning
to be added to the chain.
101 | *
102 | * @deprecated J2SE release 1.4 supports a chained exception facility
103 | * that allows any throwable to know about another throwable, if any,
104 | * that caused it to get thrown. Refer to getCause
and
105 | * initCause
methods of the
106 | * java.lang.Throwable
class.
107 | */
108 | public void setLinkedWarning(ResourceWarning warning) {
109 | setLinkedException(warning);
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/cci/ResultSet.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.resource.cci;
18 |
19 | /** A ResultSet represents tabular data that is retrieved from an EIS
20 | * instance by the execution of an Interaction.. The CCI ResultSet is
21 | * based on the JDBC ResultSet.
22 | *
23 | * ActivationSpec
. This annotation may
27 | * be placed on a JavaBean. A JavaBean annotated with the Activation annotation
28 | * is not required to implement the {@link ActivationSpec ActivationSpec}
29 | * interface.
30 | *
31 | * Activation
annotation for each supported
36 | * endpoint message listener type.
37 | *
38 | * ApplicationServerInternalException
is thrown
21 | * by an application
22 | * server to indicate error conditions specific to an application server.
23 | * These error conditions can be related to either configuration related
24 | * errors or implementation of mechanisms internal to an application server
25 | * (example: connection pooling, thread management).
26 | *
27 | * @version 1.0
28 | * @author Rahul Sharma
29 | * @author Ram Jeyaraman
30 | */
31 |
32 | public class ApplicationServerInternalException
33 | extends jakarta.resource.ResourceException {
34 |
35 | /**
36 | * Constructs a new instance with null as its detail message.
37 | */
38 | public ApplicationServerInternalException() { super(); }
39 |
40 | /**
41 | * Constructs a new instance with the specified detail message.
42 | *
43 | * @param message the detail message.
44 | */
45 | public ApplicationServerInternalException(String message) {
46 | super(message);
47 | }
48 |
49 | /**
50 | * Constructs a new throwable with the specified cause.
51 | *
52 | * @param cause a chained exception of type
53 | * Throwable
.
54 | */
55 | public ApplicationServerInternalException(Throwable cause) {
56 | super(cause);
57 | }
58 |
59 | /**
60 | * Constructs a new throwable with the specified detail message and cause.
61 | *
62 | * @param message the detail message.
63 | *
64 | * @param cause a chained exception of type
65 | * Throwable
.
66 | */
67 | public ApplicationServerInternalException(
68 | String message, Throwable cause) {
69 | super(message, cause);
70 | }
71 |
72 | /**
73 | * Constructs a new throwable with the specified detail message and
74 | * an error code.
75 | *
76 | * @param message a description of the exception.
77 | * @param errorCode a string specifying the vendor specific error code.
78 | */
79 | public ApplicationServerInternalException(
80 | String message, String errorCode) {
81 | super(message, errorCode);
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/AuthenticationMechanism.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.resource.spi;
18 |
19 | import java.lang.annotation.Target;
20 | import java.lang.annotation.Retention;
21 | import java.lang.annotation.Documented;
22 | import static java.lang.annotation.RetentionPolicy.*;
23 |
24 | @Documented
25 | @Retention(RUNTIME)
26 | @Target({})
27 | /* The AuthenticationMechanism
declared type is intended
28 | solely for use as a member type in complex annotation type declarations
29 | like Connector
.
30 | */
31 |
32 | /**
33 | * An annotation used to specify the authentication mechanism
34 | * supported by the resource adapter.
35 | *
36 | * @since 1.6
37 | */
38 | public @interface AuthenticationMechanism {
39 |
40 | /**
41 | * An enumerated type that represents the various interfaces
42 | * that a resource adapter may support for the representation
43 | * of the credentials.
44 | *
45 | * @since 1.6
46 | */
47 | public enum CredentialInterface {
48 | /**
49 | * Corresponds to
50 | * jakarta.resource.spi.security.PasswordCredential
.
51 | * This is the default credential interface
52 | */
53 | PasswordCredential,
54 |
55 | /**
56 | * Corresponds to org.ietf.jgss.GSSCredential
57 | */
58 | GSSCredential,
59 |
60 | /**
61 | * Corresponds to
62 | * jakarta.resource.spi.security.GenericCredential
63 | */
64 | GenericCredential
65 | }
66 |
67 | /**
68 | * The authentication-mechanism-type specifies an authentication
69 | * mechanism supported by the resource adapter. Note that this
70 | * support is for the resource adapter and not for the
71 | * underlying EIS instance.
72 | * @return authentication
73 | * mechanism supported by the resource adapter
74 | */
75 | String authMechanism() default "BasicPassword";
76 |
77 | /**
78 | * The optional description specifies
79 | * any resource adapter specific requirement for the support of
80 | * security contract and authentication mechanism.
81 | * @return description
82 | */
83 | String[] description() default {};
84 |
85 | /**
86 | * Represents the interface that the resource adapter implementation
87 | * supports for the representation of the credentials.
88 | *
89 | * Note that BasicPassword mechanism type should support the
90 | * jakarta.resource.spi.security.PasswordCredential
interface.
91 | * The Kerbv5 mechanism type should support the
92 | * org.ietf.jgss.GSSCredential
interface or the deprecated
93 | * jakarta.resource.spi.security.GenericCredential
interface.
94 | * @return interface that the resource adapter implementation
95 | * supports for the representation of the credentials
96 | */
97 | CredentialInterface credentialInterface()
98 | default CredentialInterface.PasswordCredential;
99 | }
100 |
101 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/CommException.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.resource.spi;
18 |
19 | /**
20 | * This indicates errors related to failed or interrupted
21 | * communication with an EIS instance. Examples of common error conditions
22 | * represented by this exception type are communication protocol error and
23 | * invalidated connection due to server failure.
24 | *
25 | * @version 1.0
26 | * @author Rahul Sharma
27 | * @author Ram Jeyaraman
28 | */
29 | public class CommException extends jakarta.resource.ResourceException {
30 |
31 | /**
32 | * Constructs a new instance with null as its detail message.
33 | */
34 | public CommException() { super(); }
35 |
36 | /**
37 | * Constructs a new instance with the specified detail message.
38 | *
39 | * @param message the detail message.
40 | */
41 | public CommException(String message) {
42 | super(message);
43 | }
44 |
45 | /**
46 | * Constructs a new throwable with the specified cause.
47 | *
48 | * @param cause a chained exception of type Throwable
.
49 | */
50 | public CommException(Throwable cause) {
51 | super(cause);
52 | }
53 |
54 | /**
55 | * Constructs a new throwable with the specified detail message and cause.
56 | *
57 | * @param message the detail message.
58 | *
59 | * @param cause a chained exception of type Throwable
.
60 | */
61 | public CommException(String message, Throwable cause) {
62 | super(message, cause);
63 | }
64 |
65 | /**
66 | * Constructs a new throwable with the specified detail message and
67 | * an error code.
68 | *
69 | * @param message a description of the exception.
70 | * @param errorCode a string specifying the vendor specific error code.
71 | */
72 | public CommException(String message, String errorCode) {
73 | super(message, errorCode);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ConfigProperty.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.resource.spi;
18 |
19 | import java.lang.annotation.Target;
20 | import static java.lang.annotation.ElementType.*;
21 | import java.lang.annotation.Documented;
22 | import java.lang.annotation.Retention;
23 | import static java.lang.annotation.RetentionPolicy.*;
24 |
25 | /**
26 | * Designates a JavaBean property as a configuration property
27 | *
28 | * @since 1.6
29 | */
30 |
31 | @Documented
32 | @Retention(RUNTIME)
33 | @Target( { FIELD, METHOD })
34 | public @interface ConfigProperty {
35 |
36 | /**
37 | * Inferred by the container if unspecified.
38 | * @return property type
39 | */
40 | Class type() default Object.class;
41 |
42 | /**
43 | * Describes the configuration property.
44 | * @return property description
45 | */
46 | String[] description() default {};
47 |
48 | /**
49 | * Inferred by the container for field based annotations if possible.
50 | * @return default value
51 | */
52 | String defaultValue() default "";
53 |
54 | /**
55 | * Indicates that the configuration tools must ignore considering this
56 | * Property during auto-discovery of Configuration properties.
57 | * @return true if configuration tools must ignore considering this
58 | * Property during auto-discovery of Configuration properties
59 | */
60 | boolean ignore() default false;
61 |
62 | /**
63 | * Indicates that the configuration property supports
64 | * dynamic updates to its value during the lifetime of
65 | * the JavaBean
66 | * @return true if the configuration property supports
67 | * dynamic updates
68 | */
69 | boolean supportsDynamicUpdates() default false;
70 |
71 | /**
72 | * Indicates that the configuration property is confidential and
73 | * recommends application server's configuration tools to
74 | * use special visual aids for editing them.
75 | * @return true if the configuration property is confidential
76 | */
77 | boolean confidential() default false;
78 | }
79 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ConnectionDefinition.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.resource.spi;
18 |
19 | import java.lang.annotation.Target;
20 | import static java.lang.annotation.ElementType.*;
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Documented;
23 | import java.lang.annotation.Repeatable;
24 | import static java.lang.annotation.RetentionPolicy.*;
25 |
26 | /**
27 | * Defines a set of connection interfaces and classes pertaining to a particular
28 | * connection type. This annotation can be placed only on a JavaBean that
29 | * implements the {@link ManagedConnectionFactory ManagedConnectionFactory}
30 | * interface.
31 | *
32 | * @since 1.6
33 | *
34 | */
35 |
36 | @Documented
37 | @Retention(RUNTIME)
38 | @Target(TYPE)
39 | @Repeatable(ConnectionDefinitions.class)
40 | public @interface ConnectionDefinition {
41 |
42 | /**
43 | * Specifies the ConnectionFactory interface supported by the resource
44 | * adapter. Example: jakarta.resource.cci.ConnectionFactory or
45 | * com.wombat.ConnectionFactory
46 | * @return the ConnectionFactory interface
47 | */
48 | Class connectionFactory();
49 |
50 | /**
51 | * Specifies the Class provided by the resource adapter that implements the
52 | * resource adapter specific ConnectionFactory interface. Example:
53 | * com.wombat.ConnectionFactoryImpl
54 | * @return the implementation class of the ConnectionFactory interface
55 | */
56 | Class connectionFactoryImpl();
57 |
58 | /**
59 | * Specifies the Connection interface supported by the resource adapter.
60 | * Example: jakarta.resource.cci.Connection or com.wombat.Connection
61 | * @return the Connection interface
62 | */
63 | Class connection();
64 |
65 | /**
66 | * Specifies the class provided by the resource adapter that implements the
67 | * resource adapter specific Connection interface. Example:
68 | * com.wombat.ConnectionImpl
69 | * @return the implementation class of the Connection interface
70 | */
71 | Class connectionImpl();
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ConnectionDefinitions.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.resource.spi;
18 |
19 | import java.lang.annotation.Target;
20 | import static java.lang.annotation.ElementType.*;
21 | import java.lang.annotation.Retention;
22 | import java.lang.annotation.Documented;
23 | import static java.lang.annotation.RetentionPolicy.*;
24 |
25 | /**
26 | * Defines a set of connection definitions that the JavaBean, that has been
27 | * annotated with this annotation, is a part of. This annotation can be placed
28 | * only on a JavaBean that implements the {@link ManagedConnectionFactory
29 | * ManagedConnectionFactory} interface.
30 | *
31 | * @since 1.6
32 | */
33 |
34 | @Documented
35 | @Retention(RUNTIME)
36 | @Target(TYPE)
37 | public @interface ConnectionDefinitions {
38 |
39 | /**
40 | * An array of {@link ConnectionDefinition ConnectionDefinition}s associated
41 | * with the ManagedConectionFactory
JavaBean.
42 | *
43 | * @return an array of ConnectionDefinition
s associated with
44 | * the ManagedConnectionFactory
instance.
45 | */
46 | ConnectionDefinition[] value();
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ConnectionRequestInfo.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.resource.spi;
18 |
19 | /** ManagedConnection
implementation. An implementation of this
24 | * interface must support the lazy connection association optimization.
25 | *
26 | * @version 1.0
27 | * @author Ram Jeyaraman
28 | */
29 | public interface DissociatableManagedConnection {
30 |
31 | /**
32 | * This method is called by an application server (that is capable of lazy
33 | * connection association optimization) in order to dissociate a
34 | * ManagedConnection
instance from all of its connection
35 | * handles.
36 | *
37 | * @throws ResourceException
38 | * generic exception if operation fails.
39 | *
40 | * @throws ResourceAdapterInternalException
41 | * resource adapter internal error condition
42 | *
43 | * @throws IllegalStateException
44 | * Illegal state for dissociating a
45 | * ManagedConnection
from all of its connection
46 | * handles.
47 | */
48 | void dissociateConnections() throws ResourceException;
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/EISSystemException.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.resource.spi;
18 |
19 | /**
20 | * An EISSystemException
is used to indicate any EIS
21 | * specific system-level
22 | * error conditions. The common error conditions are: failure or inactivity of
23 | * an EIS instance, communication failure and EIS specific error in the
24 | * creation of a new physical connection.
25 | *
26 | * @version 1.0
27 | * @author Rahul Sharma
28 | * @author Ram Jeyaraman
29 | */
30 |
31 | public class EISSystemException extends jakarta.resource.ResourceException {
32 |
33 | /**
34 | * Constructs a new instance with null as its detail message.
35 | */
36 | public EISSystemException() { super(); }
37 |
38 | /**
39 | * Constructs a new instance with the specified detail message.
40 | *
41 | * @param message the detail message.
42 | */
43 | public EISSystemException(String message) {
44 | super(message);
45 | }
46 |
47 | /**
48 | * Constructs a new throwable with the specified cause.
49 | *
50 | * @param cause a chained exception of type Throwable
.
51 | */
52 | public EISSystemException(Throwable cause) {
53 | super(cause);
54 | }
55 |
56 | /**
57 | * Constructs a new throwable with the specified detail message and cause.
58 | *
59 | * @param message the detail message.
60 | *
61 | * @param cause a chained exception of type Throwable
.
62 | */
63 | public EISSystemException(String message, Throwable cause) {
64 | super(message, cause);
65 | }
66 |
67 | /**
68 | * Constructs a new throwable with the specified detail message and
69 | * an error code.
70 | *
71 | * @param message a description of the exception.
72 | * @param errorCode a string specifying the vendor specific error code.
73 | */
74 | public EISSystemException(String message, String errorCode) {
75 | super(message, errorCode);
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/IllegalStateException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2004, 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.resource.spi;
18 |
19 | /**
20 | * An IllegalStateException
21 | * is thrown from a method if the callee (resource
22 | * adapter or application server for system contracts) is in an illegal or
23 | * inappropriate state for the method invocation.
24 | *
25 | * @version 1.0
26 | * @author Rahul Sharma
27 | * @author Ram Jeyaraman
28 | */
29 |
30 | public class IllegalStateException extends jakarta.resource.ResourceException {
31 |
32 | /**
33 | * Constructs a new instance with null as its detail message.
34 | */
35 | public IllegalStateException() { super(); }
36 |
37 | /**
38 | * Constructs a new instance with the specified detail message.
39 | *
40 | * @param message the detail message.
41 | */
42 | public IllegalStateException(String message) {
43 | super(message);
44 | }
45 |
46 | /**
47 | * Constructs a new throwable with the specified cause.
48 | *
49 | * @param cause a chained exception of type Throwable
.
50 | */
51 | public IllegalStateException(Throwable cause) {
52 | super(cause);
53 | }
54 |
55 | /**
56 | * Constructs a new throwable with the specified detail message and cause.
57 | *
58 | * @param message the detail message.
59 | *
60 | * @param cause a chained exception of type Throwable
.
61 | */
62 | public IllegalStateException(String message, Throwable cause) {
63 | super(message, cause);
64 | }
65 |
66 | /**
67 | * Constructs a new throwable with the specified detail message and
68 | * an error code.
69 | *
70 | * @param message a description of the exception.
71 | * @param errorCode a string specifying the vendor specific error code.
72 | */
73 | public IllegalStateException(String message, String errorCode) {
74 | super(message, errorCode);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/InvalidPropertyException.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.resource.spi;
18 |
19 | import java.beans.PropertyDescriptor;
20 |
21 | /**
22 | * This exception is thrown to indicate invalid configuration
23 | * property settings.
24 | *
25 | * @version 0.2
26 | * @author Ram Jeyaraman
27 | */
28 | public class InvalidPropertyException
29 | extends jakarta.resource.ResourceException {
30 |
31 | /*
32 | * Holder for invalid properties.
33 | */
34 | private PropertyDescriptor[] invalidProperties;
35 |
36 | /**
37 | * Create a InvalidPropertyException.
38 | */
39 | public InvalidPropertyException() {
40 | super();
41 | }
42 |
43 | /**
44 | * Create a InvalidPropertyException.
45 | *
46 | * @param message a description of the exception
47 | */
48 | public InvalidPropertyException(String message) {
49 | super(message);
50 | }
51 |
52 | /**
53 | * Constructs a new throwable with the specified cause.
54 | *
55 | * @param cause a chained exception of type Throwable
.
56 | */
57 | public InvalidPropertyException(Throwable cause) {
58 | super(cause);
59 | }
60 |
61 | /**
62 | * Constructs a new throwable with the specified detail message and cause.
63 | *
64 | * @param message the detail message.
65 | *
66 | * @param cause a chained exception of type Throwable
.
67 | */
68 | public InvalidPropertyException(String message, Throwable cause) {
69 | super(message, cause);
70 | }
71 |
72 | /**
73 | * Constructs a new throwable with the specified detail message and
74 | * an error code.
75 | *
76 | * @param message a description of the exception.
77 | * @param errorCode a string specifying the vendor specific error code.
78 | */
79 | public InvalidPropertyException(String message, String errorCode) {
80 | super(message, errorCode);
81 | }
82 |
83 | /**
84 | * Set a list of invalid properties.
85 | * @param invalidProperties set of invalid property descriptors
86 | */
87 | public void setInvalidPropertyDescriptors(
88 | PropertyDescriptor[] invalidProperties) {
89 | this.invalidProperties = invalidProperties;
90 | }
91 |
92 | /**
93 | * Get the list of invalid properties.
94 | * @return property descriptors
95 | */
96 | public PropertyDescriptor[] getInvalidPropertyDescriptors() {
97 | return this.invalidProperties;
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/LazyAssociatableConnectionManager.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.resource.spi;
18 |
19 | import jakarta.resource.ResourceException;
20 |
21 | /**
22 | * This is a mix-in interface that may be optionally implemented by a
23 | * ConnectionManager
implementation. An implementation of
24 | * this interface must support the lazy connection association optimization.
25 | *
26 | * @version 1.0
27 | * @author Ram Jeyaraman
28 | */
29 | public interface LazyAssociatableConnectionManager {
30 |
31 | /**
32 | * This method is called by a resource adapter (that is capable of
33 | * lazy connection association optimization) in order to lazily associate
34 | * a connection object with a ManagedConnection
instance.
35 | *
36 | * @param connection the connection object that is to be associated.
37 | *
38 | * @param mcf The ManagedConnectionFactory
instance that was
39 | * originally used to create the connection object.
40 | *
41 | * @param cxReqInfo connection request information. This information must
42 | * be the same as that used to originally create the connection object.
43 | *
44 | * @throws ResourceException Generic exception.
45 | *
46 | * @throws ApplicationServerInternalException
47 | * Application server specific exception.
48 | *
49 | * @throws SecurityException Security related error.
50 | *
51 | * @throws ResourceAllocationException
52 | * Failed to allocate system resources for
53 | * connection request.
54 | * @throws ResourceAdapterInternalException
55 | * Resource adapter related error condition.
56 | */
57 | void associateConnection(Object connection, ManagedConnectionFactory mcf,
58 | ConnectionRequestInfo cxReqInfo) throws ResourceException;
59 |
60 | /**
61 | * This method is called by the resource adapter (that is capable of
62 | * lazy connection association optimization) in order to notify the
63 | * application server that a disassociated connection handle is closed.
64 | * ManagedConnectionFactory
instance that was
71 | * originally used to create the connection object.
72 | *
73 | * @since 1.6
74 | */
75 | void inactiveConnectionClosed(Object connection,
76 | ManagedConnectionFactory mcf);
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/LazyEnlistableConnectionManager.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.resource.spi;
18 |
19 | import jakarta.resource.ResourceException;
20 |
21 | /**
22 | * This is a mix-in interface that may be optionally implemented by a
23 | * ConnectionManager
implementation. An implementation of
24 | * this interface must support the lazy transaction enlistment optimization.
25 | *
26 | * @version 1.0
27 | * @author Ram Jeyaraman
28 | */
29 | public interface LazyEnlistableConnectionManager {
30 |
31 | /**
32 | * This method is called by a resource adapter (that is capable of
33 | * lazy transaction enlistment optimization) in order to lazily enlist
34 | * a connection object with a XA transaction.
35 | *
36 | * @param mc The ManagedConnection
instance that needs to be
37 | * lazily associated.
38 | *
39 | * @throws ResourceException Generic exception.
40 | *
41 | * @throws ApplicationServerInternalException
42 | * Application server specific exception.
43 | *
44 | * @throws ResourceAllocationException
45 | * Failed to allocate system resources for
46 | * connection request.
47 | *
48 | * @throws ResourceAdapterInternalException
49 | * Resource adapter related error condition.
50 | */
51 | void lazyEnlist(ManagedConnection mc) throws ResourceException;
52 | }
53 |
54 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/LazyEnlistableManagedConnection.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.resource.spi;
18 |
19 | /**
20 | * This is a mix-in interface that may be optionally implemented by a
21 | * ManagedConnection
implementation. An implementation of
22 | * this interface must support the lazy transaction enlistment optimization.
23 | *
24 | * @version 1.0
25 | * @author Ram Jeyaraman
26 | */
27 | public interface LazyEnlistableManagedConnection {
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/LocalTransaction.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.resource.spi;
18 |
19 | import jakarta.resource.ResourceException;
20 |
21 | /** LocalTransaction interface provides support for transactions that
22 | * are managed internal to an EIS resource manager, and do not require
23 | * an external transaction manager.
24 | *
25 | * LocalTransactionException
represents various
21 | * error conditions related to the local transaction management contract.
22 | * The Jakarta™ Transactions specification specifies the
23 | * javax.transaction.xa.XAException
class for exceptions
24 | * related to XAResource based transaction management contract.
25 | *
26 | * LocalTransactionException
is used for the local
27 | * transaction management contract to indicate the following common
28 | * error conditions:
29 | *
30 | *
46 | *
47 | * @version 1.0
48 | * @author Rahul Sharma
49 | * @author Ram Jeyaraman
50 | */
51 |
52 | public class LocalTransactionException
53 | extends jakarta.resource.ResourceException {
54 |
55 | /**
56 | * Constructs a new instance with null as its detail message.
57 | */
58 | public LocalTransactionException() { super(); }
59 |
60 | /**
61 | * Constructs a new instance with the specified detail message.
62 | *
63 | * @param message the detail message.
64 | */
65 | public LocalTransactionException(String message) {
66 | super(message);
67 | }
68 |
69 | /**
70 | * Constructs a new throwable with the specified cause.
71 | *
72 | * @param cause a chained exception of type commit
method on
32 | * LocalTransaction
object without an active
33 | * local transaction is an error condition.
34 | * commit
method call on the LocalTransaction
36 | * object.
37 | * ManagedConnection
that is already associated with
39 | * an active local transaction.
40 | * Throwable
.
73 | */
74 | public LocalTransactionException(Throwable cause) {
75 | super(cause);
76 | }
77 |
78 | /**
79 | * Constructs a new throwable with the specified detail message and cause.
80 | *
81 | * @param message the detail message.
82 | *
83 | * @param cause a chained exception of type Throwable
.
84 | */
85 | public LocalTransactionException(String message, Throwable cause) {
86 | super(message, cause);
87 | }
88 |
89 | /**
90 | * Constructs a new throwable with the specified detail message and
91 | * an error code.
92 | *
93 | * @param message a description of the exception.
94 | * @param errorCode a string specifying the vendor specific error code.
95 | */
96 | public LocalTransactionException(String message, String errorCode) {
97 | super(message, errorCode);
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ManagedConnectionMetaData.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.resource.spi;
18 |
19 | import jakarta.resource.ResourceException;
20 |
21 | /** The ManagedConnectionMetaData interface provides information about the
22 | * underlying EIS instance associated with a ManagedConnection instance.
23 | * An application server uses this information to get runtime information
24 | * about a connected EIS instance.
25 | *
26 | * ResourceAdapter
object with other objects that
24 | * implement this interface like
25 | * ManagedConnectionFactory
and ActivationSpec
.
26 | *
27 | * @version 1.0
28 | * @author Ram Jeyaraman
29 | */
30 | public interface ResourceAdapterAssociation {
31 |
32 | /**
33 | * Get the associated ResourceAdapter
object.
34 | *
35 | * @return the associated ResourceAdapter
object.
36 | */
37 | ResourceAdapter getResourceAdapter();
38 |
39 | /**
40 | * Associate this object with a ResourceAdapter
object.
41 | * Note, this method must be called exactly once. That is, the
42 | * association must not change during the lifetime of this object.
43 | *
44 | * @param ra ResourceAdapter
object to be associated with.
45 | *
46 | * @throws ResourceException generic exception.
47 | *
48 | * @throws ResourceAdapterInternalException
49 | * resource adapter related error condition.
50 | *
51 | * @throws IllegalStateException indicates that this object is in an
52 | * illegal state for the method invocation. For example, this occurs when
53 | * this method is called more than once on the same object.
54 | */
55 | void setResourceAdapter(ResourceAdapter ra) throws ResourceException;
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ResourceAdapterInternalException.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.resource.spi;
18 |
19 | /**
20 | * A ResourceAdapterInternalException
indicates any
21 | * system-level error conditions related to a resource adapter.
22 | * The common conditions indicated by this exception type are:
23 | *
24 | *
31 | *
32 | * @version 1.0
33 | * @author Rahul Sharma
34 | * @author Ram Jeyaraman
35 | */
36 |
37 | public class ResourceAdapterInternalException
38 | extends jakarta.resource.ResourceException {
39 |
40 | /**
41 | * Constructs a new instance with null as its detail message.
42 | */
43 | public ResourceAdapterInternalException() { super(); }
44 |
45 | /**
46 | * Constructs a new instance with the specified detail message.
47 | *
48 | * @param message the detail message.
49 | */
50 | public ResourceAdapterInternalException(String message) {
51 | super(message);
52 | }
53 |
54 | /**
55 | * Constructs a new throwable with the specified cause.
56 | *
57 | * @param cause a chained exception of type Throwable
.
58 | */
59 | public ResourceAdapterInternalException(Throwable cause) {
60 | super(cause);
61 | }
62 |
63 | /**
64 | * Constructs a new throwable with the specified detail message and cause.
65 | *
66 | * @param message the detail message.
67 | *
68 | * @param cause a chained exception of type Throwable
.
69 | */
70 | public ResourceAdapterInternalException(String message, Throwable cause) {
71 | super(message, cause);
72 | }
73 |
74 | /**
75 | * Constructs a new throwable with the specified detail message and
76 | * an error code.
77 | *
78 | * @param message a description of the exception.
79 | * @param errorCode a string specifying the vendor specific error code.
80 | */
81 | public ResourceAdapterInternalException(String message, String errorCode) {
82 | super(message, errorCode);
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ResourceAllocationException.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.resource.spi;
18 |
19 | /**
20 | * A ResourceAllocationException
can be thrown by an
21 | * application server or
22 | * resource adapter to indicate any failure to allocate system resources
23 | * (example: threads, physical connections). An example is error condition
24 | * when an upper bound is reached on the maximum number of physical
25 | * connections that can be managed by an application server specific
26 | * connection pool.
27 | *
28 | * @version 1.0
29 | * @author Rahul Sharma
30 | * @author Ram Jeyaraman
31 | */
32 |
33 | public class ResourceAllocationException
34 | extends jakarta.resource.ResourceException {
35 |
36 | /**
37 | * Constructs a new instance with null as its detail message.
38 | */
39 | public ResourceAllocationException() { super(); }
40 |
41 | /**
42 | * Constructs a new instance with the specified detail message.
43 | *
44 | * @param message the detail message.
45 | */
46 | public ResourceAllocationException(String message) {
47 | super(message);
48 | }
49 |
50 | /**
51 | * Constructs a new throwable with the specified cause.
52 | *
53 | * @param cause a chained exception of type Throwable
.
54 | */
55 | public ResourceAllocationException(Throwable cause) {
56 | super(cause);
57 | }
58 |
59 | /**
60 | * Constructs a new throwable with the specified detail message and cause.
61 | *
62 | * @param message the detail message.
63 | *
64 | * @param cause a chained exception of type Throwable
.
65 | */
66 | public ResourceAllocationException(String message, Throwable cause) {
67 | super(message, cause);
68 | }
69 |
70 | /**
71 | * Constructs a new throwable with the specified detail message and
72 | * an error code.
73 | *
74 | * @param message a description of the exception.
75 | * @param errorCode a string specifying the vendor specific error code.
76 | */
77 | public ResourceAllocationException(String message, String errorCode) {
78 | super(message, errorCode);
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/RetryableException.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.resource.spi;
18 |
19 | import java.io.Serializable;
20 |
21 | /**
22 | * A marker interface indicating that the Exception is transient. It is used
23 | * in situations where a previously failed operation might be able to succeed
24 | * if the resource adapter performs some recovery steps and retries the
25 | * operation.
26 | *
27 | * @since 1.6
28 | */
29 | public interface RetryableException extends Serializable {
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/RetryableUnavailableException.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.resource.spi;
18 |
19 | /**
20 | * A subclass of the UnavailableException
that
21 | * indicates that the rejection of the work submission is transient.
22 | * It is thrown in situations where the previously failed work submission
23 | * might be able to succeed if the resource adapter retries the operation
24 | * at a later point in time.
25 | *
26 | * @since 1.6
27 | */
28 | public class RetryableUnavailableException
29 | extends UnavailableException
30 | implements RetryableException {
31 | /**
32 | * Determines if a deserialized instance of this class
33 | * is compatible with this class.
34 | */
35 | private static final long serialVersionUID = 3730185319227786830L;
36 |
37 | /**
38 | * Constructs a new instance with null as its detail message.
39 | */
40 | public RetryableUnavailableException() {
41 | super();
42 | }
43 |
44 | /**
45 | * Constructs a new instance with the specified detail message.
46 | *
47 | * @param message the detail message.
48 | */
49 | public RetryableUnavailableException(String message) {
50 | super(message);
51 | }
52 |
53 | /**
54 | * Constructs a new throwable with the specified cause.
55 | *
56 | * @param cause a chained exception of type
57 | * Throwable
.
58 | */
59 | public RetryableUnavailableException(Throwable cause) {
60 | super(cause);
61 | }
62 |
63 | /**
64 | * Constructs a new throwable with the specified detail message and cause.
65 | *
66 | * @param message the detail message.
67 | *
68 | * @param cause a chained exception of type
69 | * Throwable
.
70 | */
71 | public RetryableUnavailableException(String message, Throwable cause) {
72 | super(message, cause);
73 | }
74 |
75 | /**
76 | * Constructs a new throwable with the specified detail message and
77 | * an error code.
78 | *
79 | * @param message a description of the exception.
80 | * @param errorCode a string specifying the vendor specific error code.
81 | */
82 | public RetryableUnavailableException(String message, String errorCode) {
83 | super(message, errorCode);
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/SecurityException.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.resource.spi;
18 |
19 | /**
20 | * A SecurityException
indicates error conditions
21 | * related to the security
22 | * contract between an application server and resource adapter. The common
23 | * error conditions represented by this exception are:
24 | *
25 | *
38 | *
39 | * @version 1.0
40 | * @author Rahul Sharma
41 | * @author Ram Jeyaraman
42 | */
43 |
44 | public class SecurityException extends jakarta.resource.ResourceException {
45 |
46 | /**
47 | * Constructs a new instance with null as its detail message.
48 | */
49 | public SecurityException() { super(); }
50 |
51 | /**
52 | * Constructs a new instance with the specified detail message.
53 | *
54 | * @param message the detail message.
55 | */
56 | public SecurityException(String message) {
57 | super(message);
58 | }
59 |
60 | /**
61 | * Constructs a new throwable with the specified cause.
62 | *
63 | * @param cause a chained exception of type Throwable
.
64 | */
65 | public SecurityException(Throwable cause) {
66 | super(cause);
67 | }
68 |
69 | /**
70 | * Constructs a new throwable with the specified detail message and cause.
71 | *
72 | * @param message the detail message.
73 | *
74 | * @param cause a chained exception of type Throwable
.
75 | */
76 | public SecurityException(String message, Throwable cause) {
77 | super(message, cause);
78 | }
79 |
80 | /**
81 | * Constructs a new throwable with the specified detail message and
82 | * an error code.
83 | *
84 | * @param message a description of the exception.
85 | * @param errorCode a string specifying the vendor specific error code.
86 | */
87 | public SecurityException(String message, String errorCode) {
88 | super(message, errorCode);
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/SecurityPermission.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.resource.spi;
18 |
19 | import java.lang.annotation.Target;
20 | import java.lang.annotation.Retention;
21 | import java.lang.annotation.Documented;
22 | import static java.lang.annotation.RetentionPolicy.*;
23 |
24 | /**
25 | * The SecurityPermission annotation can be used by the developer, as part of
26 | * the Connector annotation, to specify the extended security permissions
27 | * required by the resource adapter
28 | *
29 | * @since 1.6
30 | */
31 |
32 | @Documented
33 | @Retention(RUNTIME)
34 | @Target({})
35 | /* The SecurityPermission
declared type is intended
36 | solely for use as a member type in complex annotation type declarations
37 | like Connector
.
38 | */
39 |
40 | public @interface SecurityPermission {
41 | /**
42 | * Specifies an optional description to mention any specific reason that a
43 | * resource requires a given security permission.
44 | * @return description
45 | */
46 | String[] description() default {};
47 |
48 | /**
49 | * Specifies a security permission based on the Security policy file syntax.
50 | * These security permissions are different from those required by the
51 | * default permission set as specified in the connector specification.
52 | * @return permissionSpec
53 | */
54 | String permissionSpec() default "";
55 | }
56 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/SharingViolationException.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.resource.spi;
18 |
19 | /**
20 | * This is thrown to indicate a connection sharing violation.
21 | *
22 | * Throwable
.
50 | */
51 | public SharingViolationException(Throwable cause) {
52 | super(cause);
53 | }
54 |
55 | /**
56 | * Constructs a new throwable with the specified detail message and cause.
57 | *
58 | * @param message the detail message.
59 | *
60 | * @param cause a chained exception of type
61 | * Throwable
.
62 | */
63 | public SharingViolationException(String message, Throwable cause) {
64 | super(message, cause);
65 | }
66 |
67 | /**
68 | * Constructs a new throwable with the specified detail message and
69 | * error code.
70 | *
71 | * @param message a description of the exception.
72 | * @param errorCode a string specifying the vendor specific error code.
73 | */
74 | public SharingViolationException(String message, String errorCode) {
75 | super(message, errorCode);
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/TransactionSupport.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.resource.spi;
18 |
19 | /**
20 | * This interface may be optionally implemented by a
21 | * ManagedConnectionFactory
to provide its level of transaction
22 | * support at runtime.
23 | *
24 | * ManagedConnectionFactory
implements this interface,
25 | * the application server uses the TransactionSupportLevel
returned
26 | * by getTransactionSupport() method and not the value specified in the
27 | * resource adapter deployment descriptor or deployer configuration
28 | *
29 | * @since 1.6
30 | */
31 | public interface TransactionSupport extends java.io.Serializable {
32 |
33 | /**
34 | * An enumerated type that represents the levels of transaction support
35 | * a resource adapter may support.
36 | *
37 | * @since 1.6
38 | */
39 | public enum TransactionSupportLevel {
40 | /**
41 | * The resource adapter supports neither resource manager nor Jakarta™ Transactions
42 | * transactions.
43 | * @since 1.6
44 | */
45 | NoTransaction,
46 | /**
47 | * The resource adapter supports resource manager local transactions
48 | * by implementing the LocalTransaction
interface.
49 | * @since 1.6
50 | */
51 | LocalTransaction,
52 | /**
53 | * The resource adapter supports both resource manager local
54 | * and Jakarta Transactions transactions by implementing the LocalTransaction
55 | * and XAResource
interfaces.
56 | * @since 1.6
57 | */
58 | XATransaction
59 | }
60 |
61 | /**
62 | * Get the level of transaction support, supported by the
63 | * ManagedConnectionFactory
. A resource adapter must always
64 | * return a level of transaction support whose ordinal value in
65 | * TransactionSupportLevel
enum is equal to or lesser than
66 | * the resource adapter's transaction support classification.
67 | * @return transaction support level
68 | * @since 1.6
69 | */
70 | public TransactionSupportLevel getTransactionSupport();
71 | }
72 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/UnavailableException.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.resource.spi;
18 |
19 | /**
20 | * This is thrown to indicate that a service is unavailable.
21 | *
22 | * @version 1.0
23 | * @author Ram Jeyaraman
24 | */
25 | public class UnavailableException extends jakarta.resource.ResourceException {
26 |
27 | /**
28 | * Constructs a new instance with null as its detail message.
29 | */
30 | public UnavailableException() { super(); }
31 |
32 | /**
33 | * Constructs a new instance with the specified detail message.
34 | *
35 | * @param message the detail message.
36 | */
37 | public UnavailableException(String message) {
38 | super(message);
39 | }
40 |
41 | /**
42 | * Constructs a new throwable with the specified cause.
43 | *
44 | * @param cause a chained exception of type
45 | * Throwable
.
46 | */
47 | public UnavailableException(Throwable cause) {
48 | super(cause);
49 | }
50 |
51 | /**
52 | * Constructs a new throwable with the specified detail message and cause.
53 | *
54 | * @param message the detail message.
55 | *
56 | * @param cause a chained exception of type
57 | * Throwable
.
58 | */
59 | public UnavailableException(String message, Throwable cause) {
60 | super(message, cause);
61 | }
62 |
63 | /**
64 | * Constructs a new throwable with the specified detail message and
65 | * an error code.
66 | *
67 | * @param message a description of the exception.
68 | * @param errorCode a string specifying the vendor specific error code.
69 | */
70 | public UnavailableException(String message, String errorCode) {
71 | super(message, errorCode);
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/ValidatingManagedConnectionFactory.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.resource.spi;
18 |
19 | import java.util.Set;
20 | import jakarta.resource.ResourceException;
21 |
22 | /**
23 | * This interface is implemented by a ManagedConnectionFactory
24 | * instance that supports the ability to validate
25 | * ManagedConnection
objects.
26 | *
27 | * ManagedConnection
objects from its connection pool.
29 | *
30 | * ManagedConnection
by passing in a
32 | * Set
of size one( with the ManagedConnection
33 | * that has to be tested for validity as the only member of the
34 | * Set
.
35 | *
36 | *
37 | * @author Ram Jeyaraman
38 | * @version 1.0
39 | */
40 | public interface ValidatingManagedConnectionFactory {
41 |
42 | /**
43 | * This method returns a set of invalid ManagedConnection
44 | * objects chosen from a specified set of ManagedConnection
45 | * objects.
46 | *
47 | * @param connectionSet a set of ManagedConnection
objects
48 | * that need to be validated.
49 | *
50 | * @return a set of invalid ManagedConnection
objects.
51 | *
52 | * @throws ResourceException generic exception.
53 | */
54 | Set getInvalidConnections(Set connectionSet) throws ResourceException;
55 | }
56 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/endpoint/MessageEndpoint.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.resource.spi.endpoint;
18 |
19 | import jakarta.resource.ResourceException;
20 | import jakarta.resource.spi.IllegalStateException;
21 | import jakarta.resource.spi.UnavailableException;
22 | import jakarta.resource.spi.ApplicationServerInternalException;
23 |
24 | /**
25 | * This defines a contract for a message endpoint. This is implemented by an
26 | * application server.
27 | *
28 | * @version 1.0
29 | * @author Ram Jeyaraman
30 | */
31 | public interface MessageEndpoint {
32 |
33 | /**
34 | * This is called by a resource adapter before a message is delivered.
35 | *
36 | * @param method description of a target method. This information about
37 | * the intended target method allows an application server to decide
38 | * whether to start a transaction during this method call, depending
39 | * on the transaction preferences of the target method.
40 | * The processing (by the application server) of the actual message
41 | * delivery method call on the endpoint must be independent of the
42 | * class loader associated with this descriptive method object.
43 | *
44 | * @throws NoSuchMethodException indicates that the specified method
45 | * does not exist on the target endpoint.
46 | *
47 | * @throws ResourceException generic exception.
48 | *
49 | * @throws ApplicationServerInternalException indicates an error
50 | * condition in the application server.
51 | *
52 | * @throws IllegalStateException indicates that the endpoint is in an
53 | * illegal state for the method invocation. For example, this occurs when
54 | * beforeDelivery
and afterDelivery
55 | * method calls are not paired.
56 | *
57 | * @throws UnavailableException indicates that the endpoint is not
58 | * available.
59 | */
60 | void beforeDelivery(java.lang.reflect.Method method)
61 | throws NoSuchMethodException, ResourceException;
62 |
63 | /**
64 | * This is called by a resource adapter after a message is delivered.
65 | *
66 | * @throws ResourceException generic exception.
67 | *
68 | * @throws ApplicationServerInternalException indicates an error
69 | * condition in the application server.
70 | *
71 | * @throws IllegalStateException indicates that the endpoint is in an
72 | * illegal state for the method invocation. For example, this occurs when
73 | * beforeDelivery and afterDelivery method calls are not paired.
74 | *
75 | * @throws UnavailableException indicates that the endpoint is not
76 | * available.
77 | */
78 | void afterDelivery() throws ResourceException;
79 |
80 | /**
81 | * This method may be called by the resource adapter to indicate that it
82 | * no longer needs a proxy endpoint instance. This hint may be used by
83 | * the application server for endpoint pooling decisions.
84 | */
85 | void release();
86 | }
87 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/endpoint/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 | * This package contains system contracts for service endpoint interactions.
19 | */
20 | package jakarta.resource.spi.endpoint;
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 | * The jakarta.resource.spi package contains APIs for the system
19 | * contracts defined in the Jakarta Connectors specification.
20 | */
21 | package jakarta.resource.spi;
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/security/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 | * The jakarta.resource.spi.security package contains APIs for the security
19 | * management contract.
20 | */
21 | package jakarta.resource.spi.security;
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/DistributableWork.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.resource.spi.work;
18 |
19 | import java.io.Serializable;
20 |
21 | /**
22 | * This models a Work
instance that would be distributed by a
23 | * DistributableWorkManager
for execution in a remote
24 | * DistributableWorkManager
25 | *
26 | * @since 1.6
27 | */
28 | public interface DistributableWork extends Work, Serializable {
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/DistributableWorkManager.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.resource.spi.work;
18 |
19 | /**
20 | * This interface models a WorkManager
that supports distributed
21 | * execution of Work instances.
22 | *
23 | * DistributableWorkManager
may choose to distribute a
25 | * Work
instance submitted by a resource adapter to another
26 | * WorkManager
instance running in a different Java™ virtual machine
27 | * (that is running in the same host or different hosts) for achieving optimal
28 | * resource utilization or for providing better response times.
29 | *
30 | * WorkManager
implementation that supports the submission of
32 | * DistributableWork
instances must implement the
33 | * DistributableWorkManager
marker interface.
34 | *
35 | * @since 1.6
36 | */
37 | public interface DistributableWorkManager extends WorkManager {
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/ExecutionContext.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.resource.spi.work;
18 |
19 | import jakarta.resource.NotSupportedException;
20 | import javax.transaction.xa.Xid;
21 |
22 | /**
23 | * This class models an execution context (transaction, security, etc)
24 | * with which the Work
instance must be executed.
25 | * This class is provided as a convenience for easily creating
26 | * ExecutionContext
instances by extending this class
27 | * and overriding only those methods of interest.
28 | *
29 | * ExecutionContext
30 | * to be a class rather than an interface:
31 | *
39 | *
40 | * Note: Resource adapters that are developed for Jakarta Connectors specification
41 | * compliant application servers, are recommended to use
42 | * the ExecutionContext
class evolves. For example, more context
36 | * types could be added to the ExecutionContext
class
37 | * (in the future) without forcing resource adapter implementations
38 | * to change.TransactionContext
interface instead of this
43 | * class. See Chapter.11 Generic Work Context in the Connectors 1.6
44 | * specification for more details.
45 | *
46 | * @version 1.0
47 | * @author Ram Jeyaraman
48 | */
49 | public class ExecutionContext {
50 |
51 | /**
52 | * transaction context.
53 | */
54 | private Xid xid;
55 |
56 | /**
57 | * transaction timeout value.
58 | */
59 | private long transactionTimeout = WorkManager.UNKNOWN;
60 |
61 |
62 | /**
63 | * set a transaction context.
64 | *
65 | * @param xid transaction context.
66 | */
67 | public void setXid(Xid xid) { this.xid = xid; }
68 |
69 | /**
70 | * @return an Xid object carrying a transaction context,
71 | * if any.
72 | */
73 | public Xid getXid() { return this.xid; }
74 |
75 | /**
76 | * Set the transaction timeout value for a imported transaction.
77 | *
78 | * @param timeout transaction timeout value in seconds. Only positive
79 | * non-zero values are accepted. Other values are illegal and are
80 | * rejected with a NotSupportedException
.
81 | *
82 | * @throws NotSupportedException thrown to indicate an illegal timeout
83 | * value.
84 | */
85 | public void setTransactionTimeout(long timeout)
86 | throws NotSupportedException {
87 | if (timeout > 0) {
88 | this.transactionTimeout = timeout;
89 | } else {
90 | throw new NotSupportedException("Illegal timeout value");
91 | }
92 | }
93 |
94 | /**
95 | * Get the transaction timeout value for a imported transaction.
96 | *
97 | * @return the specified transaction timeout value in seconds. When no
98 | * timeout value or an illegal timeout value had been specified, a value of
99 | * -1 (WorkManager.UNKNOWN
) is returned; the timeout
100 | * processing of such a transaction depends on the application server
101 | * implementation.
102 | */
103 | public long getTransactionTimeout() {
104 | return this.transactionTimeout;
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/HintsContext.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 | package jakarta.resource.spi.work;
17 |
18 | import java.io.Serializable;
19 | import java.util.Map;
20 | import java.util.HashMap;
21 |
22 | /**
23 | * A standard {@link WorkContext WorkContext} that allows a {@link Work Work}
24 | * instance to propagate quality-of-service (QoS) hints about the {@link Work
25 | * Work} to the WorkManager
.
26 | *
27 | * @since 1.6
28 | * @see jakarta.resource.spi.work.WorkContextProvider
29 | */
30 | public class HintsContext implements WorkContext {
31 |
32 | /**
33 | * Determines if a deserialized instance of this class is compatible with
34 | * this class.
35 | */
36 | private static final long serialVersionUID = 7956353628297167255L;
37 |
38 | public static final String NAME_HINT = "jakarta.resource.Name";
39 | public static final String LONGRUNNING_HINT = "jakarta.resource.LongRunning";
40 |
41 | protected String description = "Hints Context";
42 | protected String name = "HintsContext";
43 |
44 | /**
45 | * {@inheritDoc}
46 | */
47 | @Override
48 | public String getDescription() {
49 | return description;
50 | }
51 |
52 | /**
53 | * {@inheritDoc}
54 | */
55 | @Override
56 | public String getName() {
57 | return name;
58 | }
59 |
60 | /**
61 | * Set a brief description of the role played by the instance of
62 | * HintsContext and any other related debugging information.
63 | *
64 | * This could be used by the resource adapter and the WorkManager for
65 | * logging and debugging purposes.
66 | *
67 | * @param description The description
68 | */
69 | public void setDescription(String description) {
70 | this.description = description;
71 | }
72 |
73 | /**
74 | * Set the associated name of the HintsContext. This could be used by the
75 | * resource adapter and the WorkManager for logging and debugging purposes.
76 | *
77 | * @param name The name
78 | */
79 | public void setName(String name) {
80 | this.name = name;
81 | }
82 |
83 | MapWorkRejectedException
that
23 | * indicates that the the service unavailability is transient. It is thrown in
24 | * situations where the previously failed operation might be able to succeed if the
25 | * resource adapter performs some recovery steps and retries the operation.
26 | *
27 | * @since 1.6
28 | */
29 | public class RetryableWorkRejectedException extends WorkRejectedException
30 | implements RetryableException {
31 |
32 | /**
33 | * Determines if a deserialized instance of this class
34 | * is compatible with this class.
35 | */
36 | private static final long serialVersionUID = 8198870267352154108L;
37 |
38 | /**
39 | * Constructs a new instance with null as its detail message.
40 | */
41 | public RetryableWorkRejectedException() {
42 | super();
43 | }
44 |
45 | /**
46 | * Constructs a new instance with the specified detail message.
47 | *
48 | * @param message the detail message.
49 | */
50 | public RetryableWorkRejectedException(String message) {
51 | super(message);
52 | }
53 |
54 | /**
55 | * Constructs a new throwable with the specified cause.
56 | *
57 | * @param cause a chained exception of type Throwable
.
58 | */
59 | public RetryableWorkRejectedException(Throwable cause) {
60 | super(cause);
61 | }
62 |
63 | /**
64 | * Constructs a new throwable with the specified detail message and cause.
65 | *
66 | * @param message the detail message.
67 | *
68 | * @param cause a chained exception of type Throwable
.
69 | */
70 | public RetryableWorkRejectedException(String message, Throwable cause) {
71 | super(message, cause);
72 | }
73 |
74 | /**
75 | * Constructs a new throwable with the specified detail message and
76 | * an error code.
77 | *
78 | * @param message a description of the exception.
79 | * @param errorCode a string specifying the vendor specific error code.
80 | */
81 | public RetryableWorkRejectedException(String message, String errorCode) {
82 | super(message, errorCode);
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/TransactionContext.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.resource.spi.work;
18 |
19 | /**
20 | * A standard WorkContext
that allows a Work
instance
21 | * to propagate transaction related context information from an EIS to an
22 | * application server.
23 | * ExecutionContext
so that a resource adapter
26 | * developer could migrate their existing code from
27 | * ExecutionContext
to TransactionContext
easily.
28 | * Work
instance that would be executed by a
21 | * WorkManager
upon submission.
22 | *
23 | * @version 1.0
24 | * @author Ram Jeyaraman
25 | */
26 | public interface Work extends Runnable {
27 |
28 | /**
29 | * The WorkManager
might call this method to hint the
30 | * active Work
instance to complete execution as soon as
31 | * possible. This would be called on a separate thread other than the
32 | * one currently executing the Work
instance.
33 | */
34 | void release();
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkAdapter.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.resource.spi.work;
18 |
19 | /**
20 | * This class is provided as a convenience for easily creating
21 | * WorkListener
instances by extending this class
22 | * and overriding only those methods of interest.
23 | *
24 | * @version 1.0
25 | * @author Ram Jeyaraman
26 | */
27 | public class WorkAdapter implements WorkListener {
28 |
29 | /**
30 | * Invoked when a Work
instance has been accepted.
31 | */
32 | public void workAccepted(WorkEvent e) {}
33 |
34 | /**
35 | * Invoked when a Work
instance has been rejected.
36 | */
37 | public void workRejected(WorkEvent e) {}
38 |
39 | /**
40 | * Invoked when a Work
instance has started execution.
41 | * This only means that a thread has been allocated.
42 | */
43 | public void workStarted(WorkEvent e) {}
44 |
45 | /**
46 | * Invoked when a Work
instance has completed execution.
47 | */
48 | public void workCompleted(WorkEvent e) {}
49 | }
50 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkCompletedException.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.resource.spi.work;
18 |
19 | /**
20 | * This exception is thrown by a WorkManager
to indicate that
21 | * a submitted Work
instance has completed with an exception.
22 | *
23 | * Work
instance has started (that is, after a thread has
25 | * been allocated for Work
execution). The allocated thread sets
26 | * up an execution context (if it has been specified), and then calls
27 | * Work.run()
.
28 | *
29 | * Work
execution (that is, during Work.run()
) is
31 | * chained within this exception.
32 | *
33 | * WorkException.TX_RECREATE_FAILED
,
35 | * WorkException.TX_CONCURRENT_WORK_DISALLOWED
or
36 | * WorkException.UNDEFINED
.
37 | *
38 | * @version 1.0
39 | * @author Ram Jeyaraman
40 | */
41 | public class WorkCompletedException extends WorkException {
42 |
43 | /**
44 | * Constructs a new instance with null as its detail message.
45 | */
46 | public WorkCompletedException() { super(); }
47 |
48 | /**
49 | * Constructs a new instance with the specified detail message.
50 | *
51 | * @param message the detail message.
52 | */
53 | public WorkCompletedException(String message) {
54 | super(message);
55 | }
56 |
57 | /**
58 | * Constructs a new throwable with the specified cause.
59 | *
60 | * @param cause a chained exception of type
61 | * Throwable
.
62 | */
63 | public WorkCompletedException(Throwable cause) {
64 | super(cause);
65 | }
66 |
67 | /**
68 | * Constructs a new throwable with the specified detail message and cause.
69 | *
70 | * @param message the detail message.
71 | *
72 | * @param cause a chained exception of type
73 | * Throwable
.
74 | */
75 | public WorkCompletedException(String message, Throwable cause) {
76 | super(message, cause);
77 | }
78 |
79 | /**
80 | * Constructs a new throwable with the specified detail message and
81 | * an error code.
82 | *
83 | * @param message a description of the exception.
84 | * @param errorCode a string specifying the vendor specific error code.
85 | */
86 | public WorkCompletedException(String message, String errorCode) {
87 | super(message, errorCode);
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkContext.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.resource.spi.work;
18 |
19 | import java.io.Serializable;
20 |
21 | /**
22 | * This class serves as a standard mechanism for a resource adapter to propagate
23 | * an imported context from an enterprise information system to an application
24 | * server.
25 | *
26 | * Work
instance, that implements the
28 | * WorkContextProvider
, could provide a List
of these
29 | * WorkContext
instances (through the getWorkContexts() method),
30 | * and have them setup as the execution context by the WorkManager
31 | * when the Work
instance gets executed.
32 | *
33 | * The resource adapter must not make any changes to the state of the
34 | * WorkContext
after the Work
instance corresponding
35 | * to that WorkContext
has been submitted to the WorkManager
.
36 | *
37 | * @since 1.6
38 | */
39 |
40 | public interface WorkContext extends Serializable {
41 | /**
42 | * Get the associated name of the WorkContext
. This could be
43 | * used by the WorkManager and the resource adapter for debugging purposes.
44 | * WorkContext
47 | */
48 | String getName();
49 |
50 | /**
51 | * Get the brief description of the role played by the
52 | * WorkContext
and any other related debugging information.
53 | * This could be used by the WorkManager and the resource adapter for
54 | * debugging purposes.
55 | * WorkContext
58 | */
59 | String getDescription();
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkContextErrorCodes.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.resource.spi.work;
18 |
19 | /**
20 | * This class models the possible error conditions that might occur during
21 | * associating an WorkContext
with a Work
instance.
22 | *
23 | * WorkContext
types.
27 | *
28 | * @since 1.6
29 | */
30 | public class WorkContextErrorCodes {
31 |
32 | /**
33 | * Indicates that a WorkContext
type, that was not specified as
34 | * optional, passed in by the Work
instance is not supported by
35 | * the container.
36 | *
37 | * @since 1.6
38 | */
39 | public static final String UNSUPPORTED_CONTEXT_TYPE = "1";
40 |
41 | /**
42 | * Indicates that there are more than one instance of a WorkContext
43 | * type passed in by the Work
instance.
44 | * WorkContext
instance.
52 | * For TransactionContext
instances, the
53 | * WorkManager
must use this failure code when it should have
54 | * used {@link WorkException#TX_RECREATE_FAILED} as the error code.
55 | *
56 | * @since 1.6
57 | */
58 | public static final String CONTEXT_SETUP_FAILED = "3";
59 |
60 | /**
61 | * Indicates that the container cannot support recreating the
62 | * WorkContext
instance. For
63 | * TransactionContext
instances, the
64 | * WorkManager
must use this failure code when it should have
65 | * used {@link WorkException#TX_CONCURRENT_WORK_DISALLOWED} as the error
66 | * code.
67 | *
68 | * @since 1.6
69 | */
70 | public static final String CONTEXT_SETUP_UNSUPPORTED = "4";
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkContextLifecycleListener.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.resource.spi.work;
18 |
19 | /**
20 | * This class models the various events that occur during the processing of the
21 | * WorkContext
s associated with a Work
instance. This
22 | * interface may be implemented by a WorkContext
instance to
23 | * receive notifications from the WorkManager
when the
24 | * WorkContext
is set as the execution context of the
25 | * Work
instance it is associated with.
26 | * WorkManager
sets up the execution context of a
29 | * Work
instance that implements WorkContextProvider
,
30 | * the WorkManager
must make the relevant lifecycle notifications
31 | * if an WorkContext
instance implements this interface.
32 | * Work
instance is submitted to the Connector
35 | * WorkManager
using one of the methods that passes in a
36 | * WorkListener
as a parameter, the WorkManager
must
37 | * send Work
related notifications to the WorkListener
38 | * and WorkContext
setup related notifications to this interface.
39 | * WorkContext
with a Work
instance is captured in
43 | * {@link WorkContextErrorCodes}.
44 | * WorkContext
instance was successfully set
53 | * as the execution context for the Work
instance.
54 | *
55 | * @since 1.6
56 | */
57 | void contextSetupComplete();
58 |
59 | /**
60 | * Invoked when the WorkContext
instance was set as the
61 | * execution context for the Work
instance it was associated
62 | * with.
63 | *
64 | * @param errorCode
65 | * One of the error-codes defined in or subclasses of
66 | * {@link WorkContextErrorCodes WorkContextErrorCodes}
67 | * @since 1.6
68 | * @see WorkContextErrorCodes
69 | */
70 | void contextSetupFailed(String errorCode);
71 | }
72 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkContextProvider.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.resource.spi.work;
18 |
19 | import java.util.List;
20 | import java.io.Serializable;
21 |
22 | /**
23 | * This interface specifies the methods a {@link Work Work} instance uses to
24 | * associate a List
of {@link WorkContext WorkContext} instances to
25 | * be set when the Work
instance gets executed by a
26 | * {@link WorkManager WorkManager}.
27 | *
28 | * Work
instance could optionally implement this interface to
30 | * indicate to the WorkManager
, that the WorkContext
s
31 | * provided by this Work
instance through the
32 | * {@link #getWorkContexts() getWorkContexts} method must be used while setting
33 | * the execution context of the Work
instance.
34 | *
35 | * If the {@link #getWorkContexts() getWorkContexts} method returns an empty List
36 | * or null, the WorkManager must treat it as if no additional execution contexts
37 | * are associated with that Work instance.
38 | * WorkContexts
that needs to be used by the
46 | * WorkManager
to set up the execution context while executing
47 | * a Work
instance.
48 | *
49 | * @return an List
of WorkContext
instances.
50 | *
51 | */
52 | ListWork
processing related exceptions.
21 | *
22 | * @version 1.0
23 | * @author Ram Jeyaraman
24 | */
25 | public class WorkException extends jakarta.resource.ResourceException {
26 |
27 |
28 | /**
29 | * Indicates an internal error condition.
30 | */
31 | public static final String INTERNAL = "-1";
32 |
33 | /**
34 | * Undefined error code.
35 | */
36 | public static final String UNDEFINED = "0";
37 |
38 | /**
39 | * Indicates start timeout expiration.
40 | */
41 | public static final String START_TIMED_OUT = "1";
42 |
43 | /**
44 | * Indicates that concurrent work within a transaction is
45 | * disallowed. That is, there is already another Work
46 | * instance associated with the specified transaction context.
47 | */
48 | public static final String TX_CONCURRENT_WORK_DISALLOWED = "2";
49 |
50 | /**
51 | * Indicates a failure in recreating the specified transaction context.
52 | */
53 | public static final String TX_RECREATE_FAILED = "3";
54 |
55 | /**
56 | * Constructs a new instance with null as its detail message.
57 | */
58 | public WorkException() { super(); }
59 |
60 | /**
61 | * Constructs a new instance with the specified detail message.
62 | *
63 | * @param message the detail message.
64 | */
65 | public WorkException(String message) {
66 | super(message);
67 | }
68 |
69 | /**
70 | * Constructs a new throwable with the specified cause.
71 | *
72 | * @param cause a chained exception of type
73 | * Throwable
.
74 | */
75 | public WorkException(Throwable cause) {
76 | super(cause);
77 | }
78 |
79 | /**
80 | * Constructs a new throwable with the specified detail message and cause.
81 | *
82 | * @param message the detail message.
83 | *
84 | * @param cause a chained exception of type
85 | * Throwable
.
86 | */
87 | public WorkException(String message, Throwable cause) {
88 | super(message, cause);
89 | }
90 |
91 | /**
92 | * Constructs a new throwable with the specified detail message and
93 | * an error code.
94 | *
95 | * @param message a description of the exception.
96 | * @param errorCode a string specifying the vendor specific error code.
97 | */
98 | public WorkException(String message, String errorCode) {
99 | super(message, errorCode);
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkListener.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.resource.spi.work;
18 |
19 | import java.util.EventListener;
20 |
21 | /**
22 | * This models a WorkListener
instance which would be notified
23 | * by the WorkManager
when the various Work
24 | * processing events (work accepted, work rejected, work started,
25 | * work completed) occur.
26 | *
27 | * The WorkListener
instance must not make any thread
28 | * assumptions and must be thread-safe ie., a notification could
29 | * occur from any arbitrary thread. Further, it must not make any
30 | * assumptions on the ordering of notifications.
31 | *
32 | * @version 1.0
33 | * @author Ram Jeyaraman
34 | */
35 | public interface WorkListener extends EventListener {
36 |
37 | /**
38 | * Invoked when a Work
instance has been accepted.
39 | *
40 | * @param e A WorkEvent
object that provides more
41 | * information about the accepted Work.
42 | */
43 | void workAccepted(WorkEvent e);
44 |
45 | /**
46 | * Invoked when a Work
instance has been rejected.
47 | *
48 | * @param e A WorkEvent
object that provides more
49 | * information about the rejected Work.
50 | */
51 | void workRejected(WorkEvent e);
52 |
53 | /**
54 | * Invoked when a Work
instance has started execution.
55 | * This only means that a thread has been allocated.
56 | *
57 | * @param e A WorkEvent
object that provides more
58 | * information about the rejected Work.
59 | */
60 | void workStarted(WorkEvent e);
61 |
62 | /**
63 | * Invoked when a Work
instance has completed execution.
64 | *
65 | * @param e A WorkEvent
object that provides more
66 | * information about the completed Work.
67 | */
68 | void workCompleted(WorkEvent e);
69 | }
70 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/WorkRejectedException.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.resource.spi.work;
18 |
19 | /**
20 | * This exception is thrown by a WorkManager
to indicate
21 | * that a submitted Work
instance has been rejected. The
22 | * rejection could be due to internal factors or start timeout expiration.
23 | *
24 | * Work
instance starts (that is, before a
26 | * thread has been allocated for Work
execution).
27 |
28 | * WorkException.START_TIMED_OUT
,
30 | * WorkException.INTERNAL
or WorkException.UNDEFINED
.
31 | *
32 | * @version 1.0
33 | * @author Ram Jeyaraman
34 | */
35 | public class WorkRejectedException extends WorkException {
36 |
37 | /**
38 | * Constructs a new instance with null as its detail message.
39 | */
40 | public WorkRejectedException() { super(); }
41 |
42 | /**
43 | * Constructs a new instance with the specified detail message.
44 | *
45 | * @param message the detail message.
46 | */
47 | public WorkRejectedException(String message) {
48 | super(message);
49 | }
50 |
51 | /**
52 | * Constructs a new throwable with the specified cause.
53 | *
54 | * @param cause a chained exception of type Throwable
.
55 | */
56 | public WorkRejectedException(Throwable cause) {
57 | super(cause);
58 | }
59 |
60 | /**
61 | * Constructs a new throwable with the specified detail message and cause.
62 | *
63 | * @param message the detail message.
64 | *
65 | * @param cause a chained exception of type Throwable
.
66 | */
67 | public WorkRejectedException(String message, Throwable cause) {
68 | super(message, cause);
69 | }
70 |
71 | /**
72 | * Constructs a new throwable with the specified detail message and
73 | * an error code.
74 | *
75 | * @param message a description of the exception.
76 | * @param errorCode a string specifying the vendor specific error code.
77 | */
78 | public WorkRejectedException(String message, String errorCode) {
79 | super(message, errorCode);
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/api/src/main/java/jakarta/resource/spi/work/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 | * This package contains APIs for the Work Management, Generic and Security Work Context contracts.
19 | */
20 | package jakarta.resource.spi.work;
--------------------------------------------------------------------------------
/api/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 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 | * Jakarta Connectors API.
19 | */
20 | module jakarta.resource {
21 |
22 | requires java.desktop;
23 | requires transitive java.naming;
24 | requires transitive java.sql;
25 | requires transitive java.transaction.xa;
26 |
27 | requires jakarta.annotation;
28 | requires transitive jakarta.transaction;
29 |
30 | exports jakarta.resource;
31 | exports jakarta.resource.cci;
32 | exports jakarta.resource.spi;
33 | exports jakarta.resource.spi.endpoint;
34 | exports jakarta.resource.spi.security;
35 | exports jakarta.resource.spi.work;
36 | }
37 |
--------------------------------------------------------------------------------
/api/src/main/javadoc/doc-files/speclicense.html:
--------------------------------------------------------------------------------
1 |
2 | Eclipse Foundation Specification License - v1.0
7 |
19 |
27 |
28 | Disclaimers
52 |
53 |