You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2020/04/16 13:23:26 UTC

Javax -> Jakarta rename

Hi All,

You may be aware that as part of the Jakarta EE 9 release later this year,
the various APIs provided in TomEE will be shifting from javax namespaces
to jakarta.

I'm currently researching the use of the Eclipse Transformer project (
https://projects.eclipse.org/projects/technology.transformer) to translate
both the TomEE server itself, and the source code for the examples.

So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
TomEE that boots. There's *lots* that doesn't work at the present moment,
but I'm expecting to have the moviefun example running fairly soon - that
covers EJB, Servlets, JSPs, JPA. The REST version of the sample also covers
JAX-RS too.

I'm aware that there's also a migration tool that Tomcat have been working
on too, and will be looking at.

We ought to have some discussion about the approach here - in my mind there
are some high-level goals:

* Try and maintain a single codebase for javax and jakarta. It's
tempting to fork master and embark on a massive renaming exercise. That's
complex as we'd need to do that for various dependencies as well, who may
also have other branches and timelines. Having two codebases also means
that any changes need to be applied twice, and with renamed packages, its
unlikely the git merging or cherry-picking will work.

* Be backwards compatible - One goal I had in my mined, is that if you have
an application that uses javax, you'd probably like to be able to run it on
a new Jakarta EE server. There are some options here - I quite like the
idea of running the Transformer as a javaagent, so any applications
deployed using the old namespaces are converted on the fly at the bytecode
level.

* Tooling - I wonder what tooling we could potentially provide? One thought
I had was a Maven plugin that can transform a war/ear file for you as part
of a build.

Anyway, just wanted to give a heads-up on the research. Any thoughts /
discussions / questions are encouraged.

Jon

Re: Javax -> Jakarta rename

Posted by Carlos Chacín <cc...@gmail.com>.
I'm also interested in helping with this. 🤘🏽

On Fri, Apr 17, 2020, 9:47 AM Daniel Dias Dos Santos <
daniel.dias.analistati@gmail.com> wrote:

> great.
>
> thanks :  )
> --
>
> *Daniel Dias dos Santos*
> Java Developer
> SouJava & JCP Member
> GitHub: https://github.com/Daniel-Dos
> Linkedin: www.linkedin.com/in/danieldiasjava
> Twitter: http://twitter.com/danieldiasjava
>
>
> Em sex., 17 de abr. de 2020 às 12:32, Jonathan Gallimore <
> jonathan.gallimore@gmail.com> escreveu:
>
> > That's amazing - thank you both. To start off, let's look at what I have
> so
> > far with the Transformer, the current gaps I can see, and the issues I'm
> > currently running into. I'll document up how to build and run the
> > transformer so you can get started with that.
> >
> > Jon
> >
> > On Fri, Apr 17, 2020 at 3:09 PM Daniel Dias Dos Santos <
> > daniel.dias.analistati@gmail.com> wrote:
> >
> > > Hello Jon,
> > >
> > > I'm also available to help  : )
> > >
> > >
> > >
> > > Em qui., 16 de abr. de 2020 às 22:56, Nishant Raut <
> > nishant30197@gmail.com
> > > >
> > > escreveu:
> > >
> > > > Hi Jonathan,
> > > >
> > > > I will be happy to help by providing PR on namespace change if you
> can
> > > > share more details.
> > > >
> > > > Thanks and Regards,
> > > > Nishant
> > > >
> > > > On Thu, Apr 16, 2020, 7:02 PM Jonathan Gallimore <
> > > > jonathan.gallimore@gmail.com> wrote:
> > > >
> > > > > Hi All,
> > > > >
> > > > > You may be aware that as part of the Jakarta EE 9 release later
> this
> > > > year,
> > > > > the various APIs provided in TomEE will be shifting from javax
> > > namespaces
> > > > > to jakarta.
> > > > >
> > > > > I'm currently researching the use of the Eclipse Transformer
> project
> > (
> > > > > https://projects.eclipse.org/projects/technology.transformer) to
> > > > translate
> > > > > both the TomEE server itself, and the source code for the examples.
> > > > >
> > > > > So far, I have a converted javaee-api.jar, and a Jakarta-ized
> version
> > > of
> > > > > TomEE that boots. There's *lots* that doesn't work at the present
> > > moment,
> > > > > but I'm expecting to have the moviefun example running fairly soon
> -
> > > that
> > > > > covers EJB, Servlets, JSPs, JPA. The REST version of the sample
> also
> > > > covers
> > > > > JAX-RS too.
> > > > >
> > > > > I'm aware that there's also a migration tool that Tomcat have been
> > > > working
> > > > > on too, and will be looking at.
> > > > >
> > > > > We ought to have some discussion about the approach here - in my
> mind
> > > > there
> > > > > are some high-level goals:
> > > > >
> > > > > * Try and maintain a single codebase for javax and jakarta. It's
> > > > > tempting to fork master and embark on a massive renaming exercise.
> > > That's
> > > > > complex as we'd need to do that for various dependencies as well,
> who
> > > may
> > > > > also have other branches and timelines. Having two codebases also
> > means
> > > > > that any changes need to be applied twice, and with renamed
> packages,
> > > its
> > > > > unlikely the git merging or cherry-picking will work.
> > > > >
> > > > > * Be backwards compatible - One goal I had in my mined, is that if
> > you
> > > > have
> > > > > an application that uses javax, you'd probably like to be able to
> run
> > > it
> > > > on
> > > > > a new Jakarta EE server. There are some options here - I quite like
> > the
> > > > > idea of running the Transformer as a javaagent, so any applications
> > > > > deployed using the old namespaces are converted on the fly at the
> > > > bytecode
> > > > > level.
> > > > >
> > > > > * Tooling - I wonder what tooling we could potentially provide? One
> > > > thought
> > > > > I had was a Maven plugin that can transform a war/ear file for you
> as
> > > > part
> > > > > of a build.
> > > > >
> > > > > Anyway, just wanted to give a heads-up on the research. Any
> thoughts
> > /
> > > > > discussions / questions are encouraged.
> > > > >
> > > > > Jon
> > > > >
> > > >
> > >
> >
>

Re: Javax -> Jakarta rename

Posted by Daniel Dias Dos Santos <da...@gmail.com>.
great.

thanks :  )
--

*Daniel Dias dos Santos*
Java Developer
SouJava & JCP Member
GitHub: https://github.com/Daniel-Dos
Linkedin: www.linkedin.com/in/danieldiasjava
Twitter: http://twitter.com/danieldiasjava


Em sex., 17 de abr. de 2020 às 12:32, Jonathan Gallimore <
jonathan.gallimore@gmail.com> escreveu:

