users@glassfish.java.net

Re: Can I inject a JCA Connection Factory?

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Mon, 15 Oct 2007 18:22:21 +0530

> Then, my outbound ConnectionPool is configured. My implementation of
> javax.resource.cci.ConnectionFactory contains a reference to my instance of
> javax.resource.spi.ManagedConnectionFactory (as required by the
> ConnectionManager). My implementation of ManagedConnectionFactory holds the
> reference to the implementation of the javax.resource.ResourceAdapter. I added
> this in order to support the interface
> javax.resource.spi.ResourceAdapterAssociation, where the
> ManagedConnectionFactory can be associated with the ResourceAdapter. I don't use
> this reference myself, but presumed after reading section 5.3.2 of the JCA 1.5
> spec, that the application containers used this.
>

Ah, so that is it. Thanks for the clarification. The ResourceAdapterAssociation
ensures that the container [GlassFish] associates the RA bean instance with an
MCF instance. This association is done exactly once and is typically used by the
MCF instance to "inherit" properties [second paragraph of 5.3.2 of 1.5 spec]
specified in the RA instance.

We shall update the issue as we fix it. Thanks.

Thanks
--Siva.

glassfish_at_javadesktop.org wrote:
> Thanks Siva. I would just be happy, if the correct ResourceReferenceWrapper type was applied to the Resource adapter if the javax.resource.cci.ConnectionFactory is defined as the type. In my mind, the serialization issue doesn't come up, because it doesn't perform the copy. The workaround is fine, but I just think having this addition better supports the factories.
>
> I'm happy to raise an issue. But, just for clarification, we're not using WorkManager to handle outbound communication. My ResourceAdapter class has the code to support both inbound and outbound communication. So, when it starts, it holds it's reference to the BootstrapContext.
>
> Then, my outbound ConnectionPool is configured. My implementation of javax.resource.cci.ConnectionFactory contains a reference to my instance of javax.resource.spi.ManagedConnectionFactory (as required by the ConnectionManager). My implementation of ManagedConnectionFactory holds the reference to the implementation of the javax.resource.ResourceAdapter. I added this in order to support the interface javax.resource.spi.ResourceAdapterAssociation, where the ManagedConnectionFactory can be associated with the ResourceAdapter. I don't use this reference myself, but presumed after reading section 5.3.2 of the JCA 1.5 spec, that the application containers used this.
>
> Anyways, I'll raise an issue.
>
> Thanks,
> Ed
> [Message sent by forum member 'hildo' (hildo)]
>
> http://forums.java.net/jive/thread.jspa?messageID=240024
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>