Skip to content

[WFLY-19554] Implement EE 11 JPA / CDI integration in WildFly Preview - #19088

Merged
jamezp merged 6 commits into
wildfly:mainfrom
scottmarlow:WFLY-19554_cdijpa32_six
Sep 29, 2025
Merged

jamezp merged 6 commits into
wildfly:mainfrom
scottmarlow:WFLY-19554_cdijpa32_six

Conversation

@scottmarlow

Copy link
Copy Markdown
Contributor

@scottmarlow
scottmarlow force-pushed the WFLY-19554_cdijpa32_six branch from 14ffd6b to 5213352 Compare July 23, 2025 14:20
@scottmarlow
scottmarlow force-pushed the WFLY-19554_cdijpa32_six branch from 77b68d4 to f21ff00 Compare July 28, 2025 13:09
@scottmarlow
scottmarlow force-pushed the WFLY-19554_cdijpa32_six branch 3 times, most recently from a7d11cf to 3964321 Compare August 5, 2025 13:15
@scottmarlow scottmarlow changed the title [WFLY-19554] Implement EE 11 JPA / CDI integration in WildFly part of work (WildFly Preview to be added) [WFLY-19554] Implement EE 11 JPA / CDI integration in WildFly/WildFly Preview Aug 5, 2025
Comment thread jpa/schemamanagerbeancreator/pom.xml Resolved
@scottmarlow
scottmarlow force-pushed the WFLY-19554_cdijpa32_six branch from a9448ef to 3cb746e Compare August 11, 2025 19:58
@scottmarlow
scottmarlow force-pushed the WFLY-19554_cdijpa32_six branch from 83f463c to c90b6b2 Compare August 25, 2025 16:37
@scottmarlow

This comment was marked as resolved.

@github-actions github-actions Bot added the deps-changed Dependencies have been checked, and there are changes highlighted in a comment label Sep 15, 2025
@github-actions

Copy link
Copy Markdown

Dependency Tree Analyzer Output:

Major Version Changes:

  • org.jboss.metadata:jboss-metadata-appclient:jar:16.1.0.Final:compile -> 17.0.0.Beta1
  • org.jboss.metadata:jboss-metadata-common:jar:16.1.0.Final:compile -> 17.0.0.Beta1
  • org.jboss.metadata:jboss-metadata-ear:jar:16.1.0.Final:compile -> 17.0.0.Beta1
  • org.jboss.metadata:jboss-metadata-ejb:jar:16.1.0.Final:compile -> 17.0.0.Beta1
  • org.jboss.metadata:jboss-metadata-web:jar:16.1.0.Final:compile -> 17.0.0.Beta1

CC @wildfly/prod

@scottmarlow

Copy link
Copy Markdown
Contributor Author

@jamezp @rhusar I think all feedback has been addressed. Thanks for the careful review!

@scottmarlow scottmarlow added the ready-for-merge Only for use by those with merge permissions! label Sep 19, 2025
@bstansberry

Copy link
Copy Markdown
Contributor

@jamezp or @rhusar Please approve.

@bstansberry bstansberry removed the ready-for-merge Only for use by those with merge permissions! label Sep 23, 2025
@scottmarlow

Copy link
Copy Markdown
Contributor Author

I'll sync up with main and squash as well

@scottmarlow scottmarlow changed the title [WFLY-19554] Implement EE 11 JPA / CDI integration in WildFly/WildFly Preview [WFLY-19554] Implement EE 11 JPA / CDI integration in WildFly Preview Sep 24, 2025
@scottmarlow
scottmarlow force-pushed the WFLY-19554_cdijpa32_six branch from 370ed55 to f7f4726 Compare September 24, 2025 14:37
@jamezp

jamezp commented Sep 24, 2025

Copy link
Copy Markdown
Member

I'll have another look at this today and send up a EE11 Draft PR to get a run in there as well.

@bstansberry

Copy link
Copy Markdown
Contributor

Note that the status box for this PR is currently also showing results for #19215. I think this happens when two branches are testing the same PR branch, but merged into different target branches. It's harmless, just confusing.

scottmarlow and others added 5 commits September 25, 2025 11:26
…notation. Slight changes to the producer.

Signed-off-by: James R. Perkins <[email protected]>
…cal/src/main/resources/modules/system/layers/base/jakarta/persistence/api/main/module.xml

Signed-off-by: Scott Marlow <[email protected]>
@scottmarlow
scottmarlow force-pushed the WFLY-19554_cdijpa32_six branch from f7f4726 to 66f60c1 Compare September 25, 2025 16:44
@scottmarlow

Copy link
Copy Markdown
Contributor Author

All tests passed which is great to see! I'm pushing one more change to remove an extra class load that we don't need.

@bstansberry

Copy link
Copy Markdown
Contributor

@darranl I put a 38.x label on this because if it's approved in time for 38 Beta that would be great. If not. it's ok.

It's WFP so we could always put in into 38 Final if we want, but of course having changes in the beta is better.

@jamezp jamezp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottmarlow I think we should merge this, but I've got 3 requests for a follow up PR before final. Let's discuss these.

Comment on lines +1206 to +1214
if (null == deploymentUnit.putAttachment(JpaAttachments.AFTER_BEAN_DISCOVERY_ATTACHMENT_KEY, persistenceCdiExtension))
weldCapability.get().registerExtensionInstance(persistenceCdiExtension, deploymentUnit);
}
}
if ( persistenceCdiExtension != null) {
result = persistenceCdiExtension.register(pu);
result.setTransactionManager(transactionManager);
result.setTransactionSynchronizationRegistry(transactionSynchronizationRegistry);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fix this in a follow up, but I'm not sure this is correct. I need to look at how sub-deployments are processed though.

The issue though is that if deploymentUnit.putAttachment(JpaAttachments.AFTER_BEAN_DISCOVERY_ATTACHMENT_KEY, persistenceCdiExtension) returns a value, you'd be executing the register() on the wrong instance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jamezp! This is fixed in #19232

Comment on lines +206 to +208
if (proxyBeanManager != null && proxyBeanManager.delegate() != null) {
createCDIBeansForPersistence(proxyBeanManager.delegate(), entityManagerFactory, pu, classLoader);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again for a follow up, I don't understand this. It invokes the createCDIBeansForPersistence() which does nothing.

@jamezp
jamezp merged commit fcd6e0d into wildfly:main Sep 29, 2025
@scottmarlow
scottmarlow deleted the WFLY-19554_cdijpa32_six branch September 30, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deps-changed Dependencies have been checked, and there are changes highlighted in a comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants