Re: Using Camel with Spring

2011-03-29 Thread Claus Ibsen
Hi Yeah it looks fine. On Tue, Mar 29, 2011 at 9:53 PM, jpalmer1026 wrote: > Thanks Claus. > > Based on the link that you posted, I changed my Java main to the below and > everything seems to be working great. Just for my edification, does this > look roughly correct to you or am I doing someth

Re: 2.7.0 changes have a bug

2011-03-29 Thread Willem Jiang
I just checked the change log of Camel 2.7.0[1], and didn't find any jms related change that could cause this kind of issue. As Camel 2.7.0 moved to Spring 3.x, can you check if your ActiveMQ run time is still using Spring 2.x ? [1]https://issues.apache.org/jira/secure/ReleaseNote.jspa?proje

Re: TypeConverter not loaded from jar

2011-03-29 Thread Willem Jiang
Hi, Camel is using the an Activator to check the bundle which has the entry of "META-INF\services\org\apache\camel\TypeConverter" by using the API of bundle.getEntry() API, That could explain why the type converter in your jar which is embedded in the bundle can't be found. Willem On 3/29/1

Re: restlet consumer overrides http producer's endpoint

2011-03-29 Thread Willem Jiang
Hi, I think you just need to filter the message header of Exchange.HTTP_URI, which will be used by the HttpProducer to override the configuration on the Http endpoint. And the RestLetProducer doesn't take that header into consideration. Your route could be like below to workaround such kind

Using JPA and JMS Endpoints with XA Transactions on Websphere

2011-03-29 Thread Mark Borner
Hi all: I have a route which works, but keeps spitting out messages in the Websphere log. The route is: from("jpa:au.com.zurich.phoenix.i90.entity.ExportMessage ?consumeDelete=false&transactionManager=#transactionManager&consumer.delay=3&consumer.nativeQuery=" + SQL)

Re: How to Get SOAP Response from the Last Camel Processor in the Route?

2011-03-29 Thread hyjshanghai
Just a quick reply. For the time being, the organization I am in cannot access Camel 2.8. I can use Camel 2.4 only. I would appreciate if anyone in our forum can have a try with the latest Camel:) -- View this message in context: http://camel.465427.n5.nabble.com/How-to-Get-SOAP-Response-from-the

Re: How to Get SOAP Response from the Last Camel Processor in the Route?

2011-03-29 Thread Willem Jiang
Hi, Can you try the latest Camel 2.8-SNAPSHOT, I think this issue may relate to CAMEL-3792[1] which is fixed in Camel 2.8-SNAPSHOT. [1]https://issues.apache.org/jira/browse/CAMEL-3792 Willem On 3/30/11 9:46 AM, hyjshanghai wrote: I found the answer finally - returning SOAP response with emp

Re: How to Get SOAP Response from the Last Camel Processor in the Route?

2011-03-29 Thread hyjshanghai
I found the answer finally - returning SOAP response with empty body is caused by using the "try ... catch .. finally" camel DSL. I regret not having mentioned using this DSL in previous posts. According to my test, in the following, Route A returns a non-empty SOAP message to the client correctly

Re: Using Camel with Spring

2011-03-29 Thread John McDonald
I'd recommend the Camel in Action book - it gives an example of what I think you are trying to achieve and you will have a template to build out from On 29 Mar 2011, at 19:56, jpalmer1026 wrote: > Hi, > > I'm a Camel newbie and I'm trying to run a simple example to demonstrate how > to use Ca

Re: Service architecture

2011-03-29 Thread John McDonald
I wasn't advocating it at all - just making the distinction between the function the 2 things performed On 29 Mar 2011, at 22:10, Christian Schneider wrote: > For me the decision was between JEE without camel and the typical Apache + > Spring stack CXF, Camel, Spring, eventually Karaf > > Usi

Re: Service architecture

2011-03-29 Thread Christian Schneider
For me the decision was between JEE without camel and the typical Apache + Spring stack CXF, Camel, Spring, eventually Karaf Using Camel together with JEE would be interesting. I have not tried it though. Christian Am 29.03.2011 18:56, schrieb John McDonald: One doesnt have to be an apolog

Re: Using Camel with Spring