> That's amazing - thank you both. To start off, let's look at what I have so
> far with the Transformer, the current gaps I can see, and the issues I'm
> currently running into. I'll document up how to build and run the
> transformer so you can get started with that.
>
> Jon
>
> On Fri, Apr 17, 2020 at 3:09 PM Daniel Dias Dos Santos <
> daniel.dias.analistati@gmail.com> wrote:
>
> > Hello Jon,
> >
> > I'm also available to help  : )
> >
> >
> >
> > Em qui., 16 de abr. de 2020 às 22:56, Nishant Raut <
> nishant30197@gmail.com
> > >
> > escreveu:
> >
> > > Hi Jonathan,
> > >
> > > I will be happy to help by providing PR on namespace change if you can
> > > share more details.
> > >
> > > Thanks and Regards,
> > > Nishant
> > >
> > > On Thu, Apr 16, 2020, 7:02 PM Jonathan Gallimore <
> > > jonathan.gallimore@gmail.com> wrote:
> > >
> > > > Hi All,
> > > >
> > > > You may be aware that as part of the Jakarta EE 9 release later this
> > > year,
> > > > the various APIs provided in TomEE will be shifting from javax
> > namespaces
> > > > to jakarta.
> > > >
> > > > I'm currently researching the use of the Eclipse Transformer project
> (
> > > > https://projects.eclipse.org/projects/technology.transformer) to
> > > translate
> > > > both the TomEE server itself, and the source code for the examples.
> > > >
> > > > So far, I have a converted javaee-api.jar, and a Jakarta-ized version
> > of
> > > > TomEE that boots. There's *lots* that doesn't work at the present
> > moment,
> > > > but I'm expecting to have the moviefun example running fairly soon -
> > that
> > > > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> > > covers
> > > > JAX-RS too.
> > > >
> > > > I'm aware that there's also a migration tool that Tomcat have been
> > > working
> > > > on too, and will be looking at.
> > > >
> > > > We ought to have some discussion about the approach here - in my mind
> > > there
> > > > are some high-level goals:
> > > >
> > > > * Try and maintain a single codebase for javax and jakarta. It's
> > > > tempting to fork master and embark on a massive renaming exercise.
> > That's
> > > > complex as we'd need to do that for various dependencies as well, who
> > may
> > > > also have other branches and timelines. Having two codebases also
> means
> > > > that any changes need to be applied twice, and with renamed packages,
> > its
> > > > unlikely the git merging or cherry-picking will work.
> > > >
> > > > * Be backwards compatible - One goal I had in my mined, is that if
> you
> > > have
> > > > an application that uses javax, you'd probably like to be able to run
> > it
> > > on
> > > > a new Jakarta EE server. There are some options here - I quite like
> the
> > > > idea of running the Transformer as a javaagent, so any applications
> > > > deployed using the old namespaces are converted on the fly at the
> > > bytecode
> > > > level.
> > > >
> > > > * Tooling - I wonder what tooling we could potentially provide? One
> > > thought
> > > > I had was a Maven plugin that can transform a war/ear file for you as
> > > part
> > > > of a build.
> > > >
> > > > Anyway, just wanted to give a heads-up on the research. Any thoughts
> /
> > > > discussions / questions are encouraged.
> > > >
> > > > Jon
> > > >
> > >
> >
>

Re: Javax -> Jakarta rename

Posted by Jonathan Gallimore <jo...@gmail.com>.
That's amazing - thank you both. To start off, let's look at what I have so
far with the Transformer, the current gaps I can see, and the issues I'm
currently running into. I'll document up how to build and run the
transformer so you can get started with that.

Jon

On Fri, Apr 17, 2020 at 3:09 PM Daniel Dias Dos Santos <
daniel.dias.analistati@gmail.com> wrote:

> Hello Jon,
>
> I'm also available to help  : )
>
>
>
> Em qui., 16 de abr. de 2020 às 22:56, Nishant Raut <nishant30197@gmail.com
> >
> escreveu:
>
> > Hi Jonathan,
> >
> > I will be happy to help by providing PR on namespace change if you can
> > share more details.
> >
> > Thanks and Regards,
> > Nishant
> >
> > On Thu, Apr 16, 2020, 7:02 PM Jonathan Gallimore <
> > jonathan.gallimore@gmail.com> wrote:
> >
> > > Hi All,
> > >
> > > You may be aware that as part of the Jakarta EE 9 release later this
> > year,
> > > the various APIs provided in TomEE will be shifting from javax
> namespaces
> > > to jakarta.
> > >
> > > I'm currently researching the use of the Eclipse Transformer project (
> > > https://projects.eclipse.org/projects/technology.transformer) to
> > translate
> > > both the TomEE server itself, and the source code for the examples.
> > >
> > > So far, I have a converted javaee-api.jar, and a Jakarta-ized version
> of
> > > TomEE that boots. There's *lots* that doesn't work at the present
> moment,
> > > but I'm expecting to have the moviefun example running fairly soon -
> that
> > > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> > covers
> > > JAX-RS too.
> > >
> > > I'm aware that there's also a migration tool that Tomcat have been
> > working
> > > on too, and will be looking at.
> > >
> > > We ought to have some discussion about the approach here - in my mind
> > there
> > > are some high-level goals:
> > >
> > > * Try and maintain a single codebase for javax and jakarta. It's
> > > tempting to fork master and embark on a massive renaming exercise.
> That's
> > > complex as we'd need to do that for various dependencies as well, who
> may
> > > also have other branches and timelines. Having two codebases also means
> > > that any changes need to be applied twice, and with renamed packages,
> its
> > > unlikely the git merging or cherry-picking will work.
> > >
> > > * Be backwards compatible - One goal I had in my mined, is that if you
> > have
> > > an application that uses javax, you'd probably like to be able to run
> it
> > on
> > > a new Jakarta EE server. There are some options here - I quite like the
> > > idea of running the Transformer as a javaagent, so any applications
> > > deployed using the old namespaces are converted on the fly at the
> > bytecode
> > > level.
> > >
> > > * Tooling - I wonder what tooling we could potentially provide? One
> > thought
> > > I had was a Maven plugin that can transform a war/ear file for you as
> > part
> > > of a build.
> > >
> > > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > > discussions / questions are encouraged.
> > >
> > > Jon
> > >
> >
>

Re: Javax -> Jakarta rename

Posted by Daniel Dias Dos Santos <da...@gmail.com>.
Hello Jon,

I'm also available to help  : )



Em qui., 16 de abr. de 2020 às 22:56, Nishant Raut <ni...@gmail.com>
escreveu:

> Hi Jonathan,
>
> I will be happy to help by providing PR on namespace change if you can
> share more details.
>
> Thanks and Regards,
> Nishant
>
> On Thu, Apr 16, 2020, 7:02 PM Jonathan Gallimore <
> jonathan.gallimore@gmail.com> wrote:
>
> > Hi All,
> >
> > You may be aware that as part of the Jakarta EE 9 release later this
> year,
> > the various APIs provided in TomEE will be shifting from javax namespaces
> > to jakarta.
> >
> > I'm currently researching the use of the Eclipse Transformer project (
> > https://projects.eclipse.org/projects/technology.transformer) to
> translate
> > both the TomEE server itself, and the source code for the examples.
> >
> > So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> > TomEE that boots. There's *lots* that doesn't work at the present moment,
> > but I'm expecting to have the moviefun example running fairly soon - that
> > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> covers
> > JAX-RS too.
> >
> > I'm aware that there's also a migration tool that Tomcat have been
> working
> > on too, and will be looking at.
> >
> > We ought to have some discussion about the approach here - in my mind
> there
> > are some high-level goals:
> >
> > * Try and maintain a single codebase for javax and jakarta. It's
> > tempting to fork master and embark on a massive renaming exercise. That's
> > complex as we'd need to do that for various dependencies as well, who may
> > also have other branches and timelines. Having two codebases also means
> > that any changes need to be applied twice, and with renamed packages, its
> > unlikely the git merging or cherry-picking will work.
> >
> > * Be backwards compatible - One goal I had in my mined, is that if you
> have
> > an application that uses javax, you'd probably like to be able to run it
> on
> > a new Jakarta EE server. There are some options here - I quite like the
> > idea of running the Transformer as a javaagent, so any applications
> > deployed using the old namespaces are converted on the fly at the
> bytecode
> > level.
> >
> > * Tooling - I wonder what tooling we could potentially provide? One
> thought
> > I had was a Maven plugin that can transform a war/ear file for you as
> part
> > of a build.
> >
> > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > discussions / questions are encouraged.
> >
> > Jon
> >
>

Re: Javax -> Jakarta rename

Posted by Nishant Raut <ni...@gmail.com>.
Hi Jonathan,

I will be happy to help by providing PR on namespace change if you can
share more details.

Thanks and Regards,
Nishant

On Thu, Apr 16, 2020, 7:02 PM Jonathan Gallimore <
jonathan.gallimore@gmail.com> wrote:

> Hi All,
>
> You may be aware that as part of the Jakarta EE 9 release later this year,
> the various APIs provided in TomEE will be shifting from javax namespaces
> to jakarta.
>
> I'm currently researching the use of the Eclipse Transformer project (
> https://projects.eclipse.org/projects/technology.transformer) to translate
> both the TomEE server itself, and the source code for the examples.
>
> So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> TomEE that boots. There's *lots* that doesn't work at the present moment,
> but I'm expecting to have the moviefun example running fairly soon - that
> covers EJB, Servlets, JSPs, JPA. The REST version of the sample also covers
> JAX-RS too.
>
> I'm aware that there's also a migration tool that Tomcat have been working
> on too, and will be looking at.
>
> We ought to have some discussion about the approach here - in my mind there
> are some high-level goals:
>
> * Try and maintain a single codebase for javax and jakarta. It's
> tempting to fork master and embark on a massive renaming exercise. That's
> complex as we'd need to do that for various dependencies as well, who may
> also have other branches and timelines. Having two codebases also means
> that any changes need to be applied twice, and with renamed packages, its
> unlikely the git merging or cherry-picking will work.
>
> * Be backwards compatible - One goal I had in my mined, is that if you have
> an application that uses javax, you'd probably like to be able to run it on
> a new Jakarta EE server. There are some options here - I quite like the
> idea of running the Transformer as a javaagent, so any applications
> deployed using the old namespaces are converted on the fly at the bytecode
> level.
>
> * Tooling - I wonder what tooling we could potentially provide? One thought
> I had was a Maven plugin that can transform a war/ear file for you as part
> of a build.
>
> Anyway, just wanted to give a heads-up on the research. Any thoughts /
> discussions / questions are encouraged.
>
> Jon
>

Re: Javax -> Jakarta rename

Posted by Jonathan Gallimore <jo...@gmail.com>.
On Tue, Apr 28, 2020 at 3:42 AM Cesar Hernandez <ce...@gmail.com>
wrote:

> @Jonathan
> I followed the Eclipse Transformer steps [0], I found a small typo and
> opened a PR [1].
>

Thanks, I've merged that in.


>
> The latest master for apache-tomee-webprofile-8.0.2 started without any
> error.
> When I tried to access the manager or the default /webapps, they didn't
> work, I guess we can apply the transformer too.
>

Good point.


>
> I have a couple of questions:
>
> 1) What are the criteria we need to choose to know which javax.* packages
> need to be migrated to Jakarta?
> As I understand the packages migration can be configured via:
>
> https://github.com/apache/tomee/blob/master/transformer/jakarta-renames.properties
>
> For example, when I
> decompiled jaxb-runtime-2.3.2.jar/com/sun/xml/bind/api/Bridge.class I
> notice that not all the packages were migrated:
>
> //Not migrated:
> import javax.xml.namespace.NamespaceContext;
> import javax.xml.stream.XMLStreamReader;
> import javax.xml.stream.XMLStreamWriter;
> import javax.xml.transform.Result;
> import javax.xml.transform.Source;
>

