[JBoss JIRA] Created: (SWITCHYARD-315) Add camel endpoint validation tests to camel config
by Keith Babo (JIRA)
Add camel endpoint validation tests to camel config
---------------------------------------------------
Key: SWITCHYARD-315
URL: https://issues.jboss.org/browse/SWITCHYARD-315
Project: SwitchYard
Issue Type: Task
Components: component-camel
Reporter: Keith Babo
Assignee: Mario Antollini
Fix For: 0.2
At present, we test the Camel config implementation to make sure it can read and write SCA binding config for each Camel component type. The one thing that's missing is validating that the URI we are producing is interpreted correctly by Camel. As it turns out, there's a pretty easy way of doing this. For example, the following test could be added to V1CamelFileConsumerBindingModelTest:
{noformat}
@Test
public void testCamelEndpoint() {
CamelFileBindingModel model = createFileConsumerModel();
String configUri = model.getComponentURI().toString();
CamelContext context = new DefaultCamelContext();
FileEndpoint endpoint = context.getEndpoint(configUri, FileEndpoint.class);
Assert.assertEquals(BUFFER_SIZE, endpoint.getBufferSize());
// add asserts for all other config values here ...
}
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 6 months
[JBoss JIRA] Created: (SWITCHYARD-314) Create a JAXB Transformer
by Tom Fennelly (JIRA)
Create a JAXB Transformer
-------------------------
Key: SWITCHYARD-314
URL: https://issues.jboss.org/browse/SWITCHYARD-314
Project: SwitchYard
Issue Type: Feature Request
Components: component-bean, transformation
Reporter: Tom Fennelly
Assignee: Tom Fennelly
Fix For: 0.2
This idea came from a forum post created by Jiri Pechanec (link in forum ref field).
I think this could be really useful, in particular in conjunction with the bean component. We could auto register XML to Java (and Java to XML) transforms for bean operations whose input/output Java types are annotated with JAXB annotations. Then all you'd need to do to implement a Service and expose it over the SOAP (or REST) would be to implement/generate JAXB Java beans for the service operation types.
I think this coud be an easy feature to add and would
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 6 months
[JBoss JIRA] Created: (SWITCHYARD-312) replace Thread.sleep() and thread locals used for handling IN-OUT
by Keith Babo (JIRA)
replace Thread.sleep() and thread locals used for handling IN-OUT
-----------------------------------------------------------------
Key: SWITCHYARD-312
URL: https://issues.jboss.org/browse/SWITCHYARD-312
Project: SwitchYard
Issue Type: Enhancement
Components: core
Reporter: Keith Babo
Fix For: 0.2
A number of components are using code like this to handle the response from an InOut exchange:
{noformat}
while (System.currentTimeMillis() < start + 15000) {
if (RESPONSE.get() != null) {
return;
}
try {
Thread.sleep(100);
} catch (InterruptedException e) {
continue;
}
}
{noformat}
We need to introduce core support for replacing this code with something that uses wait/notify or similar.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 6 months
[JBoss JIRA] Created: (SWITCHYARD-310) Camel input gateways should be configurable using Java implementation too
by Jiri Pechanec (JIRA)
Camel input gateways should be configurable using Java implementation too
-------------------------------------------------------------------------
Key: SWITCHYARD-310
URL: https://issues.jboss.org/browse/SWITCHYARD-310
Project: SwitchYard
Issue Type: Feature Request
Components: component-camel
Affects Versions: 0.1
Environment: JBoss AS 7
Reporter: Jiri Pechanec
Use case
I have a big CSV file that I want to efficiently process. To do this I need
1) Camel file service endpoint
2) Stream the file
3) Split the file by lines
4) Enable parallel processing
It can be express in Java using this configuration
from("file:...")
.log("Message received in ParallelSplitter")
.log("${body}")
.split(body(String.class).tokenize("\n"))
.streaming()
.parallelProcessing()
.unmarshal()
.csv()
.to("switchyard://TestService?operationName=longOperation");
Unfortunately Camel inbound gateway supports only setting URI. And if I use Camel service with RouteBuilder then it is mandatory for me to set from to switchyard://... endpoint.
So it would be great to enable configuring camel bindings using Java or Spring DSLs
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 6 months