2011-03-29 Thread jpalmer1026
Thanks Claus. Based on the link that you posted, I changed my Java main to the below and everything seems to be working great. Just for my edification, does this look roughly correct to you or am I doing something that I shouldn't be doing? import org.apache.camel.spring.Main; public class Main

Re: type converter not loading

2011-03-29 Thread Fernando Ribeiro
I'd think it doesn't get any easier than having both bundles depending on the third, isn't it? Thanks. On Tue, Mar 29, 2011 at 4:11 PM, Claus Ibsen wrote: > On Tuesday, March 29, 2011, Fernando Ribeiro > wrote: > > Out of curiosity, did I get it right that the code is going to continue > in > >

Re: type converter not loading

2011-03-29 Thread Claus Ibsen
On Tuesday, March 29, 2011, Fernando Ribeiro wrote: > Out of curiosity, did I get it right that the code is going to continue in > the camel-spring and camel-blueprint even when the camel-core-osgi is there? > If so, why? Thanks. > This allow us to easily have common osgi code to share for spring

Re: Using Camel with Spring

2011-03-29 Thread Claus Ibsen
Hi Welcome to the camel community. See this faq http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html On Tuesday, March 29, 2011, jpalmer1026 wrote: > Hi, > > I'm a Camel newbie and I'm trying to run a simple example to demonstrate how > to use Camel with Spring. I'm cu

Using Camel with Spring

2011-03-29 Thread jpalmer1026
Hi, I'm a Camel newbie and I'm trying to run a simple example to demonstrate how to use Camel with Spring. I'm currently using Camel 2.7.0 with Spring 3.0.5. When I run the code via the MainSpring class (see below), nothing happens. Any ideas? My spring-config.xml is as follows:

Re: type converter not loading

2011-03-29 Thread Fernando Ribeiro
Out of curiosity, did I get it right that the code is going to continue in the camel-spring and camel-blueprint even when the camel-core-osgi is there? If so, why? Thanks. On Tue, Mar 29, 2011 at 2:52 AM, Willem Jiang wrote: > It's harmless to provide the bundle of camel-core-osgi in camel. > I j

Re: Can you actually mock out endpoints that interact with other systems to prevent them doing so?

2011-03-29 Thread Tom Howe
I think my problem can be summarized: I'n one test I need to consume from an endpoint and in another test I want to send messages to the same endpoint. You cannot use mock: if you need to consume and you cannot use direct: if I want to check the messages being sent to it. I dont appear to be ab

Re: Can you actually mock out endpoints that interact with other systems to prevent them doing so?

