Skip to content

Migration to Jakarta EE#74

Open
f2par0 wants to merge 4 commits intoops4j:mainfrom
f2par0:jakarta
Open

Migration to Jakarta EE#74
f2par0 wants to merge 4 commits intoops4j:mainfrom
f2par0:jakarta

Conversation

@f2par0
Copy link
Copy Markdown

@f2par0 f2par0 commented Feb 5, 2026

  • Change version to 1.0.0-SNAPSHOT for Jakarta branch
  • Replace javax.* dependencies with jakarta.* equivalents:
    • javax.transaction-api 1.2 -> jakarta.transaction-api 2.0.1
    • javax.enterprise.cdi-api -> jakarta.enterprise.cdi-api
    • javax.interceptor-api -> jakarta.interceptor-api
    • javax.jms-api 2.0.1 -> jakarta.jms-api 3.1.0
    • javax.resource-api -> jakarta.resource-api 2.1.0
    • org.apache.servicemix.bundles.javax-inject removed (use jakarta.inject)
    • Restore narayana osgi support

- Change version to 1.0.0-SNAPSHOT for Jakarta branch
- Replace javax.* dependencies with jakarta.* equivalents:
  - javax.transaction-api 1.2 -> jakarta.transaction-api 2.0.1
  - javax.enterprise.cdi-api -> jakarta.enterprise.cdi-api
  - javax.interceptor-api -> jakarta.interceptor-api
  - javax.jms-api 2.0.1 -> jakarta.jms-api 3.1.0
  - javax.resource-api -> jakarta.resource-api 2.1.0
  - org.apache.servicemix.bundles.javax-inject removed (use jakarta.inject)
  - Restore narayana osgi support
<feature name="pax-transx-tm-narayana" version="${project.version}">
<feature>pax-transx-tm-api</feature>
<bundle dependency="true">wrap:mvn:org.jboss.narayana.jta/narayana-jta/${version.org.jboss.narayana}</bundle>
<bundle dependency="true">wrap:mvn:org.jboss.narayana.jts/narayana-jts-integration/${version.org.jboss.narayana}</bundle>
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.

Why it's suddenly needed?

Copy link
Copy Markdown
Author

@f2par0 f2par0 Feb 9, 2026

Choose a reason for hiding this comment

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

narayana doesn't provide osgi support in 7.3.3 : the previous narayana-osgi-jta doesn't exist anymore . So I added the jar wrapped as bundles and added the few files specific of osgi in this repo.
I have to rework this to have everything in the same bundle instead of using wrap protocol

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed in this commit
I used the ShadowNoFileLockStore which is the default one to avoid to pull all the hornetq dependencies that were previously embedded in narayana-osgi-jta (artemis-journal, commons, netty ...) . If necessary I can restore this too

Comment thread pax-transx-features/src/main/feature/feature.xml Outdated
Comment thread pax-transx-itests/pom.xml

<!-- APIs -->

<!-- pax exam is not yet jakarta EE compatible, so we need javax.inject -->
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.

I use Pax Exam in Pax Web 11...
Pax Exam should be agnostic to javax/jakarta...

Comment thread pax-transx-tm-narayana/pom.xml
Comment thread pax-transx-tm-narayana/pom.xml Outdated
Comment thread pom.xml
<version.org.apache.activemq>5.16.6</version.org.apache.activemq>
<version.org.apache.aries.transaction>1.3.3</version.org.apache.aries.transaction>
<version.org.apache.activemq>6.2.0</version.org.apache.activemq>
<version.org.apache.aries.transaction>2.0.0-SNAPSHOT</version.org.apache.aries.transaction>
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.

SNAPSHOT?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

this is to be changed to the release of aries which includes jakarta.( after merge of apache/aries#790)

Comment thread pom.xml
<version.org.apache.karaf>4.2.16</version.org.apache.karaf>
<version.org.apache.felix.framework>7.0.5</version.org.apache.felix.framework>
<version.org.apache.geronimo.transaction>4.0.0</version.org.apache.geronimo.transaction>
<version.org.apache.karaf>4.4.8</version.org.apache.karaf>
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.

Karaf 4.4 is not based on Jakarta EE 9+...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

it's not based on Jarkarta EE 9+ , but at least it provides some more recent dependencies that if I let it in 4.2.16

Comment thread pom.xml Outdated
@grgrzybek
Copy link
Copy Markdown
Member

Thanks @f2par0 - I really didn't have much time to move this project (and Pax JMS) to jakarta after huge (few years) effort to do that for Pax Web.

I know it has to be done. Your PR looks like does the migration, but it's very hard for me to review one commit which changes tests, changes imported packages, changes versions and changes groupId/artifactId of so many dependencies... I understand that some situations require commit squashing (especially if you use more commits with the same name), but sometimes it's really helpful to commit the changes separately, so they can be reviewed in isolation...

The PR for Aries is even bigger and I'd like to wait for other active Aries devs to review too.

If Aries doesn't work yet with jakarta.transaction, I'd focus on making Pax Transx work with at least one TM - Narayana or Atomikos...

I've added my comments, but tbh I don't think we should merge as is. It took me >3 years to make Pax Web compatible with jakarta packages. I don't say you should do the same, but we should do at least more than one commit with more careful review.

@grgrzybek
Copy link
Copy Markdown
Member

https://geronimo.apache.org/ says:

Now we are refocusing on providing JavaEE/JakartaEE libraries and Microprofile implementations.

and

Note: The Apache Geronimo Project no longer actively maintains the Geronimo Application Server!

I don't see a reference to Transaction Manager in Geronimo site - even if I do see it in Maven Central (version 4.0.0).

@f2par0
Copy link
Copy Markdown
Author

f2par0 commented Feb 9, 2026

Thanks @f2par0 - I really didn't have much time to move this project (and Pax JMS) to jakarta after huge (few years) effort to do that for Pax Web.

I know it has to be done. Your PR looks like does the migration, but it's very hard for me to review one commit which changes tests, changes imported packages, changes versions and changes groupId/artifactId of so many dependencies... I understand that some situations require commit squashing (especially if you use more commits with the same name), but sometimes it's really helpful to commit the changes separately, so they can be reviewed in isolation...

The PR for Aries is even bigger and I'd like to wait for other active Aries devs to review too.

If Aries doesn't work yet with jakarta.transaction, I'd focus on making Pax Transx work with at least one TM - Narayana or Atomikos...

I've added my comments, but tbh I don't think we should merge as is. It took me >3 years to make Pax Web compatible with jakarta packages. I don't say you should do the same, but we should do at least more than one commit with more careful review.

Hello @grgrzybek , thanks for the comments, it pointed to some mistakes I did.
To help the review, I could split the PR in the following commits :

  • upgrade pom version to SNAPSHOTS , no brainer.
  • upgrade versions on jakarta and rename of the package. compilation should be ok, but not the tests. Lot of files, but easy to review
  • upgrade on code needed for narayana to work . Few files , but more tricky.

Let me know, it it would be helpful, I could apply the same for aries and jms repo

@jbonofre jbonofre self-requested a review February 9, 2026 09:59
@f2par0
Copy link
Copy Markdown
Author

f2par0 commented Feb 10, 2026

https://geronimo.apache.org/ says:

Now we are refocusing on providing JavaEE/JakartaEE libraries and Microprofile implementations.

and

Note: The Apache Geronimo Project no longer actively maintains the Geronimo Application Server!

I don't see a reference to Transaction Manager in Geronimo site - even if I do see it in Maven Central (version 4.0.0).

That's right, the 4.0.0 is from 2003, no more activity on the repo since then. Do you want to remove support for it from pax.transx ?

@grgrzybek
Copy link
Copy Markdown
Member

Sorry for no feedback @f2par0 ... I really don't have much time recently...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants