final String name = PathAddress.pathAddress(operation.get(OP_ADDR)).getLastElement().getValue();
int refreshInterval = DatabaseDataStoreResourceDefinition.REFRESH_INTERVAL.resolveModelAttribute(context, model).asInt();
boolean allowExecution = DatabaseDataStoreResourceDefinition.ALLOW_EXECUTION.resolveModelAttribute(context, model).asBoolean();
final DatabaseTimerPersistence databaseTimerPersistence = new DatabaseTimerPersistence(name, database, partition, refreshInterval, allowExecution);
final ServiceName serviceName = TimerPersistence.SERVICE_NAME.append(name);
final ServiceBuilder<DatabaseTimerPersistence> builder = context.getServiceTarget().addService(serviceName, databaseTimerPersistence);
if (verificationHandler != null) {
builder.addListener(verificationHandler);
}
return builder
.addDependency(Services.JBOSS_SERVICE_MODULE_LOADER, ModuleLoader.class, databaseTimerPersistence.getModuleLoader())
.addDependency(ContextNames.bindInfoFor(jndiName).getBinderServiceName(), ManagedReferenceFactory.class, databaseTimerPersistence.getDataSourceInjectedValue())
.addDependency(TimerServiceDeploymentProcessor.TIMER_SERVICE_NAME, java.util.Timer.class, databaseTimerPersistence.getTimerInjectedValue())
.install();
}