2011-03-29 Thread Tom Howe
Also it seems, I cannot inject a mock into a direct:xx endpoint @EndpointInject(uri="direct:activemq-general.in") I get.. java.lang.IllegalArgumentException: Invalid type: org.apache.camel.component.mock.MockEndpoint which cannot be injected via @EndpointInject/@Produce for: Endpoint[direct:

Re: Can you actually mock out endpoints that interact with other systems to prevent them doing so?

2011-03-29 Thread Tom Howe
The only problem i am having with this is I cannot use mocks for endpoints that are consumed from. I get the following error.. org.apache.camel.RuntimeCamelException: java.lang.UnsupportedOperationException: You cannot consume from this endpoint So I tried to use direct:xxx for these, but then

Re: Can you actually mock out endpoints that interact with other systems to prevent them doing so?

2011-03-29 Thread Tom Howe
yes placeholders is the way I solved it myself. I coudn't get the advicewith to work and it didnt really seem like a good fit. So I have.. like this.. int.properties myendpoint=activemq:myendpoint test.properties myendpoint=mock:activemq-myendpoint Is 2.8 final? or coming soon? On Tue, Mar

Re: AW: Service architecture

2011-03-29 Thread John McDonald
One doesnt have to be an apologist for liking camel and J2EE - one is a container and the other a framework. Their use together is entirely compatible. On 29 Mar 2011, at 13:20, Christian Schneider wrote: > Hi Gonzalo, > > I am a big fan of camel so don´t understand me wrong. > > If you are

Re: Can you actually mock out endpoints that interact with other systems to prevent them doing so?

2011-03-29 Thread Claus Ibsen
Hi Tom Yeah the adviceWith started as a feature to advice single routes. But can also be used to mock and skip sending to endpoints as shown on those wiki pages. However its often easier to either - use property placeholders for uris, so you can use mock:xxx for unit tests, and mina:xxx for the r

Re: Service architecture

2011-03-29 Thread Claus Straube
On 29.03.2011 15:15, gonzalo diethelm wrote: Great, this works. And I guess you meant that you would create one endpoint for each operation, right? For me it's more transparent - but you can do this like you want ;) Something like this would work as well from("restlet:http://localhost:9080/acco

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
> Hi Gonzalo, Hi Christian, thanks for chiming in. > I am a big fan of camel so don´t understand me wrong. > > If you are using JEE all over the place then you should at least think > about migrating to JEE6 I am regularly reading the blog prosts of Adam > Bien and from what he writes the modern

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
> > Great, this works. And I guess you meant that you would create one > endpoint for each operation, right? > For me it's more transparent - but you can do this like you want ;) > Something like this would work as well > > from("restlet:http://localhost:9080/account/{id}?restletMethod=get,delete"

AW: Service architecture

2011-03-29 Thread Christian Schneider
Hi Gonzalo, I am a big fan of camel so don´t understand me wrong. If you are using JEE all over the place then you should at least think about migrating to JEE6 I am regularly reading the blog prosts of Adam Bien and from what he writes the modern JEE implementation could be a great platform.

Re: Service architecture

2011-03-29 Thread Claus Straube
On 29.03.2011 13:59, gonzalo diethelm wrote: One thing I have not been able to figure out is how to expose all these CRUD services over jetty. Just as an example, let's say I will handle account objects and will want to support three actions on them: GET /account/{id} => retrieve that account

Re: Scheduling routes with RoutePolicy

2011-03-29 Thread Claus Ibsen
Ah you may have hit a corner issue. You can indicate a route is stopped using .noAutoStartup in the DSL. But we need to initialize the CronScheduledRoutePolicy regardless what. It should have a start method you can invoke manually thought. But check its source code to be sure. And maybe you need

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
> > One thing I have not been able to figure out is how to expose all these > CRUD services over jetty. Just as an example, let's say I will handle > account objects and will want to support three actions on them: > > > > GET /account/{id} => retrieve that account > > PUT /account/{id}/balance/{ba

Re: InOut over JMS always leads to Timout (ExchangeTimedOutException)

2011-03-29 Thread Paul Lowry
Mike, I can't see your original description of the problem in this thread, so maybe I'm regurgitating old and obvious advice, but... Are both test classes using JMS endpoints inside a Camel route? And do they both have the necessary JMS/ActiveMQ configuration in Spring XML? Have you turned on de

Re: Service architecture

2011-03-29 Thread Achim Nierbeck
Hi Mike, you are certainly right 2 instances on the same server are better than none, even though if your hardware breaks those 2 instances don't help really ;) Regards, Achim 2011/3/29 Michael Dewitte : > Yes and no, I would say. You're right that it's better to have 2 different > machines. But

Re: Service architecture

2011-03-29 Thread Achim Nierbeck
Hi Gonzalo, regarding NRM, sorry no documentation besides the one provided by ServiceMix :) Regarding multiple instances of Karaf, you can administer those via shell commands and start / stop them through your first instance. regards, Achim 2011/3/29 gonzalo diethelm : >> Makes sense, besides

TypeConverter not loaded from jar

2011-03-29 Thread akudinov
Hello I have osgi bundle and want to use Type Converter: I have a TypeConverter configuration in this bundle: META-INF\services\org\apache\camel\TypeConverter with text: com.xml XmlContextTypeConverter defined in another jar maven module and uses as embded dependency. It has @Convert

Re: Service architecture

2011-03-29 Thread Michael Dewitte
Yes and no, I would say. You're right that it's better to have 2 different machines. But IMHO, it's better to have failover between 2 instances on the same machine than no fail over at all... 2011/3/29 Achim Nierbeck > Hi Mike, > > but this only makes sense when you use multiple instances on dif

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
> nice thread, thanks for the sharing... to me, multiple instances makes > sense > for fail-over. Just configure it through the ActiveMQ... That too. -- Gonzalo Diethelm

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
> Makes sense, besides one point, why do you expect you need multiple > Karaf instances? > Regarding Camel or Spring there is no need to deploy those in extra > Servers, because you only got > one CamelContext/SpringContext per bundle. Therefore I'm sure you can > use one Karaf instance with all yo

