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

Jose Luis Pedrosa commented on CAMEL-9733:
------------------------------------------

I got troubles with one small detail (it's almost ready), how can I write an 
URI without an path? I don't manage to make the URI parses to accept it:

{code:java}
from("direct:start").to("spring-batch:mockJob").to("mock:test"); //original 
test line
from("direct:dynamic").to("spring-batch:").to("mock:test"); //URL type with 
dynamic Job
{code}

I mean as the jobName is read during the exchange it is not passed to the URI, 
but it keeps on failing:
{noformat}
[From[direct:dynamic]] -> [To[spring-batch:?]... because of Failed to resolve 
endpoint: spring-batch:// due to: Expected authority at index 15:
{noformat}

is there any way to achieve a endpoint without path? I tried to annotate the 
uri definition.. but no luck...

{code:java}
@UriPath(defaultValue = "dynamic")
@Metadata(required = "false", defaultValue = "dynamic")
  private String jobName;
{code}
  

> enable dynamic job name in component spring-batch
> -------------------------------------------------
>
>                 Key: CAMEL-9733
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9733
>             Project: Camel
>          Issue Type: Wish
>          Components: camel-spring-batch
>    Affects Versions: 2.16.2, 2.17.0
>         Environment: any
>            Reporter: Jose Luis Pedrosa
>            Priority: Minor
>             Fix For: 2.17.2, 2.18.0
>
>   Original Estimate: 16m
>  Remaining Estimate: 16m
>
> Hi
> Currently springBatch accepts a parameter jobName in the url, which is 
> evaluated during the creation of the endpoint.
> This makes impossible to launch different jobs dinamically.The requested 
> feature would be to make it message context based, in the headers with a 
> parameter 
> "jobNameHeader", which would be evaluated per message. In a similar way as 
> SQL and the columns value parameters.
> If the project is interested and willing to incorporate it into the sources, 
> I could offer me to code it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to