Hi Jetty users and experts

 

I thought that jetty only redeploy the class that got update but it isn't
the case. See the below class:

 

@Component

@Path("/")

public class Example1Service {

 

    private final StatefulResource resource;    //referencing to a spring
autowired class with an AtomicInteger counter

    private final static Logger logger = LoggerFactory

            .getLogger(Example1Service.class);

 

    @Autowired

    public Example1Service(StatefulResource resource) {

        logger.debug("Example1Service constructed\n");

        this.resource = resource;

    }

 

    @GET

    @Path("counter")

    @Produces(MediaType.TEXT_PLAIN)

    public String getCounter() {

        return "Example1Service(3)" + resource.getCounter(); //change this
to Example1Service(1)

    }

}

 

The Example1Service REST class reference to a class auto-wired by Spring
autowired. I expecting when i updated the service class, jetty will redeploy
this service and auto-wired the same instance again because spring DI by
default has a singleton initialization setting, isn't it?

 

Cheers

Bryan

 

_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to