Re: [Resteasy-users] undeclaring some methods (of an interface) as being RESTful

2012-11-08 Thread Weinan Li


--  
Weinan Li
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Thursday, November 8, 2012 at 1:49 AM, Dominique de Vito wrote:

 Hi,
  
 My use case: I have had a **single** interface where was defined both:
 - my (annotated) REST methods
 - my EJB methods, which are exactly the same than my REST methods
 because my REST interface is implemented through an EJB (3.0).
  
 I wanted to declare an EJB method that would not be a REST method.
 So, I've put this method into my REST interface, but without any REST 
 annotation associated with this method.
  
 During my test, Rest-Easy rised an error, because, even if  this new method 
 was not associated with any REST annotation, the class has one: a @Path 
 annotation.
 So, it looks like Rest-Easy is expecting this new method to be a REST method 
 too (like others within the same interface), and then, Rest-Easy is expected 
 REST annotations with this new method.
hmm… This shouldn't happen. Dominique, I've created a sample project here:

https://github.com/liweinan/javaee

And here is the @RequestScopedBean with a voidMethod that doesn't have a JAX-RS 
annotation:

https://github.com/liweinan/javaee/blob/master/src/main/java/net/bluedash/rest/MemberResourceRESTService.java
  

And I've deployed it to jbossas, it works with no problem. Could you please 
help to check it and try to modify it to show your problem?
  
 So, I am looking for the following: tell Rest-Easy this or that method (of an 
 interface) is not to be understood as a REST method.
  
 Is there a way to do that ?
 Thanks.
  
 Regards,
 Dominique
  
  
 --
 LogMeIn Central: Instant, anywhere, Remote PC access and management.
 Stay in control, update software, and manage PCs from one command center
 Diagnose problems and improve visibility into emerging IT issues
 Automate, monitor and manage. Do more in less time with Central
 http://p.sf.net/sfu/logmein12331_d2d
  
 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net 
 (mailto:Resteasy-users@lists.sourceforge.net)
 https://lists.sourceforge.net/lists/listinfo/resteasy-users
  
  


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] undeclaring some methods (of an interface) as being RESTful

2012-11-08 Thread Dominique de Vito
Well, AFAIK, @RequestScoped is related to CDI.
But we are developping with JBoss 5.1, in a non-CDI context.


So, unfortunately, I can't use/follow your way.
Thanks anyway.


Regards,
Dominique




 De : Weinan Li l.wei...@gmail.com
À : Dominique de Vito ddv36...@yahoo.fr 
Cc : resteasy-users@lists.sourceforge.net 
resteasy-users@lists.sourceforge.net 
Envoyé le : Jeudi 8 novembre 2012 13h42
Objet : Re: [Resteasy-users] undeclaring some methods (of an interface) as 
being RESTful
 





-- 
Weinan Li
Sent with Sparrow

On Thursday, November 8, 2012 at 1:49 AM, Dominique de Vito wrote:
Hi,

My use case: I have had a **single** interface where was defined both:
- my (annotated) REST methods
- my EJB methods, which are exactly the same than my REST methods
because my REST interface is implemented through an EJB (3.0).

I wanted to declare an EJB method that would not be a REST method.
So, I've put this method into my REST interface, but without any REST 
annotation associated with this method.

During my test, Rest-Easy rised an error, because, even if  this new method 
was not associated with any REST annotation, the class has one: a @Path 
annotation.
So, it looks like Rest-Easy is expecting this new method to be a REST method 
too (like others within the same interface), and then, Rest-Easy is expected 
REST annotations with this new method.

hmm… This shouldn't happen. Dominique, I've created a sample project here:

https://github.com/liweinan/javaee

And here is the @RequestScopedBean with a voidMethod that doesn't have a JAX-RS 
annotation:

https://github.com/liweinan/javaee/blob/master/src/main/java/net/bluedash/rest/MemberResourceRESTService.java 

And I've deployed it to jbossas, it works with no problem. Could you please 
help to check it and try to modify it to show your problem?

So, I am looking for the
 following: tell Rest-Easy this or that method (of an interface) is not to be 
understood as a REST method.

Is there a way to do that ?
Thanks.

Regards,
Dominique




--
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users --
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users