Re: Service architecture

2011-03-29 Thread Achim Nierbeck
Hi Mike, but this only makes sense when you use multiple instances on different machines. Doing Failover on the same machine I would rather not recommend. Regards, Achim 2011/3/29 Michael Dewitte : > Hi, > > nice thread, thanks for the sharing... to me, multiple instances makes sense > for fail-

Re: Service architecture

2011-03-29 Thread Claus Straube
On 29.03.2011 12:58, gonzalo diethelm wrote: Hi Gonzalo. Hi Claus, thanks for your insight. 0. First off, does it really make sense to turn my back to J(2)EE? I know I would be giving up a significant amount of "baseline", but I am really hungry for some lean and mean architecture. Opinions

Re: Service architecture

2011-03-29 Thread James Strachan
On 29 March 2011 11:58, gonzalo diethelm wrote: >> Hi Gonzalo. > > Hi Claus, thanks for your insight. > >> > 0. First off, does it really make sense to turn my back to J(2)EE?  I >> know I would be giving up a significant amount of "baseline", but I am >> really hungry for some lean and mean archi

Scheduling routes with RoutePolicy

2011-03-29 Thread mikaelfj
Hi, I'm in the process of using CronScheduledRoutePolicy to schedule a route to start and stop - i.e. to only be polling the from endpoint in a certain time-interval - e.g. the below should ensure it only polls the from endpoint one hour each day between 16-17: CronScheduledRoutePolicy policy = n

Re: Service architecture

2011-03-29 Thread Michael Dewitte
Hi, nice thread, thanks for the sharing... to me, multiple instances makes sense for fail-over. Just configure it through the ActiveMQ... Mike 2011/3/29 Achim Nierbeck > Hi Gonzalo, > > Makes sense, besides one point, why do you expect you need multiple > Karaf instances? > Regarding Camel or

Re: Service architecture

2011-03-29 Thread Achim Nierbeck
Hi Gonzalo, Makes sense, besides one point, why do you expect you need multiple Karaf instances? Regarding Camel or Spring there is no need to deploy those in extra Servers, because you only got one CamelContext/SpringContext per bundle. Therefore I'm sure you can use one Karaf instance with all y

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
> Hi, Hi Achim, thanks for answering. > just my 0.02$ on a container/runtime. > My best experience as runtime for Camel is to use Karaf. > If you need more out of the box components like ActiveMQ and so forth > you might also consider to use Servicemix. OK, my incipient plan so far is to use Kar

Re: Service architecture

2011-03-29 Thread Tarjei Huse
On 03/29/2011 12:48 PM, gonzalo diethelm wrote: > Hi John, great insights (and confirmations) of my guesses... > >> I too want some kind of container support for my java apps that are run >> from jars. The use of initd and all works but it doesnt feel right - >> whereas a container like tomcat doe

Re: Service architecture

2011-03-29 Thread John McDonald
In terms of the expansion - i assume its the Grails v Spring thing - so here goes The annotations in Spring look great - you can specify what method they should match, mapping variables and paths onto the pojo methods and parameters. Very sexy. My concern is that when you are trying to get a

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
> Hi Gonzalo. Hi Claus, thanks for your insight. > > 0. First off, does it really make sense to turn my back to J(2)EE? I > know I would be giving up a significant amount of "baseline", but I am > really hungry for some lean and mean architecture. Opinions? > > If you feel hungry - do it. I thi

RE: Service architecture

2011-03-29 Thread gonzalo diethelm
Hi John, great insights (and confirmations) of my guesses... > I too want some kind of container support for my java apps that are run > from jars. The use of initd and all works but it doesnt feel right - > whereas a container like tomcat does. I am considering OSGI containers - > but lack any

Re: Service architecture

2011-03-29 Thread Achim Nierbeck
Hi, just my 0.02$ on a container/runtime. My best experience as runtime for Camel is to use Karaf. If you need more out of the box components like ActiveMQ and so forth you might also consider to use Servicemix. regards, Achim 2011/3/29 John McDonald : > I was hoping people with more insight int

