Hi List,
I'm working on evaluating MVC/Ozark as a replacement for an old JSF project, and so far things are going pretty well.
One question I had is, is there any public maven repository with milestone 4 snapshot builds?
And I think I may have found an issue with Ozark on Wildfly/Resteasy, relating back to the recent bootstrapping changes that were done with issues 129 and 140. The base problem is the entry for OzarkCoreFeature in META-INF/services/javax.ws.rs.ext.Providers. It seems that Resteasy is ignoring the @ConstrainedTo(RuntimeType.SERVER) annotation on OzarkCoreFeature when the class is loaded this way, which ultimately causes problems if you try to use a JAX-RS client instance, as OzarkCoreFeature injects the servlet context, which won't be available for a client operation. You can see this behavior with the simple timer EJB code below on Wildfly 11 or 12 deployed along with your MVC app (you'll see the error every time the timer fires), but everything works fine with Glassfish 5.
At any rate, I think the intention with the fixes for 129 and 140 was to get auto-detection working, and as far as I can tell it is working, so this file entry in META-INF/services really isn't needed anymore.
Here's the code for the simple timer EJB that uses a JAX-RS client and exposes the bad behavior.
Thanks!
Chris
@javax.ejb.Singleton
public class TimerEjb {
private final static Logger log = Logger.getLogger(TimerEjb.class.getName());
@javax.ejb.Schedule(minute = "*", hour = "*")
public void timerUpdate() {
final Client restClient = ClientBuilder.newClient(); // <-- this will cause an error
restClient.close();
}
}