[
https://issues.apache.org/jira/browse/CXF-8433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Yue Fang resolved CXF-8433.
-----------------------------------
Fix Version/s: 3.3.10
3.4.3
3.5.0
Resolution: Fixed
> JAXRSServerFactoryBean remove existing path from destinations on create
> -----------------------------------------------------------------------
>
> Key: CXF-8433
> URL: https://issues.apache.org/jira/browse/CXF-8433
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.4.2
> Environment: __
> Reporter: Евгений Бирюк
> Assignee: Freeman Yue Fang
> Priority: Major
> Fix For: 3.5.0, 3.4.3, 3.3.10
>
>
> When I try to call create method on JAXRSServerFactoryBean for path that
> already exists, the first time I get the error:
> {code:java}
> "org.apache.cxf.service.factory.ServiceConstructionException: There is an
> endpoint already running on ..."{code}
> Which is correct, because this path is already taken. But if I call the same
> method for the same path a second time, then no error occurs.
> This happens due to the fact that when the server starts unsuccessfully, it
> is destroyed
> {code:java}
> try {
> server.start();
> } catch (RuntimeException re) {
> server.destroy(); // prevent resource leak
> throw re;
> }{code}
> And a little further in the destroy method, the path is removed
> {code:java}
> public synchronized void removeDestination(String path) {
> this.destinations.remove(path);{code}
> Because of what the next call оf the create method will be successful, which
> is not entirely correct.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)