jamesnetherton opened a new issue #3692:
URL: https://github.com/apache/camel-quarkus/issues/3692
In a CQ application if you do:
```java
context.stop();
context.start();
```
Then you get:
```
java.lang.UnsupportedOperationException
at
org.apache.camel.quarkus.core.FastCamelContext.createRegistry(FastCamelContext.java:84)
at
org.apache.camel.impl.engine.AbstractCamelContext.getRegistry(AbstractCamelContext.java:2100)
at
org.apache.camel.impl.engine.AbstractCamelContext.doStartStandardServices(AbstractCamelContext.java:3808)
at
org.apache.camel.impl.engine.AbstractCamelContext.forceLazyInitialization(AbstractCamelContext.java:3773)
at
org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2849)
at
org.apache.camel.quarkus.core.FastCamelContext.doInit(FastCamelContext.java:172)
at
org.apache.camel.support.service.BaseService.init(BaseService.java:83)
at
org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2620)
at
org.apache.camel.support.service.BaseService.start(BaseService.java:111)
at
org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2639)
at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:255)
```
In general, it's not considered good practice to stop the `CamelContext` and
start it again. But with CQ, it's not trivial to support, given that parts of
the `CamelContext` are configured at build time, and there's no possibility of
repeating those steps at runtime.
Should we detect the restart scenario and throw a friendlier exception? Or
is there something else that could be done?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]