We're almost certainly missing some rules. This is a useful source for the
package renames: https://www.tomitribe.com/jakarta/ns/poll/vote - click on
specific javax packages to see the renames. Any dependent namespaces will
also be selected (try javax.xml.soap, for example).
Its definitely not a straight rename "javax" to "jakarta" everywhere,
however. I'd need to check on these specific cases.


> 2) I see that you already have a branch with the examples translated to
> Jakarta but as far I understand, migration to create the Jakarta EE 9 API
> jar is a prerequisite.
>

Correct.


> I'm happy to take https://issues.apache.org/jira/browse/TOMEE-2802 in
> order
> to make a snapshot release but then question 1) arises again.
> The migrated version, where should we version it? on a new SVN Branch like
> https://svn.apache.org/repos/asf/tomee/jakartaee-api/trunk/?
>

I'm inclined to move it to Git. If you agree, do you want to create a new
VOTE thread for that? I believe the process itself is self-service, and you
would be able to do that.


>
>
> [0] http://tomee.apache.org/tomee-8.0/docs/jakartaee-9/index.html
> [1] https://github.com/apache/tomee/pull/635
>
>
> @Gilberto
> I think the proposed approach with the transformation will actually
> facilitate the end-user the migration of EE apps to JakartaEE because the
> intention is that the application server will do the transformation for
> them on the fly.
> I see that Tomcat took the approach you suggested with 10.x [2] and there
> is a work on progress over a migration tool to aid this process [3].
> This last point reinforce the fact that there are people that will prefer
> to upgrade their servlet container (Tomcat) or their JakartaEE server
> (TomEE) with their existing applications.
>
> As far as I recall, currently, you can keep JDK8->TomEE8 but also
> JDK11->TomEE8.x.
> I don't understand how the JDK11 -> JAKARTA9-> TomEE9 would not work with
> the Transformer approach.
>

I did Gilberto's mail on this thread - I'll reply to that separately.

Jon


>
>
> [2] https://tomcat.apache.org/download-10.cgi
> [3] https://github.com/apache/tomcat-jakartaee-migration
>
>
> El mar., 21 abr. 2020 a las 13:06, Gilberto Caetano de Andrade (<
> gilbertoca@gmail.com>) escribió:
>
> >
> >
> > On 2020/04/21 19:00:54, Gilberto Caetano de Andrade <
> gilbertoca@gmail.com>
> > wrote:
> > > Hi,
> > >
> > > On 2020/04/16 13:23:26, Jonathan Gallimore <
> jonathan.gallimore@gmail.com>
> > wrote:
> > > > Hi All,
> > > >
> > > > You may be aware that as part of the Jakarta EE 9 release later this
> > year,
> > > > the various APIs provided in TomEE will be shifting from javax
> > namespaces
> > > > to jakarta.
> > > >
> > > > I'm currently researching the use of the Eclipse Transformer project
> (
> > > > https://projects.eclipse.org/projects/technology.transformer) to
> > translate
> > > > both the TomEE server itself, and the source code for the examples.
> > > >
> > > > So far, I have a converted javaee-api.jar, and a Jakarta-ized version
> > of
> > > > TomEE that boots. There's *lots* that doesn't work at the present
> > moment,
> > > > but I'm expecting to have the moviefun example running fairly soon -
> > that
> > > > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> > covers
> > > > JAX-RS too.
> > > >
> > > > I'm aware that there's also a migration tool that Tomcat have been
> > working
> > > > on too, and will be looking at.
> > > >
> > > > We ought to have some discussion about the approach here - in my mind
> > there
> > > > are some high-level goals:
> > > >
> > > > * Try and maintain a single codebase for javax and jakarta.
> > > I my opinion is the worst idea. TomEE has had a history of spread
> > projects and this way you will obligated to stay with all of them.
> > >
> > > >It's tempting to fork master and embark on a massive renaming
> exercise.
> > >
> > > I would like to suggest another way for the TomEE project with this
> > great opportunity (please consider my words, I'm not expert in lib, just
> > user here ok!)
> > > Reading about Jakarta EE 9 I've discovered that the goal is JDK11 ->
> > JAKARTA9 and of course the rename thing. But the main message is you do
> not
> > need be backwards compatible (you can if you wish).
> > > My suggestion is to follow the train like JDK11 -> JAKARTA9-> TomEE9
> > > The TomEE9 branch (I suggest it be the master one) will suffer the
> > rename task and prune the legacy project/dependency one
> > >
> > > Hardly I will upgrade or port my ee projects to jakata9 - I'm having a
> > hard time to update to jdk11 :)
> > > I prefer stay with JDK8->TomEE8!
> > >
> > I mean I prefer stay with JDK8->JAKARTA8->TomEE8 for my current projects.
> > For the new ones I prefer  JDK11 -> JAKARTA9-> TomEE9.
> >
> > Sorry!
> >
> > > Regards,
> > > Gilberto
> > >
> > > PS.: Thank you all for great project
> > >
> > > >That's complex as we'd need to do that for various dependencies as
> > well, who may
> > > > also have other branches and timelines. Having two codebases also
> means
> > > > that any changes need to be applied twice, and with renamed packages,
> > its
> > > > unlikely the git merging or cherry-picking will work.
> > > >
> > > > * Be backwards compatible - One goal I had in my mined, is that if
> you
> > have
> > > > an application that uses javax, you'd probably like to be able to run
> > it on
> > > > a new Jakarta EE server. There are some options here - I quite like
> the
> > > > idea of running the Transformer as a javaagent, so any applications
> > > > deployed using the old namespaces are converted on the fly at the
> > bytecode
> > > > level.
> > > >
> > > > * Tooling - I wonder what tooling we could potentially provide? One
> > thought
> > > > I had was a Maven plugin that can transform a war/ear file for you as
> > part
> > > > of a build.
> > > >
> > > > Anyway, just wanted to give a heads-up on the research. Any thoughts
> /
> > > > discussions / questions are encouraged.
> > > >
> > > > Jon
> > > >
> > >
> >
>
>
> --
> Atentamente:
> César Hernández.
>

Re: Javax -> Jakarta rename

Posted by Cesar Hernandez <ce...@gmail.com>.
@Jonathan
I followed the Eclipse Transformer steps [0], I found a small typo and
opened a PR [1].

The latest master for apache-tomee-webprofile-8.0.2 started without any
error.
When I tried to access the manager or the default /webapps, they didn't
work, I guess we can apply the transformer too.

I have a couple of questions:

1) What are the criteria we need to choose to know which javax.* packages
need to be migrated to Jakarta?
As I understand the packages migration can be configured via:
https://github.com/apache/tomee/blob/master/transformer/jakarta-renames.properties

For example, when I
decompiled jaxb-runtime-2.3.2.jar/com/sun/xml/bind/api/Bridge.class I
notice that not all the packages were migrated:

package com.sun.xml.bind.api;

import com.sun.istack.NotNull;
import com.sun.istack.Nullable;
import com.sun.xml.bind.v2.runtime.BridgeContextImpl;
import com.sun.xml.bind.v2.runtime.JAXBContextImpl;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Marshaller;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.attachment.AttachmentMarshaller;
import jakarta.xml.bind.attachment.AttachmentUnmarshaller;
import java.io.InputStream;
import java.io.OutputStream;
import org.w3c.dom.Node;
import org.xml.sax.ContentHandler;
//Not migrated:
import javax.xml.namespace.NamespaceContext;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.transform.Result;
import javax.xml.transform.Source;


2) I see that you already have a branch with the examples translated to
Jakarta but as far I understand, migration to create the Jakarta EE 9 API
jar is a prerequisite.
I'm happy to take https://issues.apache.org/jira/browse/TOMEE-2802 in order
to make a snapshot release but then question 1) arises again.
The migrated version, where should we version it? on a new SVN Branch like
https://svn.apache.org/repos/asf/tomee/jakartaee-api/trunk/?


[0] http://tomee.apache.org/tomee-8.0/docs/jakartaee-9/index.html
[1] https://github.com/apache/tomee/pull/635


@Gilberto
I think the proposed approach with the transformation will actually
facilitate the end-user the migration of EE apps to JakartaEE because the
intention is that the application server will do the transformation for
them on the fly.
I see that Tomcat took the approach you suggested with 10.x [2] and there
is a work on progress over a migration tool to aid this process [3].
This last point reinforce the fact that there are people that will prefer
to upgrade their servlet container (Tomcat) or their JakartaEE server
(TomEE) with their existing applications.

As far as I recall, currently, you can keep JDK8->TomEE8 but also
JDK11->TomEE8.x.
I don't understand how the JDK11 -> JAKARTA9-> TomEE9 would not work with
the Transformer approach.


[2] https://tomcat.apache.org/download-10.cgi
[3] https://github.com/apache/tomcat-jakartaee-migration


El mar., 21 abr. 2020 a las 13:06, Gilberto Caetano de Andrade (<
gilbertoca@gmail.com>) escribió:

