cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew J. Macbeth (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-4802) JAXRSServerFactoryBean server does not terminate
Date Sun, 03 Feb 2013 23:06:12 GMT
Andrew J. Macbeth created CXF-4802:
--------------------------------------

             Summary: JAXRSServerFactoryBean server does not terminate
                 Key: CXF-4802
                 URL: https://issues.apache.org/jira/browse/CXF-4802
             Project: CXF
          Issue Type: Bug
          Components: Simple Frontend
    Affects Versions: 2.7.2
         Environment: Windows 7, Eclipse Juno 
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
            Reporter: Andrew J. Macbeth
            Priority: Minor


When running from main(), the server process created from JAXRSServerFactoryBean does not
terminate when main() does.

		JAXRSServerFactoryBean factoryBean = new JAXRSServerFactoryBean();
		factoryBean.setResourceClasses(MyService.class);
		factoryBean.setResourceProvider(MyService.class,
				new SingletonResourceProvider(myService));
		factoryBean.setAddress("http://localhost:8080/info");
		factoryBean.setStart(false);
		Server server = factoryBean.create();
		server.start();
		try {
			System.out.print("Press ENTER to stop: ");
			System.in.read();
			server.stop();
			server.destroy();
			server = null;
		}

This all dependencies in pom.xml:
<dependency>
	<groupId>org.apache.cxf</groupId>
	<artifactId>cxf-rt-frontend-jaxrs</artifactId>
	<version>2.7.2</version>
</dependency>
<dependency>
	<groupId>org.apache.cxf</groupId>
	<artifactId>cxf-rt-transports-http-jetty</artifactId>
	<version>2.7.2</version>
</dependency>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message