List of usage examples for org.springframework.jca.cci.connection NotSupportedRecordFactory NotSupportedRecordFactory
NotSupportedRecordFactory
From source file:org.springframework.jca.cci.core.CciTemplate.java
/** * Return a RecordFactory for the given ConnectionFactory. * <p>Default implementation returns the connector's RecordFactory if * available, falling back to a NotSupportedRecordFactory placeholder. * This allows to invoke a RecordCreator callback with a non-null * RecordFactory reference in any case.//from ww w . j av a 2 s .c om * @param connectionFactory the CCI ConnectionFactory * @return the CCI RecordFactory for the ConnectionFactory * @throws ResourceException if thrown by CCI methods * @see org.springframework.jca.cci.connection.NotSupportedRecordFactory */ protected RecordFactory getRecordFactory(ConnectionFactory connectionFactory) throws ResourceException { try { return connectionFactory.getRecordFactory(); } catch (NotSupportedException ex) { return new NotSupportedRecordFactory(); } }