Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support WildFly #180

Open
m-reza-rahman opened this issue Feb 14, 2021 · 26 comments
Open

Support WildFly #180

m-reza-rahman opened this issue Feb 14, 2021 · 26 comments
Labels
backlog Items yet to be prioritized in the longer term roadmap. enhancement New feature or request help wanted Extra attention is needed Priority: Trivial

Comments

@m-reza-rahman
Copy link
Contributor

As an alternative to Payara or default runtime.

@m-reza-rahman m-reza-rahman added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers Priority: Major labels Feb 14, 2021
@m-reza-rahman m-reza-rahman added this to the jakartaee8 milestone Feb 14, 2021
@m-reza-rahman m-reza-rahman removed this from the jakartaee8 milestone Feb 20, 2021
@m-reza-rahman m-reza-rahman added backlog Items yet to be prioritized in the longer term roadmap. and removed Priority: Major labels Feb 20, 2021
@m-reza-rahman m-reza-rahman changed the title Support WildFly or Open Liberty Support WildFly/JBoss EAP, Open Liberty/WebSphere Liberty or WebLogic Mar 6, 2021
@hantsy
Copy link
Contributor

hantsy commented Mar 19, 2021

WildFly/Hibernate is ok in my fork, I have not tried to run it in OpenLiberty.

@m-reza-rahman
Copy link
Contributor Author

m-reza-rahman commented Mar 19, 2021

Does it also work with Payara? How about the Arquillian tests? If so, let me create a separate branch and you can issue the PR there. Once I can examine the code and do regression testing to verify everything is OK for both servers, we can merge it to master.

@hantsy
Copy link
Contributor

hantsy commented Mar 19, 2021

Yes, I added Github Actions to build it and running tests. https://github.com/hantsy/cargotracker/

  1. JPA Entities, there are small fixes added due to some Hibernate-specific issues. Check notes in https://github.com/hantsy/cargotracker/blob/master/src/main/java/org/eclipse/cargotracker/domain/model/cargo/Itinerary.java
  2. Jackson is used by default in the latest WildFly, but not configure Java 8 DateTimeSupport. https://github.com/hantsy/cargotracker/blob/master/src/main/java-wildfly/org/eclipse/cargotracker/infrastructure/routing/client/JacksonObjectMapperContextResolver.java
  3. To avoid the famous lazy init exception from Hibernate etc, use a transaction to wrap the codes where some lazy access on a proxied object there, I added some @transactional in some web layer codes, and use manual UserTransaction in the tests to make the codes work. https://github.com/hantsy/cargotracker/blob/master/src/test/java/org/eclipse/cargotracker/application/BookingServiceTest.java It seems the @Transactional did not work in Arquillian tests directly.

@hantsy
Copy link
Contributor

hantsy commented Mar 19, 2021

Another issue I found about the LocalDateTime persistence in Hibernate, https://github.com/hantsy/cargotracker/blob/master/src/main/java/org/eclipse/cargotracker/domain/model/cargo/Leg.java#L66, the nano value is different when fetching from db.

Not sure there are some configuration in Hibernate to fix it.

@m-reza-rahman
Copy link
Contributor Author

I just want to be clear - at this point do you have a codebase that works with both Payara and WildFly? Or is it the case that you have ported the code to WildFly and it no longer works with Payara? If it’s the latter, do you need help achieving the former?

@hantsy
Copy link
Contributor

hantsy commented Mar 20, 2021

Yeah, my fork works both Payara and WildFly.

  1. The tests passed on both Payara and WildFly. My fork has more tests than the upstream.
  2. Manually deployed to WildFly successfully (but I am not sure everything is working well, not tried every links).

@m-reza-rahman
Copy link
Contributor Author

OK, I have created a 'develop' branch you can issue PRs against. Hopefully we don't have to keep that branch longer term. It is a bit cumbersome.

@hantsy
Copy link
Contributor

hantsy commented Mar 21, 2021

WildFly support is availble in #195

@hantsy
Copy link
Contributor

hantsy commented Apr 18, 2021

I think the basic Hibernate/WildFly is included in the develop branch.

So it is better to split this issue into smaller issues.

Such as:

  • Open Liberty Support
  • Oracle Weblogic Support

@m-reza-rahman
Copy link
Contributor Author

I wouldn't say this is a very big priority for us just yet. It is a good way to get contributions though. I would like to keep it as-is for now.

@m-reza-rahman m-reza-rahman added Priority: Trivial Priority: Minor and removed backlog Items yet to be prioritized in the longer term roadmap. Priority: Trivial labels Apr 18, 2021
@m-reza-rahman
Copy link
Contributor Author

