Hi

Ah yeah dont use comma in contest name, its A..Z and numbers, and dash
and underscore etc. Also dont use space etc.
We should not quote it as the jmx mbean name is then different with the quotes.

So instead we should validate the context name is limited to above rules

On Fri, Aug 16, 2019 at 11:05 AM Pasquale Congiusti
<[email protected]> wrote:
>
> Hi folks,
> while working on a spring boot app context which was provided a name with a
> comma, I failed to start camel context because following error:
>
>     Caused by: javax.management.MalformedObjectNameException: Could
> not create ObjectName from:
> org.apache.camel:context=test,,type=context,name="test,". Reason:
> javax.management.MalformedObjectNameException: Invalid character ','
> in key part of property
>
> Going deep in the implementation I came to notice that when we create the
> ObjectName we do quote the name but not the context. I've made some quick
> test to confirm that by quoting also the context this is fixed:
>
>
> https://github.com/apache/camel/compare/master...squakez:fix/object_name_context?expand=1
>
> Notice that I just fixed one of the method, there are other ones that may
> need to be quoted as well. However I am still uncertain if that is really a
> bug or desired behavior and the deeper implication the change may have in
> the rest of design. Please, have a look and let me know if proceeding to
> file a Jira with the bug and I can keep working on its resolution.
>
> Cheers,
> Pasquale.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to