>
>
> On 2020/04/21 19:00:54, Gilberto Caetano de Andrade <gi...@gmail.com>
> wrote:
> > Hi,
> >
> > On 2020/04/16 13:23:26, Jonathan Gallimore <jo...@gmail.com>
> wrote:
> > > Hi All,
> > >
> > > You may be aware that as part of the Jakarta EE 9 release later this
> year,
> > > the various APIs provided in TomEE will be shifting from javax
> namespaces
> > > to jakarta.
> > >
> > > I'm currently researching the use of the Eclipse Transformer project (
> > > https://projects.eclipse.org/projects/technology.transformer) to
> translate
> > > both the TomEE server itself, and the source code for the examples.
> > >
> > > So far, I have a converted javaee-api.jar, and a Jakarta-ized version
> of
> > > TomEE that boots. There's *lots* that doesn't work at the present
> moment,
> > > but I'm expecting to have the moviefun example running fairly soon -
> that
> > > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> covers
> > > JAX-RS too.
> > >
> > > I'm aware that there's also a migration tool that Tomcat have been
> working
> > > on too, and will be looking at.
> > >
> > > We ought to have some discussion about the approach here - in my mind
> there
> > > are some high-level goals:
> > >
> > > * Try and maintain a single codebase for javax and jakarta.
> > I my opinion is the worst idea. TomEE has had a history of spread
> projects and this way you will obligated to stay with all of them.
> >
> > >It's tempting to fork master and embark on a massive renaming exercise.
> >
> > I would like to suggest another way for the TomEE project with this
> great opportunity (please consider my words, I'm not expert in lib, just
> user here ok!)
> > Reading about Jakarta EE 9 I've discovered that the goal is JDK11 ->
> JAKARTA9 and of course the rename thing. But the main message is you do not
> need be backwards compatible (you can if you wish).
> > My suggestion is to follow the train like JDK11 -> JAKARTA9-> TomEE9
> > The TomEE9 branch (I suggest it be the master one) will suffer the
> rename task and prune the legacy project/dependency one
> >
> > Hardly I will upgrade or port my ee projects to jakata9 - I'm having a
> hard time to update to jdk11 :)
> > I prefer stay with JDK8->TomEE8!
> >
> I mean I prefer stay with JDK8->JAKARTA8->TomEE8 for my current projects.
> For the new ones I prefer  JDK11 -> JAKARTA9-> TomEE9.
>
> Sorry!
>
> > Regards,
> > Gilberto
> >
> > PS.: Thank you all for great project
> >
> > >That's complex as we'd need to do that for various dependencies as
> well, who may
> > > also have other branches and timelines. Having two codebases also means
> > > that any changes need to be applied twice, and with renamed packages,
> its
> > > unlikely the git merging or cherry-picking will work.
> > >
> > > * Be backwards compatible - One goal I had in my mined, is that if you
> have
> > > an application that uses javax, you'd probably like to be able to run
> it on
> > > a new Jakarta EE server. There are some options here - I quite like the
> > > idea of running the Transformer as a javaagent, so any applications
> > > deployed using the old namespaces are converted on the fly at the
> bytecode
> > > level.
> > >
> > > * Tooling - I wonder what tooling we could potentially provide? One
> thought
> > > I had was a Maven plugin that can transform a war/ear file for you as
> part
> > > of a build.
> > >
> > > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > > discussions / questions are encouraged.
> > >
> > > Jon
> > >
> >
>


-- 
Atentamente:
César Hernández.

Re: Javax -> Jakarta rename

Posted by Gilberto Caetano de Andrade <gi...@gmail.com>.

On 2020/04/21 19:00:54, Gilberto Caetano de Andrade <gi...@gmail.com> wrote: 
> Hi,
> 
> On 2020/04/16 13:23:26, Jonathan Gallimore <jo...@gmail.com> wrote: 
> > Hi All,
> > 
> > You may be aware that as part of the Jakarta EE 9 release later this year,
> > the various APIs provided in TomEE will be shifting from javax namespaces
> > to jakarta.
> > 
> > I'm currently researching the use of the Eclipse Transformer project (
> > https://projects.eclipse.org/projects/technology.transformer) to translate
> > both the TomEE server itself, and the source code for the examples.
> > 
> > So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> > TomEE that boots. There's *lots* that doesn't work at the present moment,
> > but I'm expecting to have the moviefun example running fairly soon - that
> > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also covers
> > JAX-RS too.
> > 
> > I'm aware that there's also a migration tool that Tomcat have been working
> > on too, and will be looking at.
> > 
> > We ought to have some discussion about the approach here - in my mind there
> > are some high-level goals:
> > 
> > * Try and maintain a single codebase for javax and jakarta. 
> I my opinion is the worst idea. TomEE has had a history of spread projects and this way you will obligated to stay with all of them. 
> 
> >It's tempting to fork master and embark on a massive renaming exercise. 
> 
> I would like to suggest another way for the TomEE project with this great opportunity (please consider my words, I'm not expert in lib, just user here ok!)
> Reading about Jakarta EE 9 I've discovered that the goal is JDK11 -> JAKARTA9 and of course the rename thing. But the main message is you do not need be backwards compatible (you can if you wish).
> My suggestion is to follow the train like JDK11 -> JAKARTA9-> TomEE9
> The TomEE9 branch (I suggest it be the master one) will suffer the rename task and prune the legacy project/dependency one
> 
> Hardly I will upgrade or port my ee projects to jakata9 - I'm having a hard time to update to jdk11 :)
> I prefer stay with JDK8->TomEE8!
> 
I mean I prefer stay with JDK8->JAKARTA8->TomEE8 for my current projects. For the new ones I prefer  JDK11 -> JAKARTA9-> TomEE9.

Sorry!

> Regards,
> Gilberto
> 
> PS.: Thank you all for great project
> 
> >That's complex as we'd need to do that for various dependencies as well, who may
> > also have other branches and timelines. Having two codebases also means
> > that any changes need to be applied twice, and with renamed packages, its
> > unlikely the git merging or cherry-picking will work.
> > 
> > * Be backwards compatible - One goal I had in my mined, is that if you have
> > an application that uses javax, you'd probably like to be able to run it on
> > a new Jakarta EE server. There are some options here - I quite like the
> > idea of running the Transformer as a javaagent, so any applications
> > deployed using the old namespaces are converted on the fly at the bytecode
> > level.
> > 
> > * Tooling - I wonder what tooling we could potentially provide? One thought
> > I had was a Maven plugin that can transform a war/ear file for you as part
> > of a build.
> > 
> > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > discussions / questions are encouraged.
> > 
> > Jon
> > 
> 

Re: Javax -> Jakarta rename

Posted by Gilberto Caetano de Andrade <gi...@gmail.com>.
Hi everyone! I hope all is well with you all!!

Jonathan, I see the project with few resources (Sorry for not helping much here!) and a lot sub-project to take care - do you understand?
So, I would focus in, for example, build and certify tomEE on the Jakarta Web Profile (or minor one if the jakarta project create one)
I known my vision is simplistic, but I think and see that the project would gain more engagement and resources with fewer sub-project(JSR and now JESP[1]), taking the direction of micronaut, spring-boot, dropwizard, etc.

Regards,

Gilberto

[1] https://jakarta.ee/about/jesp/



On 2020/04/28 11:43:57, Jonathan Gallimore <jo...@gmail.com> wrote: 
> Hi Gilberto
> 
> Thanks for your post! I appreciate the you taking the time to post and give
> your views.
> 
> > I my opinion is the worst idea. TomEE has had a history of spread
> projects and this way you will obligated to stay with all of them.
> 
> Can you elaborate on what you mean with "this way you will [be] obligated
> to stay with all of them"?
> 
> > Reading about Jakarta EE 9 I've discovered that the goal is JDK11 ->
> JAKARTA9 and of course the rename thing.
> 
> That's not quite right. Java/JDK 8 is still the base for Jakarta EE 9. The
> key difference between EE8 and EE9 is the package rename. You can use JDK
> 11 with TomEE 8 today, and if you find something doesn't work, that is a
> bug, and we'd want to fix it. We'll be targeting JDK 8 and 11 for Jakarta
> EE 9.
> 
> > But the main message is you do not need be backwards compatible (you can
> if you wish).
> 
> I'd call this out as the key part of your post. You're correct,
> implementations do *not* need to be backwards compatible with Jakarta EE 8,
> and they do not need to allow or be forgiving of any code that references
> the old javax packages. The question we need to answer as a community is:
> do we want to allow backwards compatibility?
> 
> I'll very clearly state my own personal view is "yes", for the following
> reasons:
> 
> 1. One way or another, we will need to support EE 8 for a long time. TomEE
> has a wide range of users, some will find the migration easy, and some will
> take multiple years to migrate their applications. One option is to run
> parallel branches for EE8 and EE9, but it is very unlikely that changes
> will be mergeable across the two. We already have 3 active branches, and 4
> flavours of TomEE for each branch. Picking the one you want is already a
> challenge.
> 
> 2. One of the principals of TomEE is for the server to bend to fit the
> user, not the other way around. Want to bring deployment descriptors from
> another app server? No problem, we'll try and parse them and do the right
> thing. I think breaking backwards compatibility would not be particularly
> friendly to our consumers.
> 
> 3. All of TomEE's competitors are likely to have backwards compatibility.
> 
> I'd be interesting in hearing if others are in favour of dropping backwards
> compatibility.
> 
> I'm happy to look at other options to the Transformer, of course, but I
> think it merits investigation, as it potentially gives us some quick wins.
> 
> Jon
> 
> 
> 
> On Tue, Apr 21, 2020 at 8:00 PM Gilberto Caetano de Andrade <
> gilbertoca@gmail.com> wrote:
> 
> > Hi,
> >
> > On 2020/04/16 13:23:26, Jonathan Gallimore <jo...@gmail.com>
> > wrote:
> > > Hi All,
> > >
> > > You may be aware that as part of the Jakarta EE 9 release later this
> > year,
> > > the various APIs provided in TomEE will be shifting from javax namespaces
> > > to jakarta.
> > >
> > > I'm currently researching the use of the Eclipse Transformer project (
> > > https://projects.eclipse.org/projects/technology.transformer) to
> > translate
> > > both the TomEE server itself, and the source code for the examples.
> > >
> > > So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> > > TomEE that boots. There's *lots* that doesn't work at the present moment,
> > > but I'm expecting to have the moviefun example running fairly soon - that
> > > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> > covers
> > > JAX-RS too.
> > >
> > > I'm aware that there's also a migration tool that Tomcat have been
> > working
> > > on too, and will be looking at.
> > >
> > > We ought to have some discussion about the approach here - in my mind
> > there
> > > are some high-level goals:
> > >
> > > * Try and maintain a single codebase for javax and jakarta.
> > I my opinion is the worst idea. TomEE has had a history of spread projects
> > and this way you will obligated to stay with all of them.
> >
> > >It's tempting to fork master and embark on a massive renaming exercise.
> >
> > I would like to suggest another way for the TomEE project with this great
> > opportunity (please consider my words, I'm not expert in lib, just user
> > here ok!)
> > Reading about Jakarta EE 9 I've discovered that the goal is JDK11 ->
> > JAKARTA9 and of course the rename thing. But the main message is you do not
> > need be backwards compatible (you can if you wish).
> > My suggestion is to follow the train like JDK11 -> JAKARTA9-> TomEE9
> > The TomEE9 branch (I suggest it be the master one) will suffer the rename
> > task and prune the legacy project/dependency one
> >
> > Hardly I will upgrade or port my ee projects to jakata9 - I'm having a
> > hard time to update to jdk11 :)
> > I prefer stay with JDK8->TomEE8!
> >
> > Regards,
> > Gilberto
> >
> > PS.: Thank you all for great project
> >
> > >That's complex as we'd need to do that for various dependencies as well,
> > who may
> > > also have other branches and timelines. Having two codebases also means
> > > that any changes need to be applied twice, and with renamed packages, its
> > > unlikely the git merging or cherry-picking will work.
> > >
> > > * Be backwards compatible - One goal I had in my mined, is that if you
> > have
> > > an application that uses javax, you'd probably like to be able to run it
> > on
> > > a new Jakarta EE server. There are some options here - I quite like the
> > > idea of running the Transformer as a javaagent, so any applications
> > > deployed using the old namespaces are converted on the fly at the
> > bytecode
> > > level.
> > >
> > > * Tooling - I wonder what tooling we could potentially provide? One
> > thought
> > > I had was a Maven plugin that can transform a war/ear file for you as
> > part
> > > of a build.
> > >
> > > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > > discussions / questions are encouraged.
> > >
> > > Jon
> > >
> >
> 

