You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by ma...@uk.bnpparibas.com on 2008/02/01 18:46:36 UTC
bc calling se1 which in turn calls se2
hi all,
following exampe of file:poller, i have develop following:
- service1 which receives a file from file:poller and send it to service2
- service2 which receives file from service1
now , i thik i read somewhere that file:poller send inOnly messages.
therefore, i have overridden the processINOnly method in my Endpoint for
Service1, so ican see msg
and process it
problem is, how do i forward it to se2?
if it's inOnly, i cannot put any message back on the bus...
anyone could help?
thanks and regards
marco
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
Re: bc calling se1 which in turn calls se2
Posted by ma...@uk.bnpparibas.com.
Chris,
yes i have definitely to go that way..
i tried pipeline at home yesterday... got b ig errors and posted a thred
in the forum titled eip:pipeline error....
here's what i got.... can u help out?
i had a look at sourcecode of pipeline component but still could not
undestand what's wrong with my code...
below are details, can u help a little?
hi all,
i have posted a question on the mailing list about having a bc calling a
se1 which in turn call se2.
I was using as bc file>:poller, which uses an inOnly message....
what i wanted to achieve is to have file:poller send a message to se1
which
in turn calls se2
I was suggested by Mr Chris Custine to try out eip:pipeline.....
i have tried it out.. the message arrives at destination but it seems that
se1 is not being invoked.....
i got a disaster excepiton..
But first, here's the 3 xbean.xml i am using
-- BC --
[code]
<file:poller service="tut:file"
endpoint="poller"
file="file:///c:/servicemix-projects/in/"
targetService="tut:pipeline">
<property name="marshaler">
<bean
class="org.apache.servicemix.components.util.BinaryFileMarshaler" />
</property>
</file:poller>
[/code]
---- Pipeline --
[code]
<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
xmlns:tut="urn:servicemix:tutorial"
xmlns:hwse="http://org.apache.servicemix.samples.helloworld.se/1.0"
xmlns:xyz="http://companyxyz.com"
xmlns:magent="http://org.apache.servicemix.samples.middleagent/1.0"
xmlns:xxx="http://middleagent.com">
<eip:pipeline service="tut:pipeline" endpoint="endpoint">
<eip:transformer>
<eip:exchange-target service="xxx:middleAgent" /> ----> this is
supposed to be SE1,which has a processInOut method
</eip:transformer>
<eip:target>
<eip:exchange-target service="xyz:helloWorld" /> ----> this is
supposed to be SE2, which has a processINOnly method
</eip:target>
</eip:pipeline>
[/code]
-- middleAgent, aka SE1
[code]
<beans xmlns:magent="http://org.apache.servicemix.samples.middleagent/1.0"
xmlns:xxx="http://middleagent.com">
<magent:endpoint service="xxx:middleAgent" endpoint="middleAgent"/>
</beans>
[/code]
-- helloWorld, aka SE2 ----------------
[code]
<hwse:endpoint service="xyz:helloWorld"
endpoint="helloWorld">
<property name="externalBean">
<bean id="myBean"
class="org.apache.servicemix.samples.beans.MyBean" />
</property>
</hwse:endpoint>
[/code]
i am receiving this bad exception..
[code]
INFO - AutoDeploymentService - Directory: hotdeploy: Finished
installa
tion of archive: tutorial-sa-1.0-SNAPSHOT.jar
ERROR - MyComponent - Error processing exchange InOut[
id: ID:192.168.0.2-117dc6d95d5-9:0
status: Active
role: provider
service: {http://middleagent.com}middleAgent
endpoint: middleAgent
in: null
out: null
]
java.lang.IllegalStateException: component is not owner
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setProperty(M
essageExchangeImpl.java:403)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(Delivery
ChannelImpl.java:428)
at
org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDel
iveryChannel.java:79)
at
org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndp
oint.java:67)
at
org.apache.servicemix.common.endpoints.ProviderEndpoint.process(Provi
derEndpoint.java:114)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLi
feCycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(Async
BaseLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:170)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
..java:675)
at java.lang.Thread.run(Thread.java:595)
---- Yeah we got it!!!
ERROR - MyComponent - Error setting exchange status to
ERROR
java.lang.IllegalStateException: component is not owner when trying to set
error
: java.lang.IllegalStateException: component is not owner
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setError(Mess
ageExchangeImpl.java:264)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLife
Cycle.java:57)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBoun
d(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlo
w.java:170)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.j
ava:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.jav
a:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
at
thanks and regards
marco
Internet
ccustine@apache.org
Sent by: chris.custine@gmail.com
04/02/2008 15:59
Please respond to
users@servicemix.apache.org
To
users
cc
Subject
Re: bc calling se1 which in turn calls se2
This is precisely the use case for pipeline! If you are interested and
are
going to be doing a lot more work with patterns such as pieline, you could
also take a look at Camel <http://activemq.apache.org/camel> and use
the ServiceMix
Camel <http://servicemix.apache.org/servicemix-camel.html> component which
implements the same patterns and has many more features. Specifically you
could look at the page on pipes and
filters<http://activemq.apache.org/camel/pipes-and-filters.html>
..
Good luck!
Chris
On Feb 4, 2008 7:25 AM, <ma...@uk.bnpparibas.com> wrote:
> Hello Chris,
> thanks for the suggestion, i m trying i t out
>
> however, will it handle also this usecase?
>
> filepoller sends a file to service1(se1)
> se1 will read the file, extract the content, do some 'transformation'
and
> then forward the message to service2..
>
> will this be handled by the pipeline?
> or do i have to assume that i cannot have a 3 step process (bc -->se1
> --->se2) in servicemix?
>
> thanks and regards
> marco
>
>
>
>
>
> Internet
> ccustine@apache.org
>
> Sent by: chris.custine@gmail.com
> 01/02/2008 18:49
> Please respond to
> users@servicemix.apache.org
>
>
> To
> users
> cc
>
> Subject
> Re: bc calling se1 which in turn calls se2
>
>
>
>
>
>
> It sounds like you could use the eip:pipeline component with service1 as
> transformer and service2 as target. You might want to give this a try.
>
> See
> http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-Pipeline
>
> Thanks,
> Chris
>
> On Feb 1, 2008 10:46 AM, <ma...@uk.bnpparibas.com> wrote:
>
> > hi all,
> > following exampe of file:poller, i have develop following:
> > - service1 which receives a file from file:poller and send it to
> service2
> > - service2 which receives file from service1
> >
> > now , i thik i read somewhere that file:poller send inOnly messages.
> > therefore, i have overridden the processINOnly method in my Endpoint
> for
> > Service1, so ican see msg
> > and process it
> >
> > problem is, how do i forward it to se2?
> >
> > if it's inOnly, i cannot put any message back on the bus...
> >
> > anyone could help?
> >
> > thanks and regards
> > marco
> >
> >
> >
> > This communication is confidential, may be privileged and is meant
only
> > for the intended recipient. If you are
> > not the intended recipient, please notify the sender by reply and
delete
> > this message from your system. Any
> > unauthorised dissemination, distribution or copying hereof is
> prohibited.
> >
> > BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
> > Limited, BNP Paribas UK Limited,
> > BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited
> are
> > authorised and regulated by
> > the Financial Services Authority.
> >
> > BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private
> Bank
> > are authorised by the CECEI
> > and AMF. BNP Paribas London Branch, BNP Paribas Securities Services
> > London Branch and BNP Paribas
> > Private Bank London Branch are regulated by the Financial Services
> > Authority for the conduct of their UK
> > business. BNP Paribas Securities Services London Branch is also a
> member
> > of the London Stock Exchange.
> >
> >
>
>
>
> This communication is confidential, may be privileged and is meant only
> for the intended recipient. If you are
> not the intended recipient, please notify the sender by reply and delete
> this message from your system. Any
> unauthorised dissemination, distribution or copying hereof is
prohibited.
>
> BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
> Limited, BNP Paribas UK Limited,
> BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited
are
> authorised and regulated by
> the Financial Services Authority.
>
> BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private
Bank
> are authorised by the CECEI
> and AMF. BNP Paribas London Branch, BNP Paribas Securities Services
> London Branch and BNP Paribas
> Private Bank London Branch are regulated by the Financial Services
> Authority for the conduct of their UK
> business. BNP Paribas Securities Services London Branch is also a
member
> of the London Stock Exchange.
>
>
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
Re: bc calling se1 which in turn calls se2
Posted by Chris Custine <cc...@apache.org>.
This is precisely the use case for pipeline! If you are interested and are
going to be doing a lot more work with patterns such as pieline, you could
also take a look at Camel <http://activemq.apache.org/camel> and use
the ServiceMix
Camel <http://servicemix.apache.org/servicemix-camel.html> component which
implements the same patterns and has many more features. Specifically you
could look at the page on pipes and
filters<http://activemq.apache.org/camel/pipes-and-filters.html>
.
Good luck!
Chris
On Feb 4, 2008 7:25 AM, <ma...@uk.bnpparibas.com> wrote:
> Hello Chris,
> thanks for the suggestion, i m trying i t out
>
> however, will it handle also this usecase?
>
> filepoller sends a file to service1(se1)
> se1 will read the file, extract the content, do some 'transformation' and
> then forward the message to service2..
>
> will this be handled by the pipeline?
> or do i have to assume that i cannot have a 3 step process (bc -->se1
> --->se2) in servicemix?
>
> thanks and regards
> marco
>
>
>
>
>
> Internet
> ccustine@apache.org
>
> Sent by: chris.custine@gmail.com
> 01/02/2008 18:49
> Please respond to
> users@servicemix.apache.org
>
>
> To
> users
> cc
>
> Subject
> Re: bc calling se1 which in turn calls se2
>
>
>
>
>
>
> It sounds like you could use the eip:pipeline component with service1 as
> transformer and service2 as target. You might want to give this a try.
>
> See
> http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-Pipeline
>
> Thanks,
> Chris
>
> On Feb 1, 2008 10:46 AM, <ma...@uk.bnpparibas.com> wrote:
>
> > hi all,
> > following exampe of file:poller, i have develop following:
> > - service1 which receives a file from file:poller and send it to
> service2
> > - service2 which receives file from service1
> >
> > now , i thik i read somewhere that file:poller send inOnly messages.
> > therefore, i have overridden the processINOnly method in my Endpoint
> for
> > Service1, so ican see msg
> > and process it
> >
> > problem is, how do i forward it to se2?
> >
> > if it's inOnly, i cannot put any message back on the bus...
> >
> > anyone could help?
> >
> > thanks and regards
> > marco
> >
> >
> >
> > This communication is confidential, may be privileged and is meant only
> > for the intended recipient. If you are
> > not the intended recipient, please notify the sender by reply and delete
> > this message from your system. Any
> > unauthorised dissemination, distribution or copying hereof is
> prohibited.
> >
> > BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
> > Limited, BNP Paribas UK Limited,
> > BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited
> are
> > authorised and regulated by
> > the Financial Services Authority.
> >
> > BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private
> Bank
> > are authorised by the CECEI
> > and AMF. BNP Paribas London Branch, BNP Paribas Securities Services
> > London Branch and BNP Paribas
> > Private Bank London Branch are regulated by the Financial Services
> > Authority for the conduct of their UK
> > business. BNP Paribas Securities Services London Branch is also a
> member
> > of the London Stock Exchange.
> >
> >
>
>
>
> This communication is confidential, may be privileged and is meant only
> for the intended recipient. If you are
> not the intended recipient, please notify the sender by reply and delete
> this message from your system. Any
> unauthorised dissemination, distribution or copying hereof is prohibited.
>
> BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
> Limited, BNP Paribas UK Limited,
> BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are
> authorised and regulated by
> the Financial Services Authority.
>
> BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank
> are authorised by the CECEI
> and AMF. BNP Paribas London Branch, BNP Paribas Securities Services
> London Branch and BNP Paribas
> Private Bank London Branch are regulated by the Financial Services
> Authority for the conduct of their UK
> business. BNP Paribas Securities Services London Branch is also a member
> of the London Stock Exchange.
>
>
Re: bc calling se1 which in turn calls se2
Posted by ma...@uk.bnpparibas.com.
Hello Chris,
thanks for the suggestion, i m trying i t out
however, will it handle also this usecase?
filepoller sends a file to service1(se1)
se1 will read the file, extract the content, do some 'transformation' and
then forward the message to service2..
will this be handled by the pipeline?
or do i have to assume that i cannot have a 3 step process (bc -->se1
--->se2) in servicemix?
thanks and regards
marco
Internet
ccustine@apache.org
Sent by: chris.custine@gmail.com
01/02/2008 18:49
Please respond to
users@servicemix.apache.org
To
users
cc
Subject
Re: bc calling se1 which in turn calls se2
It sounds like you could use the eip:pipeline component with service1 as
transformer and service2 as target. You might want to give this a try.
See
http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-Pipeline
Thanks,
Chris
On Feb 1, 2008 10:46 AM, <ma...@uk.bnpparibas.com> wrote:
> hi all,
> following exampe of file:poller, i have develop following:
> - service1 which receives a file from file:poller and send it to
service2
> - service2 which receives file from service1
>
> now , i thik i read somewhere that file:poller send inOnly messages.
> therefore, i have overridden the processINOnly method in my Endpoint
for
> Service1, so ican see msg
> and process it
>
> problem is, how do i forward it to se2?
>
> if it's inOnly, i cannot put any message back on the bus...
>
> anyone could help?
>
> thanks and regards
> marco
>
>
>
> This communication is confidential, may be privileged and is meant only
> for the intended recipient. If you are
> not the intended recipient, please notify the sender by reply and delete
> this message from your system. Any
> unauthorised dissemination, distribution or copying hereof is
prohibited.
>
> BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
> Limited, BNP Paribas UK Limited,
> BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited
are
> authorised and regulated by
> the Financial Services Authority.
>
> BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private
Bank
> are authorised by the CECEI
> and AMF. BNP Paribas London Branch, BNP Paribas Securities Services
> London Branch and BNP Paribas
> Private Bank London Branch are regulated by the Financial Services
> Authority for the conduct of their UK
> business. BNP Paribas Securities Services London Branch is also a
member
> of the London Stock Exchange.
>
>
This communication is confidential, may be privileged and is meant only for the intended recipient. If you are
not the intended recipient, please notify the sender by reply and delete this message from your system. Any
unauthorised dissemination, distribution or copying hereof is prohibited.
BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK Limited, BNP Paribas UK Limited,
BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are authorised and regulated by
the Financial Services Authority.
BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank are authorised by the CECEI
and AMF. BNP Paribas London Branch, BNP Paribas Securities Services London Branch and BNP Paribas
Private Bank London Branch are regulated by the Financial Services Authority for the conduct of their UK
business. BNP Paribas Securities Services London Branch is also a member of the London Stock Exchange.
Re: bc calling se1 which in turn calls se2
Posted by Chris Custine <cc...@apache.org>.
It sounds like you could use the eip:pipeline component with service1 as
transformer and service2 as target. You might want to give this a try.
See http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-Pipeline
Thanks,
Chris
On Feb 1, 2008 10:46 AM, <ma...@uk.bnpparibas.com> wrote:
> hi all,
> following exampe of file:poller, i have develop following:
> - service1 which receives a file from file:poller and send it to service2
> - service2 which receives file from service1
>
> now , i thik i read somewhere that file:poller send inOnly messages.
> therefore, i have overridden the processINOnly method in my Endpoint for
> Service1, so ican see msg
> and process it
>
> problem is, how do i forward it to se2?
>
> if it's inOnly, i cannot put any message back on the bus...
>
> anyone could help?
>
> thanks and regards
> marco
>
>
>
> This communication is confidential, may be privileged and is meant only
> for the intended recipient. If you are
> not the intended recipient, please notify the sender by reply and delete
> this message from your system. Any
> unauthorised dissemination, distribution or copying hereof is prohibited.
>
> BNP Paribas Fund Services UK Limited, BNP Paribas Trust Corporation UK
> Limited, BNP Paribas UK Limited,
> BNP Paribas Commodity Futures Ltd and Investment Fund Services Limited are
> authorised and regulated by
> the Financial Services Authority.
>
> BNP Paribas, BNP Paribas Securities Services and BNP Paribas Private Bank
> are authorised by the CECEI
> and AMF. BNP Paribas London Branch, BNP Paribas Securities Services
> London Branch and BNP Paribas
> Private Bank London Branch are regulated by the Financial Services
> Authority for the conduct of their UK
> business. BNP Paribas Securities Services London Branch is also a member
> of the London Stock Exchange.
>
>