Re: Complex app… 1 context or many?

2012-01-08 Thread Christian Müller
For bigger applications we also use multiple contexts and bridge the
context via the Camel ActiveMQ component (batch and online requests) or via
the Camel VM component (only online requests).
By splitting it into smaller parts each context is easier to understand and
test. In addition, the development process scales better because each
developer has its own service/context/... with defined interfaces. My 0,02
$...

Best,
Christian

On Sun, Jan 8, 2012 at 12:53 AM, Jason Dillon ja...@planet57.com wrote:

 I'm wondering what the best practice is for a complex application, where
 many sub-systems (some related, some not) are using camel to process
 messages, if it is best to have all of them share the same single
 CamelContext or if its better to have more than one CamelContext to
 partition the systems?

 Any advise?

 --jason


Re: Missing schema file in a cookbook article

2012-01-08 Thread Willem Jiang

We don't put the camel.xsd into to cxf.apache.org.
You can find the schema in the META-INF/schema/configuration/ directory 
of the camel-cxf-transport.jar


On Sun Jan  8 06:00:31 2012, Andreas Feldmann wrote:

Hallo!

I have tried to use a cookbook article, but this article uses a schema file
which does not exist.

The article can be found here:
http://camel.apache.org/camel-transport-for-cxf.html

And the missing schema file is: http://cxf.apache.org/transports/camel.xsd

Where is this schema file?
And does the cookbook article still work?

Thanks a lot for an help!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Missing-schema-file-in-a-cookbook-article-tp5128466p5128466.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 



Re: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

2012-01-08 Thread Willem Jiang

Hi,

From the stack trace, I can tell the error is from CXF server side not 
the client side.


The URL you found is for configuration of the CXF client side. You need 
to setup the jetty engine for SSL like this[1] for the server side.


[1]http://cxf.apache.org/docs/jetty-configuration.html

Willem

On 1/6/12 7:01 PM, nocheinandi wrote:

Hallo everyone,

I would like to use SSL with my CXF-endpoints. After I replaced http with
https in the cxf-definition the following error has occured:

Caused by: java.io.IOException: Protocol mismatch for port 443: engine's
protocol is http, the url protocol is https
at
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine(JettyHTTPServerEngineFactory.java:254)

I thought that this is ok, because I have not attached any configuration for
SSL. So I have read the following articles:

http://camel.apache.org/how-to-switch-the-cxf-consumer-between-http-and-https-without-touching-the-spring-configuration.html

http://fusesource.com/docs/esb/4.4/esb_security/CamelCXF-SecureClient.html

And:
http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport%28includingSSLsupport%29-ConfiguringSSLSupport

Therefore I have added some new parts to my configuration and I have still
the same error. Currently my configuration looks like that:

http:conduit name=*.http-conduit
!__lt;http:conduit name=quot;https://192.168.122.128:443/.*quot;
__
 !__lt;http:conduit name=quot;{http://xxx}yyy.http-conduitquot;  __
!__ disableCNCheck=quot;falsequot; __
http:tlsClientParameters
sec:trustManagers
sec:keyStore type=JKS password=password file=xxx/
/sec:trustManagers
sec:cipherSuitesFilter
sec:include.*_EXPORT_.*/sec:include
sec:include.*_EXPORT1024_.*/sec:include
sec:include.*_WITH_DES_.*/sec:include
sec:include.*_WITH_NULL_.*/sec:include
sec:exclude.*_DH_anon_.*/sec:exclude
/sec:cipherSuitesFilter
/http:tlsClientParameters
!__lt;http:client AutoRedirect=quot;truequot;
Connection=quot;Keep-Alivequot;/__
/http:conduit   

  cxf:cxfEndpoint id=myEndpointName
address=https://192.168.122.128:443/yyy;
serviceName=myServiceName
endpointName=yyy
serviceClass=myServiceClass
xmlns:s=xxx
wsdlURL=kkk.wsdl
cxf:properties
entry key=schema-validation-enabled 
value=true /
!__ Quelle: 
http://camel.apache.org/cxf.html#CXF-Options __
entry key=mtom-enabled value=true/
/cxf:properties
/cxf:cxfEndpoint


And I have still the same error. Why? The conduit-part ist also instantiated
during the booting. Something like: Pre-instantiating singletons in [...]
[...*.http-conduit...];

I have also tried to use different names for the conduit, as you can see
above. How can I find out, what's wrong? Or do you have any suggestions?
Thanks a lot for your help!





--
View this message in context: 
http://camel.465427.n5.nabble.com/Protocol-mismatch-for-port-443-engine-s-protocol-is-http-the-url-protocol-is-https-tp5125232p5125232.html
Sent from the Camel - Users mailing list archive at Nabble.com.




--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Xstream marshals to byte array and not String

2012-01-08 Thread mgiammarco
Hello,
I am using a stomp client (that usese only Strings) to send a bean to Camel
using ActiveMQ. It marshal the message to a String using xstream.

Camel receives it as String, it unmarshals (using xstream) it as the correct
Java Bean. Camel process (it is a request-reply queue) and at the end I
marshal it again.

Unfortunately stomp client cannot process the message because xstream in
Camel produce a byte[] array and not a String as output.

Why? how can I force it to use a String?

Thanks,
Mario

--
View this message in context: 
http://camel.465427.n5.nabble.com/Xstream-marshals-to-byte-array-and-not-String-tp5129211p5129211.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[DISCUSS] Dynamic ScheduledPollConsumer

2012-01-08 Thread Preben.Asmussen
hi

We use a lot of polling in our integrations using components for File, FTP,
Jpa (interface tables) and so on. 
Usually files or tables are only updated once a day or even once a week in a
batch like fashion. When this happens its of course important to process as
fast as possible (using the default 500 ms delay), but most of the time when
there is no activity, polling every 500 ms. is not necessary and takes
system resources when running many polling routes on the same box.  

I was thinking that the ScheduledPollConsumer could be more dynamic by
introducing a new option eg. maxDelay, that resets the scheduler to maxDelay
if a poll results in no exchange (maybe after x polls with no results). 
The same goes if a poll results in an exchange, and the delay currently is
at maxDelay the scheduler is reset to the original delay thereby polling
more agresive again.

Any comments.

/preben



--
View this message in context: 
http://camel.465427.n5.nabble.com/DISCUSS-Dynamic-ScheduledPollConsumer-tp5129231p5129231.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Complex app… 1 context or many?

2012-01-08 Thread Willem Jiang
You can have a look at the camel-context component[1]. It maybe useful 
for you have a try :)


