Re: How to close Mina session ?

2009-02-25 Thread Nicolas Bouillon
Hi Claus,

Correct me if i'm wrong, but the apache2 snapshot repository doesn't
contains any 1.6.1-SNAPSHOT :
http://people.apache.org/repo/m2-snapshot-repository/org/apache/camel/camel-mina/

Where can i find it ?

Regards
Nicolas.

On Tue, Feb 24, 2009 at 08:34, Claus Ibsen claus.ib...@gmail.com wrote:

 On Tue, Feb 24, 2009 at 8:12 AM, Nicolas Bouillon nico...@bouil.org
 wrote:
  Hello,
 
  I've checkouted last friday the lastest SVN version of 1.6 branch, and
  compiled camel-core and camel-mina (i don't success compiling whole camel
  parts), and installed to my local maven repository.
 
  The patch works fine. I will try to work with 1.6.1-SNAPSHOT from the
  official camel site. I will report if something goes wrong.
 Hi

 Thanks for the report. Glad the patch seems to work.

 
  Thanks
  Nicolas.
 
  On Fri, Feb 20, 2009 at 18:28, Claus Ibsen claus.ib...@gmail.com
 wrote:
 
  On Fri, Feb 20, 2009 at 5:12 PM, Nicolas Bouillon nico...@bouil.org
  wrote:
   Thank you very much for the patch, and for the velocity !
  You are welcome.
 
  Thanks for reporting.
 
  If you can test it that would be great.
  See download page how to use 1.6.1-SNAPSHOT version. eg = Apache
  SNAPSHOT maven repo and all that stuff.
 
  http://camel.apache.org/download.html
 
 
 
 



 --
 Claus Ibsen
 Apache Camel Committer

 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/



Re: How to close Mina session ?

2009-02-25 Thread Claus Ibsen
On Wed, Feb 25, 2009 at 9:34 AM, Nicolas Bouillon nico...@bouil.org wrote:
 Hi Claus,

 Correct me if i'm wrong, but the apache2 snapshot repository doesn't
 contains any 1.6.1-SNAPSHOT :
 http://people.apache.org/repo/m2-snapshot-repository/org/apache/camel/camel-mina/

 Where can i find it ?
I am afraid since Apache was graduated as top level project the
publish of -SNAPSHOTS of 1.x stopped.

I will ping some other people to see if we can get one of the servers
to publish it again.

You can build it yourself, see:
http://camel.apache.org/building.html

 Regards
 Nicolas.

 On Tue, Feb 24, 2009 at 08:34, Claus Ibsen claus.ib...@gmail.com wrote:

 On Tue, Feb 24, 2009 at 8:12 AM, Nicolas Bouillon nico...@bouil.org
 wrote:
  Hello,
 
  I've checkouted last friday the lastest SVN version of 1.6 branch, and
  compiled camel-core and camel-mina (i don't success compiling whole camel
  parts), and installed to my local maven repository.
 
  The patch works fine. I will try to work with 1.6.1-SNAPSHOT from the
  official camel site. I will report if something goes wrong.
 Hi

 Thanks for the report. Glad the patch seems to work.

 
  Thanks
  Nicolas.
 
  On Fri, Feb 20, 2009 at 18:28, Claus Ibsen claus.ib...@gmail.com
 wrote:
 
  On Fri, Feb 20, 2009 at 5:12 PM, Nicolas Bouillon nico...@bouil.org
  wrote:
   Thank you very much for the patch, and for the velocity !
  You are welcome.
 
  Thanks for reporting.
 
  If you can test it that would be great.
  See download page how to use 1.6.1-SNAPSHOT version. eg = Apache
  SNAPSHOT maven repo and all that stuff.
 
  http://camel.apache.org/download.html
 
 
 
 



 --
 Claus Ibsen
 Apache Camel Committer

 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/





-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/


Combination of filters

2009-02-25 Thread david_geary

Hi, 

I'm using an xpath filter in the xml configuration eg 

filter 
xpath//cs:case/@queue=13/xpath
to uri=/
/filter

What's the easiest way to combine filters eg I want to accept it if its on
queue 13 OR 14 (or if on queue 13 AND some other attribute is a particular
value?)

I know I can set up separate filters and chain them to get 'AND' logic or 
achieve 'OR' logic by putting the results onto the same seda queue say but
is there an easier general way to do this with the filter or xpath xml
syntax?

Thanks 

Dave
-- 
View this message in context: 
http://www.nabble.com/Combination-of-filters-tp22201686p22201686.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: Combination of filters

2009-02-25 Thread James Strachan
2009/2/25 david_geary david_ge...@lagan.com:

 Hi,

 I'm using an xpath filter in the xml configuration eg

 filter
 xpath//cs:case/@queue=13/xpath
 to uri=/
 /filter

 What's the easiest way to combine filters eg I want to accept it if its on
 queue 13 OR 14 (or if on queue 13 AND some other attribute is a particular
 value?)

 I know I can set up separate filters and chain them to get 'AND' logic or
 achieve 'OR' logic by putting the results onto the same seda queue say but
 is there an easier general way to do this with the filter or xpath xml
 syntax?

XPath supports AND and OR too? So you could just use those inside the
XPath expression?
http://www.w3.org/TR/xpath#booleans

-- 
James
---
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/


Delayer: Transport disposed at JVM-Shutdown

2009-02-25 Thread Markus Reil

Hi,

I frequently get a Transport disposed error for delayed messages when I
shutdown Tomcat.
My route is configured like this:
from(queue).delayer(3L).bean(customRouterBean).recipientList(HEADER_TARGET_ROUTE);
Depending on some internal state my customRouterBean decides where the
message goes.

When I shutdown Tomcat while a message is being delayed the router cannot
deliver the message finally because a queue (or the broker?) isn't available
anymore.

Can I find out in the router if a queue is still usable?
And is it possible to interrupt the delay at this point because delaying the
message also delays the server shutdown?

Thanks in advance for any help.

Cheers,
Markus

-- 
View this message in context: 
http://www.nabble.com/Delayer%3A-%22Transport-disposed%22-at-JVM-Shutdown-tp22202167p22202167.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: Setting initial xml content for timer mesages

2009-02-25 Thread Hadrian Zbarcea

Looks like velocity is the simplest solution for your problem here.
Hadrian


On Feb 25, 2009, at 8:46 AM, Claus Ibsen wrote:

On Wed, Feb 25, 2009 at 1:09 PM, david_geary david_ge...@lagan.com  
wrote:


I want to use a timer to call a web service so i need to set the  
xml body of

the message. Im using the xml configuration so I know I can do this:

route
from uri=timer://myTimer?fixedRate=trueamp;period=2000/
setBody
   simple${in.body} World!/simple
/setBody
to uri=
/route

But how can i use this to set xml content? What's the correct  
syntax for
this - or is there a better way to do it? Reading the content from  
a file

would suit also.

Hi

There are many ways of transforming/translate a message with Camel
http://camel.apache.org/message-translator.html

How are you gonna call the webserivce? Are you using a webservice
framework or what?



--
View this message in context: 
http://www.nabble.com/Setting-initial-xml-content-for-timer-mesages-tp22201587p22201587.html
Sent from the Camel - Users (activemq) mailing list archive at  
Nabble.com.







--
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/




Re: Setting initial xml content for timer mesages

2009-02-25 Thread Claus Ibsen
On Thu, Feb 26, 2009 at 5:31 AM, Hadrian Zbarcea hzbar...@gmail.com wrote:
 Looks like velocity is the simplest solution for your problem here.
 Hadrian
Yeah I was about to suggest the same, Velocity, Freemarker og that
StringTemplate.
Can all read a template file and transform it. However you can leave
the template 100% as your static XML.

The camel-http component allows you to set
- http method to use, and you need POST. Will default to POST since
you have a body payload
- set http headers from the exchange in headers.

There is a setHeader XML tag you can use to set the soapaction.




 On Feb 25, 2009, at 8:46 AM, Claus Ibsen wrote:

 On Wed, Feb 25, 2009 at 1:09 PM, david_geary david_ge...@lagan.com
 wrote:

 I want to use a timer to call a web service so i need to set the xml body
 of
 the message. Im using the xml configuration so I know I can do this:

 route
 from uri=timer://myTimer?fixedRate=trueamp;period=2000/
 setBody
       simple${in.body} World!/simple
 /setBody
 to uri=
 /route

 But how can i use this to set xml content? What's the correct syntax for
 this - or is there a better way to do it? Reading the content from a file
 would suit also.

 Hi

 There are many ways of transforming/translate a message with Camel
 http://camel.apache.org/message-translator.html

 How are you gonna call the webserivce? Are you using a webservice
 framework or what?


 --
 View this message in context:
 http://www.nabble.com/Setting-initial-xml-content-for-timer-mesages-tp22201587p22201587.html
 Sent from the Camel - Users (activemq) mailing list archive at
 Nabble.com.





 --
 Claus Ibsen
 Apache Camel Committer

 Open Source Integration: http://fusesource.com
 Blog: http://davsclaus.blogspot.com/





-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/


Re: Restlet Component Fault Handling

2009-02-25 Thread Claus Ibsen
On Tue, Feb 24, 2009 at 1:21 AM, tfredrich tfredr...@yahoo.com wrote:

 I'm utilizing the Restlet component (via a Trunk build) and am interested in
 better understanding error handling behavior via the exchange fault message.
 BTW, I appreciate your work on this component!  Good stuff, indeed.

 In essence, I'm simply using camel-restlet to expose a JSON RESTful service
 with CRUD behavior.  The route looks something like this:

 from(restlet:http://localhost:8080/people/person/{userId}?restletMethod=GET;)
    .intercept(new AuthenticationInterceptor())
    .process(new QueryStringProcessor())
    .process(new GetPersonProcessor())
    .marshal(format)
    .process(new JsonpProcessor());

 Of interest for my question is the GetPersonProcessor, which is responsible
 for retrieving the person object from a storage repository.  When a
 non-existent userId is requested, the GetPersonProcessor does not return a
 person object and, instead sets the restlet response header to 404 (not
 found).  After reading the Camel manual, I thought it best to set the 404
 along with a fault message on the exchange, but the restlet component
 doesn't appear to acknowledge the fault and composes its response from the
 out message.  So, unless I misunderstand, I have to set the 404 on the out
 message header (for the restlet component) and set the body on the fault
 message (for camel to terminate the pipeline).

 Now for the question:  Is this the way I should be doing things?  Or
 could/should the DefaultRestletBinding utilize the fault message to compose
 its response, if a fault message exists?  Your feedback is much appreciated.
Hi

William Tam or William Jiang is the people behind the camel-restlet component
and will be able to help you.

Whats you current status?

The fault stuff in Camel is put in Camel because of JBI. In pure camel
its not really used as we use Exceptions to indicate failures.
So there can be a few rough spots in the some components that does not
adhere to fault.

And take a look in the source code for restlet. Compare it with
camel-http that should honor the fault stuff.
You might find a gremlin and can point out the problem so we can fix it faster.




 Thanks,
 --Todd
 --
 View this message in context: 
 http://www.nabble.com/Restlet-Component-Fault-Handling-tp22173327p22173327.html
 Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.





-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/