Mantis - Resin
Viewing Issue Advanced Details
2346 major always 01-18-08 17:58 01-27-08 12:07
closed 3.1.4  
none 3.1.5  
0002346: com.caucho.jca.ConnectorResource calls non-existent method ManagedConnectionFactory.setResourceAdapter()
I'm attempting to set up Apache Jackrabbit as a shared resource in Resin 3.1.4 and have run into an error in com.caucho.jca.ConnectorResource.addConnectionFactory():

[17:15:31.879] {resin-13} Caused by: java.lang.AbstractMethodError: org.apache.jackrabbit.jca.JCAManagedConnectionFactory.setResourceAdapter(Ljavax/resource/spi/ResourceAdapter;)V
[17:15:31.879] {resin-13} at com.caucho.jca.ConnectorResource.addConnectionFactory(

Here's the offending bit:

    ManagedConnectionFactory managedFactory = factory.getFactory();
    // ...
    if (_ra != null)

The setResourceAdapter() method is listed in the Resin javadocs: [^]

and it shows up in a dump of the interface from $RESIN_HOME/lib/jca-15.jar. It appears that this method isn't present in the JCA reference implementation, however: [^]

The next bit should be qualified by the fact that this is my first foray into JCA...

Section 5.3.2 of the JCA 1.5 spec says that a ManagedConnectionFactory implementation MAY inherit the ResourceAdapter JavaBean configuration, but doesn't require it. The javax.resource.spi.ResourceAdapterAssociation interface is used to mark factories that support get/setResourceAdapter(). Suggested fix would be to modify the code to see if _ra implements this interface and only call setResourceAdapter() in that case. I'll try this, but I don't know if the change will affect other parts of the JCA implementation. [^] (546 bytes) 01-21-08 10:27

01-21-08 10:28   
Added patch to from Resin 3.1.4 which tests to see if the ManagedConnectionFactory implements ResourceAdapterAssociation before calling setResourceAdapter(). This got me past the AbstractMethodError crash reported above.
01-27-08 12:07   

See [^] for a step-by-step guide to installing Jackrabbit with Resin's JCA.