Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: trouble whit @Service annotation

  1. #1

    Default trouble whit @Service annotation

    I'm not an expert in spring.
    I try to see how work @service annotation, because it's an interesting option, to expose services to flex.
    I see that, when deploy an class, as .class file, everything work as is expected. But when deploy same class as jar, service it's not exposed.
    Can someone to confirm that problem?
    Or need some extra configuration?

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    The annotation that actually exposes a remote object is: @RemotingDestination. Are you using that along with @Service?

    Can you provide some excerpts from your code/configuration?

  3. #3

    Default

    I try'it to follow test drive posted by Cristophe Coenraets. In this example it'se used both annotation, @Service and @RemotingDestination.
    My class look like this:
    Code:
    @Service("myService")
    @RemotingDestination(channels = { "my-amf" })
    public class MyTestService {
    
    	@RemotingInclude
    	public String testMethod() {
    		return "Hello World!";
    	}
    }
    Everything work fine, when class it's deployed as class file, but service it's not found when i deploy as jar.
    Thanks for reply!

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    Are you saying it works in WEB-INF/classes but not when deployed as a jar in WEB-INF/lib?

  5. #5

    Default

    Yes, that i want to say.

  6. #6
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    Did you rebuild the WAR?

    By the way, you can also run the testdrive sample from the SpringBlazeDS distribution within Eclipse/WTP as described here:
    http://static.springframework.org/sp...html/ch06.html

  7. #7

    Default

    I don't have an war file. BlazeDS it's deployed as directory structure, and jar file it's put in his lib directory.

  8. #8
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    You are using the downloaded sample zip from this blog, correct?:
    http://coenraets.org/blog/2009/05/ne...on-test-drive/

  9. #9

    Default

    Yes, but post from Coenraets, give me idea.
    I work on my own test-drive application, because i try to use hibernate. Coenraets , in his test-drive, use JDBC template.
    Anyway, thanks to your help from another post, application work, i can invoke service exposed by @Service, but only when deploy class as class file. That is strange.

  10. #10
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    Okay. That is strange. You are putting the JAR in webapps/ROOT/WEB-INF/lib? Did you restart?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •