Bill Burke wrote:
Ok, did 1st stage of JCA Gateway. I'll commit that tomorrow
morning.
Still need to do schema change to add jca elements.
Looks like an easy to use
interface. Nice :-)
Here's what a JCA endpoint looks like:
public void setServiceInvoker(ServiceInvoker invoker)
{
this.service = invoker;
}
The InflowGateway interface has one method: setServiceInvoker(). The
ServiceInvoker allows you to post ESB messages to the target service's
EPR. The ServiceInvoker is created by the ESB container and passed to
the endpoint bean in the initialization phase.
I'd already created something
to fill the same role as the
ServiceInvoker. It's called MessageDeliveryAdapter
(
http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/core/listeners/...).
We should probably settle on one of these.
So MessageDeliveryAdapter is created using a service "category" and
"name" and can then be used to deliver messages to that service, sync or
async.
Next steps?
Schema changes to add JCA elements. Here's what I was thinking:
<providers>
<jca-bus busid="JMS-Inflow-Bus"
adapter="jms-ra.rar"
endpointClass="org.test.MyEndpointBean"
messagingType="javax.jms.MessageListener"
jcaBridge="org.jboss.gateway.jca.JBoss42ActivationBridge">
<activation-config>
<activation-config-property>
<activation-config-property-name>
destinationType
</activation-config-property-name>
<activation-config-property-value>
javax.jms.Queue
</activation-config-property-value>
</activation-config-property>
...
</activation-config>
</jca-bus>
</providers>
<services>
<service category="HelloWorld_ActionESB"
name="SimpleListener"
description="Hello World">
<listeners>
<jca-gateway busid="JMS-Inflow-Bus" ...>
... same thing as jca-inflow-bus ...
</jca-gateway>
The messageType is optional. If it is not specified, the ESB
container will guess what it is. The jcaBridge is optional. This
class is an SPI for plugging in the JCA code into other app servers.
Only JBoss is supported now obviously.
The <activation-config> syntax was stolen from EJB. Should we
simplify it? Or leave it consistent with EJB?
Not sure which I prefer. The
<activation-config> is a bit verbose
alright. Is the consistency we'd be getting here really worth it?
--
Red Hat:
Registered Address: Red Hat Ltd, Brian O' Donnell and Partners, 62 Merrion Square,
Dublin 2, Ireland.
Registered in the Companies Registration Office, Parnell House, 14 Parnell Square, Dublin
1, Ireland, at No. 304873
Directors: Charlie Peters (USA), Michael Cunningham (USA). David Owens, Brendan Lane