Skip to content

Error in doc on JCA CCI - ConnectionSpecConnectionFactoryAdapter [SPR-9466] #14101

@spring-projects-issues

Description

@spring-projects-issues

Sylvain LAURENT opened SPR-9466 and commented

In the documentation, in chapter about JCA CCI, section "Configuring CCI connections", when explaining ConnectionSpecConnectionFactoryAdapter it is said that

If the adapter's connectionSpec property is specified, the adapter uses the getConnection variant without argument, else the one with the ConnectionSpec argument.

I think that's erroneous : when the connectionSpec is specified the adapter uses the javax.resource.cci.ConnectionFactory.getConnection(ConnectionSpec) method else it uses javax.resource.cci.ConnectionFactory.getConnection()

That seems to be the behavior of the method org.springframework.jca.cci.connection.ConnectionSpecConnectionFactoryAdapter.doGetConnection(ConnectionSpec) :

protected Connection doGetConnection(ConnectionSpec spec) throws ResourceException {
     if (getTargetConnectionFactory() == null) {
          throw new IllegalStateException("targetConnectionFactory is required");
     }
     if (spec != null) {
          return getTargetConnectionFactory().getConnection(spec);
     }
     else {
          return getTargetConnectionFactory().getConnection();
     }
}

please fix this sentence in the doc.


Affects: 3.0.7, 3.1.1

Backported to: 3.1.4

Metadata

Metadata

Assignees

Labels

status: backportedAn issue that has been backported to maintenance branchestype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions