Tooling for JCA Gateway
igarashitm Jun 14, 2012 10:54 AMDear tooling magical elves,
I think I can't fix the detail of outbound (which is for reference binding) in time, so I'd make a wish for inbound one (for service binding) at first.
schema:
example:
<binding.jca xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912/binding-jca"> <inboundConnection> <resourceAdapter name="hornetq-ra.rar" type="javax.resource.spi.ResourceAdapter"> <property name="foo" value="bar"/> </resourceAdapter> <activationSpec type="javax.resource.spi.ActivationSpec"> <property name="destinationType" value="javax.jms.Queue"/> <property name="destination" value="queue/GreetingServiceQueue"/> </activationSpec> </inboundConnection> <inboundInteraction> <listener>javax.jms.MessageListener</listener> <inboundOperation name="onMessage" selectedOperation="onMessage"/> <endpoint type="org.switchyard.component.jca.endpoint.JMSEndpoint"> <property name="jmsEndpointSpecificProp" value="brabra"/> </endpoint> <transacted>true</transacted> </inboundInteraction> </binding.jca>
We currently have some constant values which is expected to be filled by tooling automatically. I don't have any use-case those paramter should be configurable right now, but it may appear someday.
- binding.jca/inboundConnection/resourceAdapter/@type
- binding.jca/inboundConnection/activationSpec/@type
- binding.jca/inboundInteraction/inboundOperation/@selectedOperation - just same value as @name attribute
And the options should be configured are here:
- binding.jca/inboundConnection/resourceAdapter/@name - File name of resource adapter archive. User needs to fill it manually.
- binding.jca/inboundConnection/resourceAdapter/property - Any number of name/value type String property may be supplied. It doesn't used right now though - we actually need is activationSpec/property
- binding.jca/inboundConnection/activationSpec/property - Any number of name/value type String property may be supplied.
- binding.jca/inboundInteraction/listener - FQN of the Endpoint interface. endpointClass should implement this interface.
- binding.jca/inboundInteraction/inboundOperation - Operation name to be invoked on the listener and endpointClass. So if the listener has just one public method, then that's the one for this inboundOperation.
- binding.jca/inboundInteraction/endpointClass
- binding.jca/inboundInteraction/endpoint/@type - FQN of the Endpoint implementation class. We have 2 built-in Endpoint, JMSEndpoint and CCIEndpoint. These 2 have corresponding listener and inboundOperation, so if we can choose from list of 2 and then the listener, inboundOperation and endpointClass are filled automatically, that would be great otherwise, application developer should implement custom endpoint class for their specific EIS according to its resource adapter. The endpoint class must extends org.switchyard.component.jca.endpoint.AbstractInflowEndpoint class.
- binding.jca/inboundInteraction/endpoint/property - Any number of name/value type String property may be supplied.
- binding.jca/inboundInteraction/transacted - boolean value to indicate whether transaction is needed by endpoint or not. True by default.
endpoint mapping is here:
- JMSEndpoint
- listener: javax.jms.MessageListener
- inboundOperation: onMessage
- endpointClass: org.switchyard.component.jca.endpoint.JMSEndpoint
- CCIEndpoint
- listener: javax.resource.cci.MessageListener
- inboundOperation: onMessage
- endpointClass: org.switchyard.component.jca.endpoint.CCIEndpoint
Please let me know if there is any unclear point or something.
Thanks,
Tomo
Message was edited by: Tomohisa igarashi - needed to change endpointClass element into endpoint element to support property