I have come across this question in one of the blog.Some one was asking if we can use a single file adapter to poll multiple directory.
Technically it is possible but to implement it needs a lot of background works to be done.
When ever we create a file adapter it is assigned to one activation agent,one activation agent can process one request at a time so basically we need to write our own custom code for a activation agent.It required a java class file that need to be present in the SOA_HOME\bpel\system\classes directory and again
we need to make the entry in our bpel.xml for that particular activation agent pointing to some other directory
<activationAgents>
<activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="File1">
<property name="portType">Read_ptt</property>
<property name="D:\folder1" type="PhysicalDirectory"></property>
</activationAgent>
<activationAgent className="YOur activation agent" partnerLink="File1">
<property name="portType">Read_ptt</property>
<property name="D:\folder2" type="PhysicalDirectory"></property>
</activationAgent>
<activationAgent className="Your activation agent" partnerLink="File1">
<property name="portType">Read_ptt</property>
<property name="D:\folder3" type="PhysicalDirectory"></property>
</activationAgent>
</activationAgents>
Here you are using a single File adapter File1 but using three activation agent to poll three different directory.
I have not tested this my self and there is not guarantee that it should work it is just my view that it should work in such a way.Seeking other's input if my concept is correct.
SOA Suite best practice guide suggest on how to create an activation agent.
4 comments:
I have tested this and it works
Great to hear that :) ,ARun can you share some more information on the same how you have done it.
Arun
could you please let me know the steps how did you make it work?
Appreciate your response.
You can go for the property in jca that is DirectoryMessageSeparator(you can define your own separator).By default it is ';'.
Post a Comment