Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes a JCA 1.6 ResourceAdapter need a ManagedConnectionFactory?
    primarykey
    data
    text
    <p>I have written a <a href="http://code.google.com/p/drools-jca/" rel="noreferrer">JCA resource adapter before</a>.</p> <p>However, now I find myself in a position of having to write one solely to get access to the <code>BootstrapContext</code> and its associated <code>WorkManager</code>, and effectively for no other reason.</p> <p>If I'm reading the specification correctly--and that's my question--it looks like if I want someone to be able to <em>use</em> my resource adapter in a spec-compliant fashion, I still need to implement <code>ManagedConnectionFactory</code>, because it would appear that only user connection factories vended by <code>ManagedConnectionFactory</code> implementations are eligible for injection via the <code>@Resource</code> annotation.</p> <p>Go ahead, read it again; I'll wait. :-)</p> <p>In a perfect world, I'd like to write my <code>ResourceAdapter</code> implementation, annotate it with <code>@Connector</code>, specify all the <code>@ConfigProperty</code> bits, pack it up in a <code>.rar</code> file, and be done with it.</p> <p>However, it looks to me like the specification effectively mandates that all communication between the consumer (a stateless EJB in my case) and the resource adapter module is supposed to be accomplished through a user connection factory.</p> <p>For example, section 6.10.1 says:</p> <blockquote> <p>A resource adapter must provide implementations of the following interfaces:</p> <ul> <li>javax.resource.spi.ManagedConnectionFactory</li> <li>javax.resource.spi.ManagedConnection</li> <li>javax.resource.spi.ManagedConnectionMetaData</li> </ul> </blockquote> <p>But section 18--the section on annotations--doesn't seem to provide for enforcing this in any meaningful way.</p> <p>Is this indeed the case? I suppose it must be, but I'd be curious to hear from people who have put together a 1.6 resource adapter.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload