List of usage examples for org.springframework.batch.core.repository.dao XStreamExecutionContextStringSerializer XStreamExecutionContextStringSerializer
XStreamExecutionContextStringSerializer
From source file:io.spring.batch.xstream.SerializationTest.java
@Test public void testDeserialization() throws Exception { XStreamExecutionContextStringSerializer serializer = new XStreamExecutionContextStringSerializer(); serializer.afterPropertiesSet();//from w w w. j av a 2 s. com serializer .deserialize(new ByteArrayInputStream(EXAMPLE_EXECUTION_CONTEXT.getBytes(StandardCharsets.UTF_8))); }
From source file:org.trpr.platform.batch.impl.spring.admin.repository.MapExecutionContextDao.java
public MapExecutionContextDao() throws Exception { serializer = new XStreamExecutionContextStringSerializer(); ((XStreamExecutionContextStringSerializer) serializer).afterPropertiesSet(); }
From source file:admin.service.SimpleJobServiceFactoryBean.java
public void afterPropertiesSet() throws Exception { Assert.notNull(dataSource, "DataSource must not be null."); Assert.notNull(jobRepository, "JobRepository must not be null."); Assert.notNull(jobLocator, "JobLocator must not be null."); Assert.notNull(jobLauncher, "JobLauncher must not be null."); jdbcTemplate = new JdbcTemplate(dataSource); if (incrementerFactory == null) { incrementerFactory = new DefaultDataFieldMaxValueIncrementerFactory(dataSource); }/*from w w w . j av a 2s. c o m*/ if (databaseType == null) { databaseType = DatabaseType.fromMetaData(dataSource).name(); logger.info("No database type set, using meta data indicating: " + databaseType); } if (lobHandler == null) { lobHandler = new DefaultLobHandler(); } if (serializer == null) { XStreamExecutionContextStringSerializer defaultSerializer = new XStreamExecutionContextStringSerializer(); defaultSerializer.afterPropertiesSet(); serializer = defaultSerializer; } Assert.isTrue(incrementerFactory.isSupportedIncrementerType(databaseType), "'" + databaseType + "' is an unsupported database type. The supported database types are " + StringUtils.arrayToCommaDelimitedString(incrementerFactory.getSupportedIncrementerTypes())); }