Re: Service architecture

2011-03-29 Thread Claus Straube
Hi Gonzalo. 1. Each service is a bundle running on an OSGi container; there could be one or more containers running on one or more JVMs, on one or more servers. 2. Each service could export its entry points on several endpoint types; at least one type for RPC (SOAP, REST, etc.) and one type fo

restlet consumer overrides http producer's endpoint

2011-03-29 Thread Paul Lowry
Hi all, I think there is a bug in camel-restlet, but I'd like to pass it by you first and see what you think... I define a route with a restlet consumer and http producer: http://localhost:9090/proxy?restletMethod=POST"/> ... POST text/xml http://localhost:8080/server"

Re: Issues with running camel-example-osgi on Eclipse Equinox

2011-03-29 Thread Владимир Большуткин
> How about the bundle 23, 24 ? > Can you take a look at them ? Do you mean bundles with id 23 and 24 in my Equinox? If so, there are no such bundles at all. I ran bare Equinox and have shown whole ss comand result. Bundles 14,19,20,23,24 are absent because I installed wrong mvn packages (not OSGi

Re: Can you actually mock out endpoints that interact with other systems to prevent them doing so?

2011-03-29 Thread Tom Howe
I tried this.. context.getRouteDefinitions().get(0).adviceWith(context, new RouteBuilder() { @Override public void configure() throws Exception { interceptSendToEndpoint("mock:mina:tcp://unreachable.splunk.server:9000") .skipSendToOriginalE

Re: Service architecture

2011-03-29 Thread John McDonald
I was hoping people with more insight into this would contribute - its a good set of questions and this forum is pretty good so I would have appreciated their thoughts and musings. So to ignite things I will chip in. I too want some kind of container support for my java apps that are run from

Re: ErrorHandler - SMX4 - OSGI Service - TransactionManager

2011-03-29 Thread Charles Moulliard
This property is defined here : Is it enough ? On Tue, Mar 29, 2011 at 10:14 AM, Willem Jiang wrote: > Hi Charles, > > You can use the id with the reference element, and camel will lookup the > reference from the application context just like you defi

Re: ErrorHandler - SMX4 - OSGI Service - TransactionManager

2011-03-29 Thread Willem Jiang
Hi Charles, You can use the id with the reference element, and camel will lookup the reference from the application context just like you defined a bean instance. interface="org.springframework.transaction.PlatformTransactionManager"/> Willem On 3/29/11 3:35 PM, Charles Moulliard wrote:

ErrorHandler - SMX4 - OSGI Service - TransactionManager

2011-03-29 Thread Charles Moulliard
Hi, I have deploy a camel transactional camel route on ServiceMix and would like to define the onRedeliveryPolicy of the ErrorHandler of Camel I have setup in spring xml file the errorHandler like that Question : As the Transaction Manager is setup on ServiceMix4

Re: Issues with running camel-example-osgi on Eclipse Equinox

2011-03-29 Thread Hendy Irawan
Check out the following blog post for ideas : http://eclipsedriven.blogspot.com/2011/01/pojo-remoting-over-camel-xmpp-within.html :-) - Soluvas - Making eCommerce Work for You -- View this message in context: http://camel.465427.n5.nabble.com/Issues-with-running-camel-example-osgi-on-Eclip

Re: Observation on OSGi and NoTypeConversionAvailableException

2011-03-29 Thread Hendy Irawan
I have posted a detailed experience how to run Camel inside an Eclipse RCP application (successfully :-). Anyone interested can look here: http://eclipsedriven.blogspot.com/2011/01/pojo-remoting-over-camel-xmpp-within.html Good luck :-) - Soluvas - Making eCommerce Work for You -- View thi

Re: Issues with running camel-example-osgi on Eclipse Equinox

2011-03-29 Thread Willem Jiang
How about the bundle 23, 24 ? Can you take a look at them ? Willem On 3/29/11 2:15 PM, Владимир Большуткин wrote: Hello, I have issues on using Camel in Eclipse Equinox (my goal is to create Eclipse plugin with Camel support). First of all, I'm trying to run camel-example-osgi. I managed to ru