Ozark is the reference implementation of MVC 1.0 (JSR 371) and will be part of Java EE 8. This post is not about MVC features. It contains a few tips on how to try out Ozark on WildFly 10. The problem is Ozark currently depends on Jersey JAX-RS implementation. And so if you want to test it on a EE container other than GlassFish4 (and possibly others which bundle Jersey) you'll run into troubles. The good news is it's quite easy to add some additional configuration and run your MVC experiments on WildFly 10. Three additional steps are required:
We will need to add:
org.glassfish.jersey.ext:jersey-bean-validation(and also exclude
hibernate-validatorfor this dependency)
See also the wildfly profile in https://github.com/mkouba/todo-mvc/blob/wildfly/pom.xml#L117.
Let's exclude the jaxrs subsystem by means of
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"> <deployment> <exclude-subsystems> <subsystem name="jaxrs" /> </exclude-subsystems> </deployment> </jboss-deployment-structure>
You could either supress implicit bean archives globally or per-deployment with
jboss-all.xml descriptor in WEB-INF:
<jboss xmlns="urn:jboss:1.0"> <weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/> </jboss>
After this setup the MVC application should start working. Note that it's no proper integration but a simple workaround to allow you to test MVC RI on WildFly 10.
|Retrieving data ...|