Skip to content

Commit 66af16a

Browse files
Merge pull request #32817 from benjamin-confino/32585-JPA-CDI-Integration
32585 jpa cdi integration
2 parents a7a4ae7 + 534bbae commit 66af16a

File tree

39 files changed

+1786
-1
lines changed

39 files changed

+1786
-1
lines changed

dev/cnf/dependabot/check_this_in_if_it_changes/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,11 @@
17111711
<artifactId>jakarta.servlet-api</artifactId>
17121712
<version>6.1.0</version>
17131713
</dependency>
1714+
<dependency>
1715+
<groupId>jakarta.tck.arquillian</groupId>
1716+
<artifactId>tck-porting-lib</artifactId>
1717+
<version>11.0.1</version>
1718+
</dependency>
17141719
<dependency>
17151720
<groupId>jakarta.transaction</groupId>
17161721
<artifactId>jakarta.transaction-api</artifactId>

dev/cnf/oss_dependencies.maven

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ jakarta.servlet.jsp:jakarta.servlet.jsp-api:4.0.0
338338
jakarta.servlet:jakarta.servlet-api:5.0.0
339339
jakarta.servlet:jakarta.servlet-api:6.0.0
340340
jakarta.servlet:jakarta.servlet-api:6.1.0
341+
jakarta.tck.arquillian:tck-porting-lib:11.0.1
341342
jakarta.transaction:jakarta.transaction-api:1.3.3
342343
jakarta.transaction:jakarta.transaction-api:2.0.1
343344
jakarta.validation:jakarta.validation-api:3.0.2
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-include= ~${workspace}/cnf/resources/bnd/feature.props
2+
symbolicName=io.openliberty.jpaContainer32-cdi
3+
visibility=private
4+
IBM-App-ForceRestart: install, \
5+
uninstall
6+
IBM-Provision-Capability: \
7+
osgi.identity; filter:="(osgi.identity=io.openliberty.cdi-4.1)", \
8+
osgi.identity; filter:="(osgi.identity=io.openliberty.persistenceContainer-3.2)"
9+
-bundles=com.ibm.ws.jpa.container.v32.cdi
10+
IBM-Install-Policy: when-satisfied
11+
kind=beta
12+
edition=core
13+
WLP-Activation-Type: parallel

dev/com.ibm.ws.cdi.internal/src/com/ibm/ws/cdi/internal/interfaces/ContextBeginnerEnder.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
*******************************************************************************/
1010
package com.ibm.ws.cdi.internal.interfaces;
1111

12+
import java.util.Optional;
13+
14+
import com.ibm.websphere.csi.J2EEName;
1215
import com.ibm.ws.cdi.CDIException;
1316

1417
/**
@@ -89,4 +92,9 @@ public interface ContextBeginnerEnder extends AutoCloseable {
8992
@Override
9093
public void close();
9194

95+
/**
96+
* Returns the J2EEName of the ComponentMetaData extracted in extractComponentMetaData, or an empty Optional if extractComponentMetaData hasn't been called
97+
*/
98+
Optional<J2EEName> getJ2EEName();
99+
92100
}

dev/com.ibm.ws.cdi.weld/src/com/ibm/ws/cdi/liberty/ContextBeginnerEnderImpl.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
*******************************************************************************/
1010
package com.ibm.ws.cdi.liberty;
1111

12+
import java.util.Optional;
13+
14+
import com.ibm.websphere.csi.J2EEName;
1215
import com.ibm.websphere.ras.Tr;
1316
import com.ibm.websphere.ras.TraceComponent;
1417
import com.ibm.ws.cdi.CDIException;
@@ -157,6 +160,11 @@ public ContextBeginnerEnder clone() {
157160
return new ContextBeginnerEnderImpl(newTheadContextClassLoader, cmd, cmdLogStringSuffix, tcclLogStringSuffix);
158161
}
159162

163+
@Override
164+
public Optional<J2EEName> getJ2EEName() {
165+
return Optional.ofNullable(cmd.getJ2EEName());
166+
}
167+
160168
public static ContextBeginnerEnderImpl getCurrentlyActive() {
161169
return currentlyActive.get();
162170
}

dev/com.ibm.ws.jpa.container.core/resources/com/ibm/ws/jpa/jpa.nlsprops

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,3 +344,8 @@ PROVIDER_FATAL_CWWJP9993E.explanation=The Java Persistence API (JPA) provider ha
344344
PROVIDER_FATAL_CWWJP9993E.useraction=See the JPA provider documentation.
345345

346346
#-------------------------------------------------------------------------------
347+
FAILED_TO_CREATE_PU_BEAN_CWWJP9994W=CWWJP9994W: The server cannot create beans for the {0} PersistenceUnit because: {1}.
348+
FAILED_TO_CREATE_PU_BEAN_CWWJP9994W.explanation=An exception occurred when CDI attempted to create the bean for a persistence unit. CDI cannot inject an entity manager, an entity manager factory, or utility classes related to that persistence unit.
349+
FAILED_TO_CREATE_PU_BEAN_CWWJP9994W.useraction=Resolve the exception.
350+
351+
#-------------------------------------------------------------------------------
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/bin/
2+
/generated/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>com.ibm.ws.jpa.container.v32.cdi</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>bndtools.core.bndbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>bndtools.core.bndnature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
compileErrorAction=build
2+
eclipse.preferences.version=1

0 commit comments

Comments
 (0)