[1]http://camel.apache.org/context.html

On 1/8/12 7:53 AM, Jason Dillon wrote:

I'm wondering what the best practice is for a complex application, where many 
sub-systems (some related, some not) are using camel to process messages, if it 
is best to have all of them share the same single CamelContext or if its better 
to have more than one CamelContext to partition the systems?

Any advise?

--jason



--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang


Re: Embedded Web Console in Tomcat

2012-01-08 Thread mgiammarco
Hello,
any news about this?
I have the same problem: I need web console under tomcat. Is there any
workaround? Can I deploy the console in a separate war?

Thanks,
Mario

--
View this message in context: 
http://camel.465427.n5.nabble.com/Embedded-Web-Console-in-Tomcat-tp4894690p5129233.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Xstream marshals to byte array and not String

2012-01-08 Thread Claus Ibsen
On Sun, Jan 8, 2012 at 1:44 PM, mgiammarco mgiamma...@gmail.com wrote:
 Hello,
 I am using a stomp client (that usese only Strings) to send a bean to Camel
 using ActiveMQ. It marshal the message to a String using xstream.

 Camel receives it as String, it unmarshals (using xstream) it as the correct
 Java Bean. Camel process (it is a request-reply queue) and at the end I
 marshal it again.

 Unfortunately stomp client cannot process the message because xstream in
 Camel produce a byte[] array and not a String as output.

 Why? how can I force it to use a String?


You can always use the .convertBodyTo(String.class) to force a type conversion.

 Thanks,
 Mario

 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Xstream-marshals-to-byte-array-and-not-String-tp5129211p5129211.html
 Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


JMS Header Issue

2012-01-08 Thread Castyn
After a lot of testing I have determined the cause of an issue I am having
when using 2 different activeMQ JMS endpoints in the same route.  Apparently
after the first JMS queue is used, the message back will have a bunch of
headers set such as JMSCorrelationId, messageId, JMSMessageId, etc.

Now it seems that when the second JMS queue is called the values on the
exchange for these headers is used  which invariably causes message
collisions.

My question is, is there a way to remove headers, or with regards to
multiple JMS queues to ensure the correlation and message IDs are always
originated with respect to the proper queue and message?

--
View this message in context: 
http://camel.465427.n5.nabble.com/JMS-Header-Issue-tp5129929p5129929.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Xstream marshals to byte array and not String

2012-01-08 Thread mgiammarco
Thanks I have tried your workaround and it does the conversion.
Unfortunately something worse is happening:

with this route and a String input my stomp client receives a reply:

from(activemq:queryServer?exchangePattern=InOut)
.setExchangePattern(ExchangePattern.InOut)

.to(log:it.giammar.pratobackend?showHeaders=true).unmarshal()

.to(bean:saluta)

.to(log:it.giammar.pratobackend?showHeaders=true);

With the route that I have posted in other reply (I do not repeat here) and
your conversion in String the stomp client does not receive anything.

Unfortunately I am not able to launch a web console to debug camel queues so
I do not understand what is happening. 
The stomp protocol trace shows nothing. 

--
View this message in context: 
http://camel.465427.n5.nabble.com/Xstream-marshals-to-byte-array-and-not-String-tp5129211p5129953.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMS Header Issue

2012-01-08 Thread Castyn
Upon further investigation it seems to not be that simple.  The basis of the
route is as follows:

Send request to JMS Queue A - Splitter on Response - For each split, JMS
Queue B

So it seems that after A is evaluated, if you reset the JMS headers
servicemix will start throwing null pointer exceptions.  

I don't have enough understanding of the activeMQ endpoint lifecycle to
really troubleshoot this much more, so any insight or ideas would be
helpful.

I have tested and if I remove Queue A and instead mimic it's behavior witha
static message that gets split, there are no collisions and the JMS Ids do
not remain static as they do when Queue A is in scope.

--
View this message in context: 
http://camel.465427.n5.nabble.com/JMS-Header-Issue-tp5129929p512.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: i am newbie to camel

2012-01-08 Thread Christian Schneider

Hi,

you need to provide a little more context. What are you trying to do and 
what goes wrong?


If you simply search a way to start you should look at the examples in 
the distribution and the tutorials.


Christian

Am 07.01.2012 06:20, schrieb shaharyar:

hi folks
I am very new with camel. i want to parse an XML but got a lot of confusion
in URI and some other stuff.Any sample code would be more helpful for
parsing the XML.
Thanks

--
View this message in context: 
http://camel.465427.n5.nabble.com/i-am-newbie-to-camel-tp5127199p5127199.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com