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

How-To replace RestEasy with Jersey in WildFly #93

Closed
noahwhite opened this issue Nov 10, 2013 · 23 comments
Closed

How-To replace RestEasy with Jersey in WildFly #93

noahwhite opened this issue Nov 10, 2013 · 23 comments

Comments

@noahwhite
Copy link

Similar to #92 a How-To that explains replacing RestEasy with Jersey in WildFly would be useful. I wonder what implications this would have on any RestEasy usage that might be part of the WildFly administration console. I think it's nearly impossible to switch JAX-RS impls. in Glassfish for this reason, but I could be mistaken. If its not possible to replace at the AS level then a sample showing its usage in a WAR and EAR would be useful.

@paulkmoore
Copy link

@noahwhite I'm attempting this integration at the moment.

It is non-trivial, but basically it involves:

  • Disabling the incumbent RestEasy implementation (this is configuration in standalone.xml/domain.xml)
  • Creating a Wildlfy module which is effectively the Jersey bundle (for Glassfish) and a module.xml which manages the Jersey jars and Wildfly dependencies

I have it basically working, but there are some issues with (at least):

  • Package scanning - because of the Wildfly's deployment name mapping (e.g. standalone/data/content///content) there's a conflict between the path assumption of Jersey.
  • Servlet Security integration - currently investigating why this doesn't work
  • Lot's of Weld / HK2 CDI Integration issues - unsure of the current extent or even whether this is resolvable

I've unconvinced whether the integration (if possible) will be too fragile to be an ongoing concern.

If any others are going through the same I'd love to hear from you...

@arun-gupta
Copy link
Contributor

Thanks a lot guys! I just tweeted about it and see if others are willing to chime in.

Talked to Bill Burke about it and its not on his priority list.

@noahwhite
Copy link
Author

Thanks, I suspect its going to be a bear if its even possible but its something that would be attractive to Glassfish users who might be interested in migrating to WildFly/JBoss vs. WebLogic. They will be weighing the cost of WebLogic vs development cost of porting Jersey and Eclipselink dependencies.

@varmenise
Copy link

Hi, is there any eta on this?
I am trying to migrate my app which uses Wildfly, jersey1.9 and EJB to Wildfly/jersey 2.
The problem, indeed, is that I am having a lot of integration issues with hk2, CDI and WELD and a lot of errors like "unsatisfied dependency for type.."

@arun-gupta
Copy link
Contributor

I did not try this any further.

This will not be a supported configuration anyway.

@RishikeshDarandale
Copy link

Valentina/Arun,
Any luck for deploying a jersey2 application in WildFly 8? I am also getting the errors mentioned by Valentina.

@varmenise
Copy link

honestly, I gave up.. ended up using restEasy

@arun-gupta
Copy link
Contributor

@RishikeshDarandale Any reason you can't use RESTEasy and want Jersey ?

@slamdev
Copy link

slamdev commented Oct 7, 2014

@arun-gupta what about runing jersey-mvc on wildfly?

@arun-gupta
Copy link
Contributor

@slamdev have you tried running it ? It's proprietary feature of Jersey, which will hopefully be standardized in MVC 1.0.

@fthamura
Copy link

fthamura commented Oct 7, 2014

Under license cddl,

Are you sure wanna to use Jersey?

Here we try to far away from cddl license

F
On Oct 7, 2014 10:53 PM, "Arun Gupta" notifications@github.com wrote:

@slamdev https://github.com/slamdev have you tried running it ? It's
proprietary feature of Jersey, which will hopefully be standardized in MVC
1.0.


Reply to this email directly or view it on GitHub
#93 (comment)
.

@slamdev
Copy link

slamdev commented Oct 7, 2014

@arun-gupta yes, I have tried and it is not working. I am really waiting for the MVC JSR but it is too long to be out. Jersey MVC is tightly coupled with jersey core and cannot be used outside of it.

@fthamura I will be happy to use anything else, but I am not able to find any analogs. Do you know any framework with the similar functionality?

@arun-gupta
Copy link
Contributor

@slamdev so that seems more a question for Jersey team ?

@slamdev
Copy link

slamdev commented Oct 7, 2014

@arun-gupta well, if it is possible to run another jax-rs implementation on the wildfly, then there will be no issues with jersey mvc. Probably this very issue should be resolved by the wildfly's team?

@arun-gupta
Copy link
Contributor

@slamdev WildFly is already bundled with RESTEasy and provides full support for JAX-RS 2.0. WildFly team does not plan to support Jersey and its proprietary features.

@slamdev
Copy link

slamdev commented Oct 7, 2014

@arun-gupta I mean that it will be cool if wildfly can support not only resteasy jax-rs implementation but the other ones. Like it supports not only hibernate as jpa implementation but the eclipselink too.

@arun-gupta
Copy link
Contributor

@slamdev JPA provides a mechanism to have pluggable persistence provider and that's why the underlying JPA implementation can be easily switched. This would require a specification change and then I can see WildFly team adding this feature.

@slamdev
Copy link

slamdev commented Oct 7, 2014

@arun-gupta Thanks, now it is clear for me. I thought that jax-rs is also pluggable, the same as jpa.

@arun-gupta
Copy link
Contributor

@slamdev I think it makes sense, do you want to file a bug at https://java.net/jira/browse/JAX_RS_SPEC ?

@slamdev
Copy link

slamdev commented Oct 7, 2014

@arun-gupta
Copy link
Contributor

Excellent, tweeted at https://twitter.com/arungupta/status/519554390756061185

Help spread the word!

@oluwasayo
Copy link

@arun-gupta I think WADL publishing (just like the WSDL for jax-ws) is a good enough reason. That's what led me here from Google Search. I've seen the Maven Jersey plugging that does this at build time but I think that's not good enough. Besides, my project uses Ant.
Any help?

@arun-gupta
Copy link
Contributor

Closing this issue, please open a new issue for this or discuss in Jersey list.

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

No branches or pull requests

8 participants