Releases: j-easy/easy-batch
v7.0.2
This is a patch release that fixes the following issue:
- Issue #394 : Resource leak in
FileRecordReader
This release also includes some minor backward-compatible dependency updates:
- jackson-databind:
2.12.0->2.12.2 - yasson:
1.0.7->1.0.8 - univocity-parsers:
2.9.0->2.9.1 - xstream:
1.4.15->1.4.16 - spring:
5.3.2->5.3.4 - hibernate:
5.4.26.Final->5.4.29.Final
v7.0.1
This is a patch release that fixes the following issue:
- Issue #393 : Errors in reader/writer open/close methods are not handled
This release also includes some minor backward-compatible dependency updates:
- jackson-databind:
2.11.2->2.12.0 - univocity-parsers:
2.8.4->2.9.0 - xstream:
1.4.12->1.4.15 - yamlbeans:
1.13->1.15 - spring:
5.2.9.RELEASE->5.3.2 - hibernate:
5.4.21.Final->5.4.26.Final - hibernate-validator:
6.1.5.Final->6.1.7.Final
v7.0.0
This release is a major version as it requires Java 11 or above. The main theme for this release is API type safety. There are no new features in this version except updating all APIs to be generic:
RecordReader(and its listener): 7ed62a5Batch(and its listener): ba60977RecordWriter(and its listener): d437aa5RecordProcessor(and its listener / sub interfaces): 279ed29Predicate: 063fcc5JobBuilder: 6929936
These changes require updating job definitions to use generics for input/output types in order to enforce the correctness and coherence of expected types between the record reader and writer (More details about this in issue #388).
Migration guide from v6.1 to v7.0
1. Job definition updates
The most notable change required by this release is regarding job definitions:
--Job job = new JobBuilder() // v6
++Job job = new JobBuilder<String, Tweet>() // v7
// define batch components
.build();Specifying input/output types is not mandatory, but not doing so will lead to a raw type usage warning.
2. RecordProcessor generic types updates
Another important change has been introduced in this release about the generic type of RecordProcessor. In v6, the generic types of RecordProcessor were the types of input/output records. In v7, generic types now represent the type of the payload of input/output records:
--public interface RecordProcessor<I extends Record, O extends Record> { // v6
-- O processRecord(I record) throws Exception;
--}
++public interface RecordProcessor<I, O> { // v7
++ Record<O> processRecord(Record<I> record) throws Exception;
++}This change has a direct impact on all interfaces extending RecordProcessor (like RecordFilter, RecordMapper, RecordMarshaller and RecordValidator) and their corresponding implementations.
3. Other API updates
Any usage of the aforementioned APIs (RecordReader, RecordWriter, Batch, etc) and their associated listeners should be updated to use generics where appropriate.
4. Deprecated APIs removal
All deprecated APIs in v6.0 and v6.1 have been removed in this major release. The suggested replacement (if any) should be found in the Javdoc of the deprecated API.
v6.1.0
This is a minor release which can be used as a drop-in replacement for v6.0.0. Here are the major changes:
New Features and enhancements
- Issue #368: Add
RetryableRecordProcessorimplementation - Issue #381: Add default methods in record reader/writer interfaces
Bug fixes
- Issue #372:
BeanPropertiesPreparedStatementProvideris failing to prepare statement if bean properties hasnullvalue
Deprecations
v6.0.0
This major release marks a new generation of the framework which is now based on Java 8. It has been an opportunity to improve the framework internals as well as some public APIs. All deprecated APIs in v5.3 and before have been removed. Some APIs have changed in a non-backward compatible way to fix a couple of minor design inconsistencies introduced in the v5 line.
The root package has been updated from org.easybatch to org.jeasy.batch for consistency with other Jeasy projects. Artifact IDs have also been changed to match the same naming pattern as other projects. Please refer to the migration guide below for more details.
As you will see in the migration guide, many APIs have been deprecated in previous versions and are now completely removed. As Antoine de Saint-Exupery said:
"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away"
I believe with this release, there is no much more to take away from Easy Batch, but this does not make it perfect! That said, I am very happy and proud to see some serious companies using it in production as well as encouraging feedback from the community. So I would like to thank all contributors who helped making this release possible! Thank you all for your time and efforts! You are awesome 👍
In addition to dependencies and documentation updates, here are the major highlights for v6.0:
New features
- Issue #261: Add support for JSON mapping with Yasson (JSON-B RI)
- Issue #311: Add support for Java 8 date/time classes
- Issue #353: Add converters for Java 8 date/time types
- Issue #361: Make
JobExecutorimplementjava.lang.AutoCloseable - Issue #363: Add batch scanning feature
- Issue #366: Add formatting option in
BeanFieldExtractor
Enhancements
- Issue #351:
FileRecordWritershould not throw an Exception at construction time - Issue #355: Remove system properties from
JobReport#toString - Issue #356: Improve job duration formatting
- Issue #357: Show job duration in the logs
- Issue #364: Add default methods in listener interfaces
Bug fixes
- Issue #352:
XmlRecordReadershould close the input stream - Issue #365: Incorrect fixed length record marshalling
New tutorials
- Reading data from a REST endpoint
- Writing a dynamic header/footer to an output file
- Skipping bad records with batch scanning on write failure
Breaking changes
- All usages of
java.io.File(namely in constructors of all file based record readers/writers) were deprecated in v5.3 and have been replaced withjava.nio.file.Pathin v6 - Quartz support was deprecated in v5.3 and has been removed in v6. The entire module
easybatch-quartzhas been removed in v6. This module used to provide two classes that act as a bridge between Easy Batch APIs and Quartz APIs. Those two classes (EasyBatchJobandEasyBatchJobFactory) can now be copied from the Quartz tutorial. - MongoDB support has been dropped (Issue #354). Please note that this decision was made after releasing v5.3, hence you will not find any
@Deprecatedannotations on classes of this module in the v5.3 release. Sorry for any inconvenience! JobListener#beforeJobStartandJobListener#afterJobEndhave been renamed toJobListener#beforeJob and JobListener#afterJob(Issue #362)- Jms reader/writer now work with a JMS
Destinationinstead ofQueueto supportTopicsas well (Issue #359) - The constructor of
JmsMessageTransformernow accepts ajavax.jms.Sessioninstead ofjavax.jms.QueueSessionto support both queue and topic sessions (Issue #360) - The
JmsRecordReadernow returnsnullbased on a timeout and not aJmsPoisonMessageanymore (becauseJmsPoisonMessagehas been removed, see "Removed APIs" section of the migration guide) - The
BlockingQueueRecordReadernow returnsnullbased on a timeout and not aPoisonRecordanymore (becausePoisonRecordhas been removed, see "Removed APIs" section of the migration guide) - All EIP related APIs (
ContentBasedBlockingQueueRecordWriter,ContentBasedBlockingQueueRecordWriterBuilder,DefaultPredicate,Predicate,RandomBlockingQueueRecordWriter,RoundRobinBlockingQueueRecordWriter) and their JMS equivalent were moved to a new extension module calledeasy-batch-integration
Migration guide from v5.3 to v6.0
Although care has been taken to document all changes in details, a thing or two could have been missed (in which case, apologies upfront).
Maven coordinates
- The group id has changed from
org.easybatchtoorg.jeasy - Artifact IDs have been updated like follows:
easybatch-core->easy-batch-core(same pattern for other artifacts)
Here is the new maven dependency for the core module:
<dependency>
<groupId>org.jeasy</groupId>
<artifactId>easy-batch-core</artifactId>
<version>6.0.0</version>
</dependency>Removed APIs
org.easybatch.xml.XmlWrapperTagWriterwas deprecated in v5.3 and has been removed in v6org.easybatch.tools.monitoring.CliJobMonitoringListener,org.easybatch.tools.reporting.HtmlJobReportFormatterandorg.easybatch.tools.reporting.JobReportEmailSenderwere deprecated in v5.3 and have been removed in v6. The entireeasybatch-toolsmodule has been removed- Quartz support was deprecated in v5.3 and has been removed in v6. The entire module
easybatch-quartzhas been removed in v6 - MongoDB support has been be removed in v6 (See issue #354). Please note that this decision has been made after releasing v5.3, hence you will not find any
@Deprecatedannotation on classes of this module in the v5.3 release. Sorry for any inconvenience! org.easybatch.jms.JmsPoisonMessage,org.easybatch.jms.JmsPoisonRecord,org.easybatch.jms.JmsPoisonRecordBroadcasterandorg.easybatch.jms.JmsPoisonRecordFilterwere deprecated in v5.3 and have been removed in v6.org.easybatch.core.record.PoisonRecord,org.easybatch.core.listener.PoisonRecordBroadcasterandorg.easybatch.core.filter.PoisonRecordFilterwere deprecated in v5.3 and have been removed in v6.- The constructor
org.jeasy.batch.core.reader.BlockingQueueRecordReader#BlockingQueueRecordReader(java.util.concurrent.BlockingQueue<org.jeasy.batch.core.record.Record>, int)has been removed in v6. Please note that this constructor was not marked with@Deprecatedin v5.3 by mistake. - The constructor
BlockingQueueRecordWriter(final List<BlockingQueue<Record>>has been be removed in v6 as this writer now operates on a single blocking queue instead of multiple queues. org.easybatch.core.listener.RecordProcessingTimeListenerwas deprecated in v5.3 and has been removed in v6org.easybatch.core.filter.RecordNumberBetweenFilter,org.easybatch.core.filter.RecordNumberEqualToFilter,org.easybatch.core.filter.RecordNumberGreaterThanFilterandorg.easybatch.core.filter.RecordNumberLowerThanFilterwere deprecated in v5.3 and have been removed in v6JobReportFormatterandDefaultJobReportFormatterwere deprecated in v5.3 and have been removed in v6- Constructors that take a delimiter and qualifier in
DelimitedRecordMarshallerandApacheCommonCsvRecordMarshallerhave been removed. Use the new setters for these parameters instead.
Replaced/Renamed/Moved APIs
org.easybatch.core.filter.FilteredRecordsSavingRecordFilterwas deprecated in v5.3 and has been removed in v6. Use the neworg.easybatch.core.filter.FilteredRecordsCollectorinsteadorg.easybatch.core.filter.StartWithStringRecordFilterwas deprecated in v5.3 and has been removed in v6. Useorg.easybatch.core.filter.StartsWithStringRecordFilterinsteadorg.easybatch.core.filter.EmptyRecordFilterwas deprecated in v5.3 and will be removed in v6. Useorg.easybatch.core.filter.EmptyStringRecordFilterinsteadorg.easybatch.core.filter.EndWithStringRecordFilterwas deprecated in v5.3 and will be removed in v6. Useorg.easybatch.core.filter.EndsWithStringRecordFilterinstead- Usages of
java.util.date(namely inHeaderclass) were deprecated in v5.3 and have been replaced withjava.time.LocalDateTimein v6 - Usages of
java.io.File(namely in constructors of all file based record readers/writers) were deprecated in v5.3 and have been replaced withjava.nio.file.Pathin v6 PayloadExtractorwas deprecated in v5.3 and has been removed in v6. UseUtils#extractPayloadsinstead- The constructor
org.jeasy.batch.extensions.yaml.YamlRecordReader#YamlRecordReader(java.io.InputStream, java.lang.String)has been replaced with one that takes ajava.nio.charset.Charsetinstead of a String for the charset name. Please note that this constructor was not marked with@Deprecatedin v5.3 by mistake. - The constructor
org.jeasy.batch.json.JsonRecordReader#JsonRecordReader(java.io.InputStream, java.lang.String)has been replaced with one that takes ajava.nio.charset.Charsetinstead of a String for the charset name. Please note that this constructor was not marked with@Deprecatedin v5.3 by mistake. org.easybatch.extensions.stream.StreamRecordReaderwas moved to the core module under `org.e...
v5.3.0
This is a minor release which is the last release of the v5.x line. Here are the major changes:
New features
- Issue #333: Add Header/Footer callbacks in
FileRecordWriter - Issue #350: Add configurable
JobReportFormatterinJobReportEmailSender
Enhancements
- Issue #315: Replace Java Util Logging with SLF4J
- Issue #320: Error Threshold - Zero Errors
- Issue #338: Inefficient
JobMetricsmerge loops inDefaultJobReportMerger - Issue #317: Unused
XMLStreamException
Bug fixes
- Issue #349: Incorrect writeCount when the transaction in
HibernateRecordWriteris rolled back - Issue #348: Incorrect writeCount when the transaction in
JpaRecordWriteris rolled back - Issue #347: Incorrect writeCount when the transaction in
JdbcRecordWriteris rolled back - Issue #314: Error while setting a date (
java.util.Date) field inJdbcRecordWriter - Issue #345:
HtmlJobReportFormattershould not generate apache velocity logs - Issue #337:
XmlRecordReaderthrows aClassCastExceptionwhen reading a comment line - Issue #319: Excel reader Skipping Empty Columns
Deprecations
For removal
org.easybatch.xml.XmlWrapperTagWriteris deprecated in v5.3 and will be removed in v6org.easybatch.tools.monitoring.CliJobMonitoringListener,org.easybatch.tools.reporting.HtmlJobReportFormatterandorg.easybatch.tools.reporting.JobReportEmailSenderare deprecated in v5.3 and will be removed in v6. The entireeasybatch-toolsmodule will be removed- Quartz support is deprecated in v5.3 and will be removed in v6. All classes in
easybatch-quartzmodule are deprecated and the entire module will be removed in v6 - MongoDB support will be removed in v6. Please note that this decision has been made after releasing v5.3, hence you will not find any
@Deprecatedannotation on classes of this module in the v5.3 release. org.easybatch.jms.JmsPoisonMessage,org.easybatch.jms.JmsPoisonRecord,org.easybatch.jms.JmsPoisonRecordBroadcasterandorg.easybatch.jms.JmsPoisonRecordFilterare deprecated in v5.3 and will be removed in v6. TheJmsRecordReaderwill returnnullbased on a timeout and not aJmsPoisonMessage.org.easybatch.core.record.PoisonRecord,org.easybatch.core.listener.PoisonRecordBroadcasterandorg.easybatch.core.filter.PoisonRecordFilterare deprecated in v5.3 and will be removed in v6. Theorg.jeasy.batch.core.reader.BlockingQueueRecordReaderwill returnnullbased on a timeout and not aPoisonRecord- The constructor
org.jeasy.batch.core.reader.BlockingQueueRecordReader#BlockingQueueRecordReader(java.util.concurrent.BlockingQueue<org.jeasy.batch.core.record.Record>, int)will be removed in v6. Please note that this constructor was not marked with@Deprecatedin v5.3 by mistake. - The constructor
BlockingQueueRecordWriter(final List<BlockingQueue<Record>>will be removed in v6 as this writer will operate on a single blocking queue. org.easybatch.core.listener.RecordProcessingTimeListeneris deprecated in v5.3 and will be removed in v6org.easybatch.core.filter.RecordNumberBetweenFilter,org.easybatch.core.filter.RecordNumberEqualToFilter,org.easybatch.core.filter.RecordNumberGreaterThanFilterandorg.easybatch.core.filter.RecordNumberLowerThanFilterare deprecated in v5.3 and will be removed in v6JobReportFormatterandDefaultJobReportFormatterare deprecated in v5.3 and will be removed in v6
With replacement
org.easybatch.core.filter.FilteredRecordsSavingRecordFilteris deprecated in v5.3 and will be removed in v6. Use the neworg.easybatch.core.filter.FilteredRecordsCollectorinsteadorg.easybatch.core.filter.StartWithStringRecordFilteris deprecated in v5.3 and will be removed in v6. Useorg.easybatch.core.filter.StartsWithStringRecordFilterinsteadorg.easybatch.core.filter.EmptyRecordFilteris deprecated in v5.3 and will be removed in v6. Useorg.easybatch.core.filter.EmptyStringRecordFilterinsteadorg.easybatch.core.filter.EndWithStringRecordFilteris deprecated in v5.3 and will be removed in v6. Useorg.easybatch.core.filter.EndsWithStringRecordFilterinstead- Usages of
java.util.date(namely inHeaderclass) are deprecated and will be replaced withjava.time.LocalDateTimestarting from v6 - Usages of
java.io.File(namely in constrcutors of all file based record readers/writers) are deprecated and will be replaced withjava.nio.file.Pathstarting from v6 PayloadExtractoris deprecated in v5.3 and will be removed in v6. UseUtils#extractPayloadsinstead- The constructor
org.jeasy.batch.extensions.yaml.YamlRecordReader#YamlRecordReader(java.io.InputStream, java.lang.String)will be replaced with one that takes ajava.nio.charset.Charsetinstead of a String for the charset name. Please note that this constructor was not marked with@Deprecatedin v5.3 by mistake. - The constructor
org.jeasy.batch.json.JsonRecordReader#JsonRecordReader(java.io.InputStream, java.lang.String)will be replaced with one that takes ajava.nio.charset.Charsetinstead of a String for the charset name. Please note that this constructor was not marked with@Deprecatedin v5.3 by mistake.
For more details about deprecations and replacements, please refer to the Javadocs.
What's next?
The next version will be v6 and will be based on Java 8. The root package name will be updated from org.easybatch to org.jeasy.batch for consistency with other Jeasy projects. Artifact IDs will also change to match the same naming pattern as other projects.
I would like to thank all contributors (@anarayn, @MALPI , @jcamiloradamesa , @IvanAtanasov, @sheikhu, @vian42, @verdi8 and @psoares-resilient) for submitting bug reports, testing fixes and contributing to the project with awesome PRs!
v5.2.0
This is the second maintenance release of the v5.x line. It brings some features and bug fixes:
Features
- issue #280 : Invert
PipelineListenercall order - issue #283 : Add OSGi headers to manifest
- issue #303 : Add
FilteredRecordsSavingRecordFilter
Bug fixes
- issue #291 :
XmlRecordReaderdoes not escapegtandlt - issue #292 :
XmlRecordReaderdoes not callgetLocalPart()onQName - issue #293 :
DefaultJobReportFormatter.formatReportduration rolls over after 24 Hours - issue #296 :
FilteredCountmetric should be renamed toFilterCount
Enhancements
- issue #301 : Add getters for
fileandcharsetinAbstractFileRecordReader - issue #304 :
otherwisemethod in content based queue record writer builders should be optional
API deprecation
The following methods are deprecated due to renaming FilteredCount to FilterCount in issue #296:
- Method
org.easybatch.core.job.JobMetrics#getFilteredCount - Method
org.easybatch.core.job.JobMetrics#incrementFilteredCount - Method
org.easybatch.core.job.JobMonitor#getFilteredCount - Method
org.easybatch.core.job.JobMonitorMBean#getFilteredCount
These methods will be removed in v5.3.
I would like to thank @DanieleS82, @ipropper and @tobias-- for their time and effort to make this release happen!
v5.1.0
This is minor release adding some new features and bug fixes. Here are the most important changes:
New features
- issue #92 : Add email sending job listener
- issue #121 : Add support for univocity-parsers
- issue #122 : Add support for Yaml format
- issue #254 : Add
MultiFileRecordReader - issue #255 : Add
XmlFileRecordReader - issue #256 : Add
JsonFileRecordReader - issue #260 : Add parameter to control how quartz should act when certain job is delayed for a long time
- issue #269 : Add encoding parameter in
XmlRecordReader - issue #270 : Add encoding parameter in
JsonRecordReader - issue #278 : Add the ability to interrupt a running job
- issue #279 : Add the ability to wait for jobs to terminate
Bug fixes
- issue #266 : Incorrect data source name in text file records
- issue #267 : Incorrect data source name in
JmsRecordheader - issue #268 : System properties absent from
JobReport - issue #276 : PreProcessed records are ignored
- issue #277 : XmlRecordReader should not escape special characters in tag's body
Enhancements
- issue #271 : Improve performance of the
JdbcRecordReader - issue #263 :
JsonFileRecordReadershould not throw aFileNotFoundExceptionat construction time - issue #264 :
XmlFileRecordReadershould not throw aFileNotFoundExceptionat construction time - issue #178 : Improve the
QueueRecordWriterbuilders to guide the user through predicate/queue mapping
Deprecations
- issue #265 :
XmlFileRecordReaderconstructor parameters should be swapped - issue #274 : Deprecate
JmsQueueSessionListener - issue #275 : Deprecate
JmsQueueConnectionListener
Many thanks to all contributors for reporting bugs and testing fixes.
A special thank to @AussieGuy0 for adding support for uniVocity parsers!
v4.2.1
v5.0.0
The main theme of this new major release is less is more ❗ With this new version, Easy Batch has never been easier! Many APIs have been simplified and improved for more consistency and ease of use. Some APIs have been removed in order for you to do less work and delegate more to the framework 😄
After one year of active development, version 5.0.0 is finally here. This would not have been possible without the amazing open source community !! Many thanks to all contributors who suggested features, filed bugs and reported inconsistencies. I'm really grateful and thankful to all of you!
Version 5 is not 100% backward compatible with version 4. It introduces fundamental changes in the core framework in order to fix some inconsistent APIs. The processing workflow has been modified to improve performance.
This is the final release of v5.0 after many snapshot versions and 2 release candidates. Please find below the complete change log and a migration guide to help you move from v4 to v5.
Major changes
- issue #211 : Inconsistent Batch API
- issue #233 : Inconsistent RecordReader API
- issue #223 : Inconsistent RecordWriter API
- issue #227 : Inconsistent RecordDispatcher API
- issue #221 : Resource management should be handled by the framework
- issue #222 : Transaction management should be handled by the framework
- issue #230 : JobExecutor should use an ExecutorService
- issue #220 : Adapt listeners to batch processing workflow
New features
- issue #253 : Add MongoDBRecordMarshaller
- issue #251 : Add support for custom metrics
- issue #250 : Add java 8 stream support
- issue #248 : Add onConnectionOpened method in JobMonitoringListener
- issue #243 : add OpenCsvRecordMarshaller
- issue #242 : add XmlRecordValidator
- issue #241 : add option to activate/deactivate recursivity in FileRecordReader
- issue #224 : Add
RetryableRecordReader - issue #225 : Add
RetryableRecordWriter - issue #226 : Add
CompositeRecordWriter
Bug fixes
- issue #247 : onConnectionClosed in JobMonitoringListener is inconsistent
- issue #238 : FlatFileRecordReader should not throw a FileNotFoundException at construction time
- issue #170 : Unable to determine number of filtered record from batch
- issue #204 : Unnecessary generic type in
BeanValidationRecordValidator - issue #209 : Unnecessary generic type in
BlockingQueueRecordReader/BlockingQueueRecordWriter - issue #228 : Job executionId is not coherent
- issue #229 : Job name is not a parameter
- issue #231 :
JobStatus.ABORTEDis redundant - issue #232 : Possible resource leak in
XmlWrapperTagWriter
Enhancements and API changes
- issue #252 : MongoDBRecordWriter should use bulk writes
- issue #249 : Update example in maven quick start archetype
- issue #236 : add constructor with java.nio.file.Path in FileRecordReader
- issue #239 : add constructor with java.nio.file.Path in FileRecordWriter
- issue #240 : add constructor with java.nio.file.Path in FlatFileRecordReader
- issue #244 : ApacheCommonCsvRecord is redundant
- issue #245 : ApacheCommonCsvRecordReader is redundant
- issue #246 : ApacheCommonCsvRecordMapper should be configurable with field names
- issue #234 :
RecordFieldExtractoris poorly named - issue #235 :
BeanRecordFieldExtractoris poorly named
Migration guide
JobBuilder
Methods deprecated in v4.2 have been removed in v5:
JobBuilder#skip(long)JobBuilder#limit(long)JobBuilder#timeout(long)andJobBuilder#timeout(long, TimeUnit)JobBuilder#silentMode(boolean)JobBuilder#strictMode(boolean)JobBuilder#jmxMode(boolean)JobBuilder#call()
The keepAlive parameter has been removed since resource handling is now done by the framework ( issue #221 ). Hence the following methods have been removed from JobBuilder:
JobBuilder#reader(RecordReader recordReader, boolean keepAlive)JobBuilder#reader(RecordReader recordReader, boolean keepAlive, RetryPolicy retryPolicy)
The "Retry Read" feature is now done with a decorator of RecordReader (issue #224 ). Hence the method JobBuilder#reader(RecordReader recordReader, RetryPolicy retryPolicy) has been removed
The RecordDispatcher API has been removed. Hence, the method JobBuilder#dispatcher(RecordDispatcher recordDispatcher) has been removed
JobExecutor
- The method
org.easybatch.core.job.JobExecutor.executeis no more static, you need to create aJobExecutorinstance to execute jobs - Job executors must be shutdown explicitly
Resource handling & transaction management
- The constructors of
JdbcRecordReader/JdbcRecordWriternow take a JDBCDataSourceas argument instead of aConnectionand theJdbcConnectionListener/JdbcTransactionListenerhave been removed - The constructors of
JpaRecordReader/JpaRecordWriternow take aEntityManagerFactoryas argument instead of aEntityManagerand theJpaEntityManagerListener/JpaTransactionListenerhave been removed - The constructors of
HibernateRecordReader/HibernateRecordWriternow take aSessionFactoryas argument instead of aSessionand theHibernateSessionListener/HibernateTransactionListenerhave been removed
Moved APIs
org.easybatch.core.dispatcher.Predicatehas moved toorg.easybatch.core.writer.Predicateorg.easybatch.core.dispatcher.DefaultPredicatehas moved toorg.easybatch.core.writer.DefaultPredicateorg.easybatch.core.dispatcher.PoisonRecordBroadcasterhas moved toorg.easybatch.core.listener.PoisonRecordBroadcaster
Removed APIs
The Batch class is no more a Record. Instead, it now contains a list of records. Hence, all interfaces and implementations related to the previous inconsistent Batch API have been removed: BatchReader, BatchFilter, BatchMapper, BatchProcessor, BatchMarshaller, BatchValidator and BatchWriter.
The "record dispatcher" concept has been removed. All dispatchers have been transformed into writers:
BroadcastRecordDispatcher->BlockingQueueRecordWriterContentBasedRecordDispatcher->ContentBasedBlockingQueueRecordWriterContentBasedRecordDispatcherBuilder->ContentBasedBlockingQueueRecordWriterBuilderRoundRobinRecordDispatcher->RoundRobinBlockingQueueRecordWriterRandomRecordDispatcher->RandomBlockingQueueRecordWriterBroadcastJmsRecordDispatcher->BroadcastJmsQueueRecordWriterContentBasedJmsRecordDispatcher->ContentBasedJmsQueueRecordWriterContentBasedJmsRecordDispatcherBuilder->ContentBasedJmsQueueRecordWriterBuilderRandomJmsRecordDispatcher->RandomJmsQueueRecordWriterRoundRobinJmsRecordDispatcher->RoundRobinJmsQueueRecordWriter
Exception handling have been simplified, the following exceptions have been removed:
org.easybatch.core.reader.RecordReaderOpeningExceptionorg.easybatch.core.reader.RecordReaderClosingExceptionorg.easybatch.core.reader.RecordReadingExceptionorg.easybatch.core.processor.RecordProcessingExceptionorg.easybatch.core.dispatcher.RecordDispatchingExceptionorg.easybatch.core.field.RecordFieldExtractionExceptionorg.easybatch.core.mapper.RecordMappingExceptionorg.easybatch.core.marshaller.RecordMarshallingExceptionorg.easybatch.core.validator.RecordValidationExceptionorg.easybatch.core.writer.RecordWritingException
ApacheCommonCsvRecord was removed. This is redundant with StringRecord.
ApacheCommonCsvRecordReader was removed. This is redundant with FlatFileRecordReader.
Other changes
org.easybatch.core.processor.ComputationalRecordProcessordeprecated in v4.2 has been removedJobResultdeprecated in v4.2 has been removed fromJobReport, this is related to the removal ofComputationalRecordProcessor- All constructors in
XmlWrapperTagWriternow take aFileinstead ofFileWriter, this is due to a resource leak BeanValidationRecordValidatoris no more parametrized typePredicateis no more a parametrized typeBlockingQueueRecordReaderis no more a parametrized typeBlockingQueueRecordWriteris no more a parametrized typeRecordFieldExtractorinterface has been renamed toFieldExtractorBeanRecordFieldExtractorclass has been renamed toBeanFieldExtractor