Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSR352 Support - more setup details needed [BATCH-2234] #1363

Closed
spring-issuemaster opened this issue May 15, 2014 · 3 comments
Closed

JSR352 Support - more setup details needed [BATCH-2234] #1363

spring-issuemaster opened this issue May 15, 2014 · 3 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented May 15, 2014

Michael Pralow opened BATCH-2234 and commented

http://docs.spring.io/spring-batch/trunk/reference/html/jsr-352.html needs some more information regarding necessary setup information and hard to grasp side effects

  1. JsrJobOperator needs HSQLDB in classpath to work

Without HSQLDB you get a rather user-unfriendly "java.util.ServiceConfigurationError: javax.batch.operations.JobOperator: Provider org.springframework.batch.core.jsr.launch.JsrJobOperator could not be instantiated". Analyzing the stack trace and some debugging helps, but should'nt be needed.

  1. i would like to see some information about the possibility of providing an own baseContext for the JsrJobOperator

I tried it with an own beanRefContext.xml primary="true", so far i get a nice

org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition INFO Overriding bean definition for bean 'baseContext': replacing [Generic bean: class [org.springframework.context.support.GenericXmlApplicationContext]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=true; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [file:.../target/classes/beanRefContext.xml]] with [Generic bean: class [org.springframework.context.support.GenericXmlApplicationContext]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file.../org/springframework/batch/spring-batch-core/3.0.0.RC1/spring-batch-core-3.0.0.RC1.jar!/beanRefContext.xml]]


Affects: 3.0.0

Referenced from: commits bb048f3

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 15, 2014

Michael Minella commented

A couple notes:

  1. JsrJobOperator shouldn't need HSQLDB on the class path to work if you provide your own DataSource configuration. It just defaults to HSQLDB if none is provided. We can update the documentation to specify that.
  2. What is the use case you're trying to work with to provide your own base context? I don't consider the baseContext to be part of the "public" API in that it configures elements that are required to support the JSR implementation. If you are looking to deviate from what the JSR prescribes, you'll be better served to use "traditional" Spring Batch configuration.
@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 15, 2014

Michael Pralow commented

  1. that's ok for me, but i am not quite sure the datasource hint would be enough, it looks like batch.data.source.init=true needs to be overwritten too

  2. just a matter of personal preferences for resourceless configurations, so the reason is ok for me too
    After some more thinking i can imagine at least the usecase for setting an individual table-prefix when using an own datasource.

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented May 16, 2014

Michael Minella commented

Documentation has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.