Whoops - this thread fell through the cracks. Sorry about that.
Injection of beans into a Transformer instance won't work because we create the Transformer instances vs. pulling them out of the CDI bean registry. It's an interesting idea, though. If you can file a JIRA we can have our CDI expert (*cough* Lukasz!) have a look. It should be possible to look for injection points and wire in a reference from the bean registry. It would be a bit of a hack though, since we're re-implementing a really narrow part of CDI (no injection scope, no observers, etc., etc.). Another way to go would be to support a bean name instead of a java class in the Java transformer definition in switchyard.xml. That avoids reimplementing pieces of CDI.
Aside from the changes mentioned above, you can go the old school route and invoke your transformation procedurally through a camel route. A bean can be called from the route and that bean can @Inject references to other beans. Not as pretty as declarative transformation, but it gets the job done. You could also put this in a CDI bean service, but you would have to call that service from a Camel route or BPM process before invoking your target service.
Thx for your suggestions, even if the recommended solutions seem more to be a workaround to my problem.
But it's a good moment to improve my camel knowledge
I've created a JIRA: https://issues.jboss.org/browse/SWITCHYARD-1006
1 of 1 people found this helpful
You can also wrap an EJB around the DAO and lookup the EJB via JNDI.