For folks interested in WildFly support, there is an initial starting point here: https://github.com/eclipse-ee4j/cargotracker/tree/wildfly-experimental.

@hantsy
Copy link
Contributor

hantsy commented Jun 6, 2021

I tried to run the Cargotracker application on OpenLiberty,

  1. All annotation-based configurations for DataSource and JMS Queue did not work. Check: https://twitter.com/hantsy/status/1401371324652691457?s=20 and https://twitter.com/hantsy/status/1401369955912781831?s=20
    I am not sure if the configurations via web.xml are working?

  2. MyFaces is another challenge, there are some compatible issues when opening the pages.

Currently, I created a branch in my fork for running on OpenLiberty, https://github.com/hantsy/cargotracker/tree/openliberty-config
Changes can be found in the PR: https://github.com/hantsy/cargotracker/pull/59/files

@m-reza-rahman
Copy link
Contributor Author

Please post questions to the Open Liberty and MyFaces forums?

@hantsy
Copy link
Contributor

hantsy commented Jun 7, 2021

Posted in OpenLiberty Gitter channels and groups.io, but Open liberty seems not active as others. In Gitter channels, only a few messages over months.

@hantsy
Copy link
Contributor

hantsy commented Jun 7, 2021

Now the main problem is myfaces. For DataSource and JMS config, it seems I have to remove the global prefix(java:app/) from its JNDI name to make it work.

@hantsy
Copy link
Contributor

hantsy commented Jun 7, 2021

@m-reza-rahman The portable @DataSourceDefinition and @JMSDestinationDefinition are required part of the Jakarta EE TCK?

@m-reza-rahman
Copy link
Contributor Author

I don't know. I would ask on the TCK alias: https://accounts.eclipse.org/mailing-list/jakartaee-tck-dev.

@m-reza-rahman m-reza-rahman added backlog Items yet to be prioritized in the longer term roadmap. and removed Priority: Minor labels Nov 2, 2021
@m-reza-rahman
Copy link
Contributor Author

Some experimental work for Liberty support here: https://github.com/eclipse-ee4j/cargotracker/tree/liberty-experimental.

@m-reza-rahman m-reza-rahman changed the title Support WildFly/JBoss EAP, Open Liberty/WebSphere Liberty or WebLogic Support WildFly, Open Liberty Jan 2, 2023
@m-reza-rahman m-reza-rahman changed the title Support WildFly, Open Liberty Support GlassFish, WildFly, Open Liberty Feb 3, 2023
@ojuschugh1
Copy link
Contributor

I am working for documentation to use WIldFly as a runtime. Is it ok sir?

@m-reza-rahman
Copy link
Contributor Author

Sure, please go ahead?

@ojuschugh1
Copy link
Contributor

ok thanks i was waiting for permission :)

@m-reza-rahman
Copy link
Contributor Author

m-reza-rahman commented Mar 28, 2023

GlassFish port in progress here: #243.

@m-reza-rahman m-reza-rahman removed help wanted Extra attention is needed good first issue Good for newcomers labels Aug 13, 2023
@m-reza-rahman m-reza-rahman added help wanted Extra attention is needed good first issue Good for newcomers labels Aug 26, 2023
@m-reza-rahman m-reza-rahman changed the title Support GlassFish, WildFly, Open Liberty Support WildFly, Open Liberty Sep 17, 2023
@m-reza-rahman
Copy link
Contributor Author

GlassFish support merged to main here: #282.

@m-reza-rahman
Copy link
Contributor Author

Liberty support merged to main here: #283

@m-reza-rahman m-reza-rahman changed the title Support WildFly, Open Liberty Support WildFly Sep 22, 2023
@m-reza-rahman m-reza-rahman added the help wanted Extra attention is needed label Jan 16, 2024
@marcelomrwin
Copy link

marcelomrwin commented Jun 11, 2024

If anyone wants to see an example working in wildfly, You can do so through the https://github.com/marcelomrwin/cargo-tracker/tree/wildfly branch. Furthermore, there is a demonstration of how to use with containers and the simple insertion of integrated authentication with keycloak

@m-reza-rahman
Copy link
Contributor Author

It would be helpful to contribute towards merging this work to the main branch: https://github.com/eclipse-ee4j/cargotracker/tree/wildfly-experimental.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Items yet to be prioritized in the longer term roadmap. enhancement New feature or request help wanted Extra attention is needed Priority: Trivial
Projects
None yet
Development

No branches or pull requests

4 participants