rss
SOATUBE
Oracle
Custom Search SOABYTE here

Monday, November 8, 2010

Parameterization of JCA WSDL properties

Parameterizing JNDI connection factory for inbound JMS partnerlink

WSDL:

    <service name="InQueue">
      <port name="Consume_Message_pt" binding="tns:Consume_Message_binding">
        <jca:address location="$JndiLocation" />
      </port>
    </service>

bpel.xml:

    <activationAgents>
       <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent"
                        partnerLink="InQueue">
         <property name="JndiLocation">eis/aqjms/InboundQueue1</property>
       </activationAgent>
       <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent"
                        partnerLink="InQueue">
         <property name="JndiLocation">eis/aqjms/InboundQueue2</property>
       </activationAgent>
    </activationAgents>

Parameterizing QueueName for inbound AQ adapter partnerlink

WSDL:

    <binding name="Dequeue_binding" type="...
      <pc:inbound_binding />
        <operation name="customer_out_queue_Dequeue">
          <jca:operation
              QueueName="$InputQueue"
              ...

bpel.xml:

    <activationAgents>
       <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent"
                        partnerLink="InQueue">
         <property name="InputQueue">RECEIVE_QUEUE_1</property>
       </activationAgent>
       <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent"
                        partnerLink="InQueue">
         <property name="InputQueue">RECEIVE_QUEUE_2</property>
       </activationAgent>
    </activationAgents>

Parameterizing MappingsMetaDataURL for an inbound Database adapter partnerlink

WSDL:

    <binding name="Dept_Binding" type="tns:DeptManager">
      <pc:inbound_binding />
        <operation name="receive">
          <jca:operation
              ...
              MappingsMetaDataURL="$mappingFile" >

bpel.xml:

    <activationAgents>
       <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent"
                        partnerLink="InQueue">
         <property name="mappingFile">DeptInboundMappings.xml</property>
       </activationAgent>
    </activationAgents>

Using "activationInstances" parameter

This parameter will control how many instances of a particular inbound JCA activation agent will be spawned.
It can thus be used to increase concurrency, if the adapter itself does not support multi threading.
For each individual endpoint activation, the implicit parameter $instance is available to reference as a unique counter value,
starting at "0" and incremented by "1" for each endpoint activation. It could for example be used as follows:
<binding name=FileRead_Binding" type="tns:FileRead">
      <pc:inbound_binding />
        <operation name="readFile">
          <jca:operation
              ...
              PhysicalDirectory="/nfs/$(dir)$(instance)/$(pattern)" >
The "instance" property is special in that it will contain the number of the current activation, i.e. if bpel.xml contains
<activationAgents>
  <activationAgent ... partnerLink="inboundPL">
    <property name="activationInstances">5</property>
    <property name="dir">inputDir</property>
    <property name="pattern">.+\.txt</property>
    ...
the each endpoint activation (instance) will have a distinct value for $(instance) in the range 0..4.
The activationInstances property can be dynamically updated via the BPEL console (Descriptor page) and will make the adapter framework either spawn more instances or shutdown existing instances on the fly (in the shutdown case, in reverse order, i.e. the highest instance number will be shutdown first).

0 comments:

Post a Comment

 
Blogger Profile