[jira] Created: (CAMEL-511) A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-511) A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly

JIRA jira@apache.org
A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly
-------------------------------------------------------------------------------------------------------

                 Key: CAMEL-511
                 URL: https://issues.apache.org/activemq/browse/CAMEL-511
             Project: Apache Camel
          Issue Type: New Feature
          Components: camel-core
    Affects Versions: 1.3.0
            Reporter: Claus Ibsen


Currently the validation that certain properties is mandatory / optional and that they value is validated is handled ad-hoc by each endpoint or component.
There should be somekind of support from camel-core that creates these objects that it has a callback method to allow the programmer of the component/endpoint to do some programmatic validation that the endpoint is in a validate state before its let's loose on the playground.

In spring this method is named afterPropertiesSet() AFAIR. We could have a similar callback method in camel-core for this.

We could also start to use somekind of annotations to mark what properties the endpoint/component support and which is mandatory/optional - kinda like the stuff for the Camel DSL.
I think there is a ticket for this already.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-511) A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly

JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44932#action_44932 ]

James Strachan commented on CAMEL-511:
--------------------------------------

the fix for this problem is for an Endpoint to just implement the org.apache.camel.Service interface - then it will have a standard start() / stop() method invoked?

> A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-511
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-511
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 1.3.0
>            Reporter: Claus Ibsen
>             Fix For: 2.0.0
>
>
> Currently the validation that certain properties is mandatory / optional and that they value is validated is handled ad-hoc by each endpoint or component.
> There should be somekind of support from camel-core that creates these objects that it has a callback method to allow the programmer of the component/endpoint to do some programmatic validation that the endpoint is in a validate state before its let's loose on the playground.
> In spring this method is named afterPropertiesSet() AFAIR. We could have a similar callback method in camel-core for this.
> We could also start to use somekind of annotations to mark what properties the endpoint/component support and which is mandatory/optional - kinda like the stuff for the Camel DSL.
> I think there is a ticket for this already.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-511) A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44938#action_44938 ]

Claus Ibsen commented on CAMEL-511:
-----------------------------------

Ah excellent sometimes the answer is already there.

Something to streamline for Camel 2.0 is that our components does property validation using the Service interface and we can improve the error feedback to the end-user why this component couldn't be started.

> A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-511
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-511
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 1.3.0
>            Reporter: Claus Ibsen
>             Fix For: 2.0.0
>
>
> Currently the validation that certain properties is mandatory / optional and that they value is validated is handled ad-hoc by each endpoint or component.
> There should be somekind of support from camel-core that creates these objects that it has a callback method to allow the programmer of the component/endpoint to do some programmatic validation that the endpoint is in a validate state before its let's loose on the playground.
> In spring this method is named afterPropertiesSet() AFAIR. We could have a similar callback method in camel-core for this.
> We could also start to use somekind of annotations to mark what properties the endpoint/component support and which is mandatory/optional - kinda like the stuff for the Camel DSL.
> I think there is a ticket for this already.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-511) A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-511.
-------------------------------

    Resolution: Won't Fix

> A method ala afterPropertiesSet() for programmatic validation that the endpoint is configured correctly
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-511
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-511
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 1.3.0
>            Reporter: Claus Ibsen
>             Fix For: 2.0.0
>
>
> Currently the validation that certain properties is mandatory / optional and that they value is validated is handled ad-hoc by each endpoint or component.
> There should be somekind of support from camel-core that creates these objects that it has a callback method to allow the programmer of the component/endpoint to do some programmatic validation that the endpoint is in a validate state before its let's loose on the playground.
> In spring this method is named afterPropertiesSet() AFAIR. We could have a similar callback method in camel-core for this.
> We could also start to use somekind of annotations to mark what properties the endpoint/component support and which is mandatory/optional - kinda like the stuff for the Camel DSL.
> I think there is a ticket for this already.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.