本文整理汇总了Java中javax.resource.cci.ConnectionFactory.getRecordFactory方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionFactory.getRecordFactory方法的具体用法?Java ConnectionFactory.getRecordFactory怎么用?Java ConnectionFactory.getRecordFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.resource.cci.ConnectionFactory
的用法示例。
在下文中一共展示了ConnectionFactory.getRecordFactory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import javax.resource.cci.ConnectionFactory; //导入方法依赖的package包/类
@Override
public void initialize() {
super.initialize();
_composer = getMessageComposer(MappedRecordBindingData.class);
_selector = getOperationSelector(MappedRecordBindingData.class);
try {
ConnectionFactory factory = (ConnectionFactory) new InitialContext().lookup(_connectionFactoryJNDIName);
_recordFactory = factory.getRecordFactory();
} catch (Exception e) {
throw new SwitchYardException(e);
}
}
示例2: JCAConnection
import javax.resource.cci.ConnectionFactory; //导入方法依赖的package包/类
public JCAConnection(final ConnectionFactory connectionFactory, final String connectionSpecFactoryName) {
connectionProvider = new ConnectionProvider(connectionFactory, connectionSpecFactoryName);
try {
recordFactory = connectionFactory.getRecordFactory();
} catch (ResourceException e) {
throw new HibersapException("Problem creating RecordFactory.", e);
}
}
示例3: getRecordFactory
import javax.resource.cci.ConnectionFactory; //导入方法依赖的package包/类
/**
* 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.
* @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();
}
}