Re: Javax -> Jakarta rename

Posted by Jonathan Gallimore <jo...@gmail.com>.
Hi Gilberto

Thanks for your post! I appreciate the you taking the time to post and give
your views.

> I my opinion is the worst idea. TomEE has had a history of spread
projects and this way you will obligated to stay with all of them.

Can you elaborate on what you mean with "this way you will [be] obligated
to stay with all of them"?

> Reading about Jakarta EE 9 I've discovered that the goal is JDK11 ->
JAKARTA9 and of course the rename thing.

That's not quite right. Java/JDK 8 is still the base for Jakarta EE 9. The
key difference between EE8 and EE9 is the package rename. You can use JDK
11 with TomEE 8 today, and if you find something doesn't work, that is a
bug, and we'd want to fix it. We'll be targeting JDK 8 and 11 for Jakarta
EE 9.

> But the main message is you do not need be backwards compatible (you can
if you wish).

I'd call this out as the key part of your post. You're correct,
implementations do *not* need to be backwards compatible with Jakarta EE 8,
and they do not need to allow or be forgiving of any code that references
the old javax packages. The question we need to answer as a community is:
do we want to allow backwards compatibility?

I'll very clearly state my own personal view is "yes", for the following
reasons:

1. One way or another, we will need to support EE 8 for a long time. TomEE
has a wide range of users, some will find the migration easy, and some will
take multiple years to migrate their applications. One option is to run
parallel branches for EE8 and EE9, but it is very unlikely that changes
will be mergeable across the two. We already have 3 active branches, and 4
flavours of TomEE for each branch. Picking the one you want is already a
challenge.

2. One of the principals of TomEE is for the server to bend to fit the
user, not the other way around. Want to bring deployment descriptors from
another app server? No problem, we'll try and parse them and do the right
thing. I think breaking backwards compatibility would not be particularly
friendly to our consumers.

3. All of TomEE's competitors are likely to have backwards compatibility.

I'd be interesting in hearing if others are in favour of dropping backwards
compatibility.

I'm happy to look at other options to the Transformer, of course, but I
think it merits investigation, as it potentially gives us some quick wins.

Jon



On Tue, Apr 21, 2020 at 8:00 PM Gilberto Caetano de Andrade <
gilbertoca@gmail.com> wrote:

> Hi,
>
> On 2020/04/16 13:23:26, Jonathan Gallimore <jo...@gmail.com>
> wrote:
> > Hi All,
> >
> > You may be aware that as part of the Jakarta EE 9 release later this
> year,
> > the various APIs provided in TomEE will be shifting from javax namespaces
> > to jakarta.
> >
> > I'm currently researching the use of the Eclipse Transformer project (
> > https://projects.eclipse.org/projects/technology.transformer) to
> translate
> > both the TomEE server itself, and the source code for the examples.
> >
> > So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> > TomEE that boots. There's *lots* that doesn't work at the present moment,
> > but I'm expecting to have the moviefun example running fairly soon - that
> > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> covers
> > JAX-RS too.
> >
> > I'm aware that there's also a migration tool that Tomcat have been
> working
> > on too, and will be looking at.
> >
> > We ought to have some discussion about the approach here - in my mind
> there
> > are some high-level goals:
> >
> > * Try and maintain a single codebase for javax and jakarta.
> I my opinion is the worst idea. TomEE has had a history of spread projects
> and this way you will obligated to stay with all of them.
>
> >It's tempting to fork master and embark on a massive renaming exercise.
>
> I would like to suggest another way for the TomEE project with this great
> opportunity (please consider my words, I'm not expert in lib, just user
> here ok!)
> Reading about Jakarta EE 9 I've discovered that the goal is JDK11 ->
> JAKARTA9 and of course the rename thing. But the main message is you do not
> need be backwards compatible (you can if you wish).
> My suggestion is to follow the train like JDK11 -> JAKARTA9-> TomEE9
> The TomEE9 branch (I suggest it be the master one) will suffer the rename
> task and prune the legacy project/dependency one
>
> Hardly I will upgrade or port my ee projects to jakata9 - I'm having a
> hard time to update to jdk11 :)
> I prefer stay with JDK8->TomEE8!
>
> Regards,
> Gilberto
>
> PS.: Thank you all for great project
>
> >That's complex as we'd need to do that for various dependencies as well,
> who may
> > also have other branches and timelines. Having two codebases also means
> > that any changes need to be applied twice, and with renamed packages, its
> > unlikely the git merging or cherry-picking will work.
> >
> > * Be backwards compatible - One goal I had in my mined, is that if you
> have
> > an application that uses javax, you'd probably like to be able to run it
> on
> > a new Jakarta EE server. There are some options here - I quite like the
> > idea of running the Transformer as a javaagent, so any applications
> > deployed using the old namespaces are converted on the fly at the
> bytecode
> > level.
> >
> > * Tooling - I wonder what tooling we could potentially provide? One
> thought
> > I had was a Maven plugin that can transform a war/ear file for you as
> part
> > of a build.
> >
> > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > discussions / questions are encouraged.
> >
> > Jon
> >
>

Re: Javax -> Jakarta rename

Posted by Gilberto Caetano de Andrade <gi...@gmail.com>.
Hi,

On 2020/04/16 13:23:26, Jonathan Gallimore <jo...@gmail.com> wrote: 
> Hi All,
> 
> You may be aware that as part of the Jakarta EE 9 release later this year,
> the various APIs provided in TomEE will be shifting from javax namespaces
> to jakarta.
> 
> I'm currently researching the use of the Eclipse Transformer project (
> https://projects.eclipse.org/projects/technology.transformer) to translate
> both the TomEE server itself, and the source code for the examples.
> 
> So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> TomEE that boots. There's *lots* that doesn't work at the present moment,
> but I'm expecting to have the moviefun example running fairly soon - that
> covers EJB, Servlets, JSPs, JPA. The REST version of the sample also covers
> JAX-RS too.
> 
> I'm aware that there's also a migration tool that Tomcat have been working
> on too, and will be looking at.
> 
> We ought to have some discussion about the approach here - in my mind there
> are some high-level goals:
> 
> * Try and maintain a single codebase for javax and jakarta. 
I my opinion is the worst idea. TomEE has had a history of spread projects and this way you will obligated to stay with all of them. 

>It's tempting to fork master and embark on a massive renaming exercise. 

I would like to suggest another way for the TomEE project with this great opportunity (please consider my words, I'm not expert in lib, just user here ok!)
Reading about Jakarta EE 9 I've discovered that the goal is JDK11 -> JAKARTA9 and of course the rename thing. But the main message is you do not need be backwards compatible (you can if you wish).
My suggestion is to follow the train like JDK11 -> JAKARTA9-> TomEE9
The TomEE9 branch (I suggest it be the master one) will suffer the rename task and prune the legacy project/dependency one

Hardly I will upgrade or port my ee projects to jakata9 - I'm having a hard time to update to jdk11 :)
I prefer stay with JDK8->TomEE8!

Regards,
Gilberto

PS.: Thank you all for great project

>That's complex as we'd need to do that for various dependencies as well, who may
> also have other branches and timelines. Having two codebases also means
> that any changes need to be applied twice, and with renamed packages, its
> unlikely the git merging or cherry-picking will work.
> 
> * Be backwards compatible - One goal I had in my mined, is that if you have
> an application that uses javax, you'd probably like to be able to run it on
> a new Jakarta EE server. There are some options here - I quite like the
> idea of running the Transformer as a javaagent, so any applications
> deployed using the old namespaces are converted on the fly at the bytecode
> level.
> 
> * Tooling - I wonder what tooling we could potentially provide? One thought
> I had was a Maven plugin that can transform a war/ear file for you as part
> of a build.
> 
> Anyway, just wanted to give a heads-up on the research. Any thoughts /
> discussions / questions are encouraged.
> 
> Jon
> 

Re: Javax -> Jakarta rename

Posted by Cesar Hernandez <ce...@gmail.com>.
Thanks, Jonathan for the update and information.

In case someone else finds it useful, it seems it requires Java 8 [1] in
your environment.


[1]
https://github.com/cesarhernandezgt/transformer/blob/master/build.gradle#L11

El lun., 20 abr. 2020 a las 14:33, Daniel Dias Dos Santos (<
daniel.dias.analistati@gmail.com>) escribió:

> Hello Jon,
>
> thanks :  )
> --
>
> *Daniel Dias dos Santos*
> Java Developer
> SouJava & JCP Member
> GitHub: https://github.com/Daniel-Dos
> Linkedin: www.linkedin.com/in/danieldiasjava
> Twitter: http://twitter.com/danieldiasjava
>
>
> Em seg., 20 de abr. de 2020 às 17:25, Jonathan Gallimore <
> jonathan.gallimore@gmail.com> escreveu:
>
> > Hi folks
> >
> > To follow up on this, I've created some JIRA tickets to get us started:
> > https://issues.apache.org/jira/browse/TOMEE-2801 and also added some
> > documentation to the website:
> > http://tomee.apache.org/tomee-8.0/docs/jakartaee-9/index.html
> >
> > I'd suggest starting by trying to run the transformer by hand, and then
> see
> > if there's a JIRA you'd particularly like to have a go at. A good initial
> > target would be getting a good ruleset for the transformer and getting
> some
> > examples to run. After that, we can look into running the TCK.
> >
> > If you're able to dig in great. If this all sounds a bit wild, I'd very
> > much encourage you to ask questions - I appreciate the offers of help,
> and
> > I definitely want to help you help the project!
> >
> > Jon
> >
> > On Thu, 16 Apr 2020, 14:23 Jonathan Gallimore, <
> > jonathan.gallimore@gmail.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > You may be aware that as part of the Jakarta EE 9 release later this
> > year,
> > > the various APIs provided in TomEE will be shifting from javax
> namespaces
> > > to jakarta.
> > >
> > > I'm currently researching the use of the Eclipse Transformer project (
> > > https://projects.eclipse.org/projects/technology.transformer) to
> > > translate both the TomEE server itself, and the source code for the
> > > examples.
> > >
> > > So far, I have a converted javaee-api.jar, and a Jakarta-ized version
> of
> > > TomEE that boots. There's *lots* that doesn't work at the present
> moment,
> > > but I'm expecting to have the moviefun example running fairly soon -
> that
> > > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> > covers
> > > JAX-RS too.
> > >
> > > I'm aware that there's also a migration tool that Tomcat have been
> > working
> > > on too, and will be looking at.
> > >
> > > We ought to have some discussion about the approach here - in my mind
> > > there are some high-level goals:
> > >
> > > * Try and maintain a single codebase for javax and jakarta. It's
> > > tempting to fork master and embark on a massive renaming exercise.
> That's
> > > complex as we'd need to do that for various dependencies as well, who
> may
> > > also have other branches and timelines. Having two codebases also means
> > > that any changes need to be applied twice, and with renamed packages,
> its
> > > unlikely the git merging or cherry-picking will work.
> > >
> > > * Be backwards compatible - One goal I had in my mined, is that if you
> > > have an application that uses javax, you'd probably like to be able to
> > run
> > > it on a new Jakarta EE server. There are some options here - I quite
> like
> > > the idea of running the Transformer as a javaagent, so any applications
> > > deployed using the old namespaces are converted on the fly at the
> > bytecode
> > > level.
> > >
> > > * Tooling - I wonder what tooling we could potentially provide? One
> > > thought I had was a Maven plugin that can transform a war/ear file for
> > you
> > > as part of a build.
> > >
> > > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > > discussions / questions are encouraged.
> > >
> > > Jon
> > >
> >
>


