You could do something like the following:
JCAConnector jcaConnector = new JCAConnector();
jcaConnector.setActivationSpec(activationSpec);
jcaConnector.setEndpointFactory(endpointFactory);
jcaConnector.setResourceAdapter(resourceAdapter);
jcaConnector.afterPropertiesSet();
But you could also write:
resourceAdapter.endpointActivation(endpointFactory, activationSpec);
You can also take a look at what servicemix does for example:
http://fisheye3.cenqua.com/browse/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java?r=470813#l589On 1/10/07, nlif <
naaman@...> wrote:
>
> Hi all,
>
> First, congrats on the 2.0 release :-)
>
> I'd like to be able to create JCAConnector programmatically, but I can't
> figure out how to do this. The connector looks for a String "ref" that
> should point to a bean-name in the Spring configuration. I could subclass
> DefaultEndpointFactory to override createMessageListener(), but I can't find
> a way to plug my class instead of DefaultEndpointFactory, because it is
> created in JCAConnector.start().
>
> Is there a solution?
>
> Thanks in adavnce,
> Naaman
>
>
> --
> View this message in context:
http://www.nabble.com/How-can-I-create-a-JCAConnector-programmatically--tf2952870.html#a8258820> Sent from the jencks - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>
http://xircles.codehaus.org/manage_email>
>
--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (
http://www.logicblaze.com/)
Blog:
http://gnodet.blogspot.com/---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email