On 12/21/2012 4:12 PM, Skriloff, Nicholas wrote:
> I have three questions
> 1) I want to see all the restful urls available when I start up EAP6 in
> the server.log file.  How do I configure standalone.xml logging to show
> the rest easy services that are exposed and their paths?

Resteasy does not have that capability.  It only  specifies which 
classes have been deployed at deploy time.

> 2) Should I upgrade to latest RESTeasy eventhough I am presently running
> EAP6 unmodified to get the lastest and greatest?

Weinan made a good suggestion.  Read the release notes and see if its 
worth upgrading.  But, future 2.3.x releases will probably only be done 
within EAP.  We're fully focused on 3.x now.

> 3)
> I develop a registrar system for students to enroll into classes.  One
> of the war files is registrar-student.war.   I am trying to expose my
> first RESTeasy webservice.   I am running EAP6, which runs resteasy 2.3.3 .
> I have an ejb that does code table lookups and I figured that is as good
> as place as any to start.
> So, I put this class in the app
> import javax.ws.rs.ApplicationPath;
> import javax.ws.rs.core.Application;
> @ApplicationPath("/registrarWebservices")
> public class RegistrarWebServicesApplication extends Application {
> //public class RegistrarWebServicesApplication  {
> }
> I first tried adding the code below to the interface.  I got the below
> error.  I added the same code directly to the ejb.  I got the same below
> error.
> @Path("/codetables")
> public class UncheckedCodeTablesBean implements SessionBean,
> UncheckedCodeTablesMethods {

The error is what it says.  You can only apply JAX-RS @PATH and method 
annotations (@GET, etc.) to a local interface or no-interface EJB class.

So, move your @Path and @GET, @Produces annotatiosn to your 
UncheckedCodeTablesMethods interface, or make the bean a no-interface 
bean class.

Also, your EJB is very "old school" :)  Try EJB3.x annotations?

public class UncheckedCodeTablesBean implements 
UncheckedCodeTablesMethods {}

Or even, just remove the interface entirely and just write a class.

And ditch your XML of course :)

Bill Burke
JBoss, a division of Red Hat

Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
Resteasy-users mailing list

Reply via email to