-- 
Atentamente:
César Hernández.

Re: Javax -> Jakarta rename

Posted by Daniel Dias Dos Santos <da...@gmail.com>.
Hello Jon,

thanks :  )
--

*Daniel Dias dos Santos*
Java Developer
SouJava & JCP Member
GitHub: https://github.com/Daniel-Dos
Linkedin: www.linkedin.com/in/danieldiasjava
Twitter: http://twitter.com/danieldiasjava


Em seg., 20 de abr. de 2020 às 17:25, Jonathan Gallimore <
jonathan.gallimore@gmail.com> escreveu:

> Hi folks
>
> To follow up on this, I've created some JIRA tickets to get us started:
> https://issues.apache.org/jira/browse/TOMEE-2801 and also added some
> documentation to the website:
> http://tomee.apache.org/tomee-8.0/docs/jakartaee-9/index.html
>
> I'd suggest starting by trying to run the transformer by hand, and then see
> if there's a JIRA you'd particularly like to have a go at. A good initial
> target would be getting a good ruleset for the transformer and getting some
> examples to run. After that, we can look into running the TCK.
>
> If you're able to dig in great. If this all sounds a bit wild, I'd very
> much encourage you to ask questions - I appreciate the offers of help, and
> I definitely want to help you help the project!
>
> Jon
>
> On Thu, 16 Apr 2020, 14:23 Jonathan Gallimore, <
> jonathan.gallimore@gmail.com>
> wrote:
>
> > Hi All,
> >
> > You may be aware that as part of the Jakarta EE 9 release later this
> year,
> > the various APIs provided in TomEE will be shifting from javax namespaces
> > to jakarta.
> >
> > I'm currently researching the use of the Eclipse Transformer project (
> > https://projects.eclipse.org/projects/technology.transformer) to
> > translate both the TomEE server itself, and the source code for the
> > examples.
> >
> > So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> > TomEE that boots. There's *lots* that doesn't work at the present moment,
> > but I'm expecting to have the moviefun example running fairly soon - that
> > covers EJB, Servlets, JSPs, JPA. The REST version of the sample also
> covers
> > JAX-RS too.
> >
> > I'm aware that there's also a migration tool that Tomcat have been
> working
> > on too, and will be looking at.
> >
> > We ought to have some discussion about the approach here - in my mind
> > there are some high-level goals:
> >
> > * Try and maintain a single codebase for javax and jakarta. It's
> > tempting to fork master and embark on a massive renaming exercise. That's
> > complex as we'd need to do that for various dependencies as well, who may
> > also have other branches and timelines. Having two codebases also means
> > that any changes need to be applied twice, and with renamed packages, its
> > unlikely the git merging or cherry-picking will work.
> >
> > * Be backwards compatible - One goal I had in my mined, is that if you
> > have an application that uses javax, you'd probably like to be able to
> run
> > it on a new Jakarta EE server. There are some options here - I quite like
> > the idea of running the Transformer as a javaagent, so any applications
> > deployed using the old namespaces are converted on the fly at the
> bytecode
> > level.
> >
> > * Tooling - I wonder what tooling we could potentially provide? One
> > thought I had was a Maven plugin that can transform a war/ear file for
> you
> > as part of a build.
> >
> > Anyway, just wanted to give a heads-up on the research. Any thoughts /
> > discussions / questions are encouraged.
> >
> > Jon
> >
>

Re: Javax -> Jakarta rename

Posted by Jonathan Gallimore <jo...@gmail.com>.
Hi folks

To follow up on this, I've created some JIRA tickets to get us started:
https://issues.apache.org/jira/browse/TOMEE-2801 and also added some
documentation to the website:
http://tomee.apache.org/tomee-8.0/docs/jakartaee-9/index.html

I'd suggest starting by trying to run the transformer by hand, and then see
if there's a JIRA you'd particularly like to have a go at. A good initial
target would be getting a good ruleset for the transformer and getting some
examples to run. After that, we can look into running the TCK.

If you're able to dig in great. If this all sounds a bit wild, I'd very
much encourage you to ask questions - I appreciate the offers of help, and
I definitely want to help you help the project!

Jon

On Thu, 16 Apr 2020, 14:23 Jonathan Gallimore, <jo...@gmail.com>
wrote:

> Hi All,
>
> You may be aware that as part of the Jakarta EE 9 release later this year,
> the various APIs provided in TomEE will be shifting from javax namespaces
> to jakarta.
>
> I'm currently researching the use of the Eclipse Transformer project (
> https://projects.eclipse.org/projects/technology.transformer) to
> translate both the TomEE server itself, and the source code for the
> examples.
>
> So far, I have a converted javaee-api.jar, and a Jakarta-ized version of
> TomEE that boots. There's *lots* that doesn't work at the present moment,
> but I'm expecting to have the moviefun example running fairly soon - that
> covers EJB, Servlets, JSPs, JPA. The REST version of the sample also covers
> JAX-RS too.
>
> I'm aware that there's also a migration tool that Tomcat have been working
> on too, and will be looking at.
>
> We ought to have some discussion about the approach here - in my mind
> there are some high-level goals:
>
> * Try and maintain a single codebase for javax and jakarta. It's
> tempting to fork master and embark on a massive renaming exercise. That's
> complex as we'd need to do that for various dependencies as well, who may
> also have other branches and timelines. Having two codebases also means
> that any changes need to be applied twice, and with renamed packages, its
> unlikely the git merging or cherry-picking will work.
>
> * Be backwards compatible - One goal I had in my mined, is that if you
> have an application that uses javax, you'd probably like to be able to run
> it on a new Jakarta EE server. There are some options here - I quite like
> the idea of running the Transformer as a javaagent, so any applications
> deployed using the old namespaces are converted on the fly at the bytecode
> level.
>
> * Tooling - I wonder what tooling we could potentially provide? One
> thought I had was a Maven plugin that can transform a war/ear file for you
> as part of a build.
>
> Anyway, just wanted to give a heads-up on the research. Any thoughts /
> discussions / questions are encouraged.
>
> Jon
>