This commit changes the name of the overloaded
setter for isolationLevelForCreate to remove
ambiguity in setter selection by Spring Framework.
Resolves#4213
setCommand now supports passing in an array of strings. When a single
string is supplied, it is tokenized by the Runtime#exec method. When an
array of strings is supplied, the array is supplied as is to the
Runtime#exec method in which case no tokenization takes place.
Resolves#752
Persisting a LocalDateTime as a Timestamp with `Timestamp.valueOf(LocalDateTime)`
and retrieving it with `ResultSet#getObject(index, LocalDateTime.class)` seems
to result in a data loss at the millisecond fraction level.
This commit changes the usage of `ResultSet#getObject(index, LocalDateTime.class)`
to `ResultSet#getTimestamp(index).toLocalDateTime()`.
A round trip to the database with `Timestamp.valueOf(LocalDateTime)` and
`Timestamp.toLocalDateTime()` should not result in a data loss.
This commit changes the type of fields `startTime`, `endTime`,
`createTime` and `lastUpdated` in `JobExecution` and `StepExecution`
from `java.util.Date` to `java.time.LocalDateTime`.
Resolves#1014
This commit changes the default execution context serializer to
DefaultExecutionContextSerializer, which makes Jackson an optional
dependency.
Resolves#4140
The support to use any type as a job parameter was added
in #3960.
This commit introduces convenience methods where appropriate
to use Java 8 Date/Time APIs as job parameters.
Resolves#1035
Before this commit, the transaction attributes were hardcoded and not
configurable in the proxy created by Job explorer/repository/operator
factory beans.
This commit adds the possibility to customize the transaction attributes
in addition to the transaction manager. It is now possible to configure
the transaction's isolation level as well as its propagation for each
method if needed.
Resolves#4195
This commit adds support to configure and create a transactional
proxy around SimpleJobOperator through a factory bean.
The usage of `@Transactional` was removed in favor of
the programmatic way of customizing the proxy through
the factory bean.
Resolves#1078
Before this commit, the configuration of infrastructure beans
was confusing and not straightforward to customize. This commit
changes the way Batch infrastructure beans are configured.
The most important changes are:
* EnableBatchProcessing now provides new attributes to
configure properties of infrastructure beans
* Bean registration is now done programmatically with a
BeanDefinitionRegistrar instead of importing a class with
statically annotated bean definition methods
* Bean are now resolved from the application context directly
instead of being resolved from a BatchConfigurer
* Both a data source and a transaction manager are now
required to be defined in the application context
* A new configuration class called DefaultBatchConfiguration
with default infrastructure bean definitions is now provided
and can be extended to customize the default configuration
Resolves#3942
Before this commit, the user had to manually set the job repository and transaction
manager on `JobBuilder` and `StepBuilder` instances with a chained call to
`.repository(jobRepository)` and `.transactionManager(transactionManager)`.
This is error prone and can lead to runtime errors if these properties are not set.
This commit introduces new APIs to guide the user to set these properties at
builder creation time.
Resolves#4192
Before this commit, the transaction manager was configurable
by implementing `BatchConfigurer#getTransactionManager`.
The transaction manager being an implementation detail of the
`JobRepository`, it should not be configurable at the same level
as the `JobRepository` (ie in the same interface).
This commit removes the method `getTransactionManager` from
the `BatchConfigurer` interface. If needed, a custom transaction
manager could be supplied by implementing `getJobRepository`,
or via the constructor of `DefaultBatchConfigurer`.
Resolves https://github.com/spring-projects/spring-batch/issues/4191