Issue Details (XML | Word | Printable)

Key: BATCH-723
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robert Kasanicky
Reporter: david varnes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Batch

tablePrefix property is not injected into JbdcExecutionContextDao

Created: 13/Jul/08 09:54 PM   Updated: 07/Aug/08 10:07 AM
Component/s: Core
Affects Version/s: 1.1.0
Fix Version/s: 1.1.0

Time Tracking:
Original Estimate: 0.12d
Original Estimate - 0.12d
Remaining Estimate: 0d
Time Spent - 0.12d
Time Spent: 0.12d
Time Spent - 0.12d

File Attachments: 1. Text File inject-table-prefix-ecDao.patch (2 kB)

Environment: 1.1.-DEV-SNAPSHOT as at Mon 14.July.08
Issue Links:
Related
 


 Description  « Hide
When using an alternate table prefix in the batch repository schema and
setting this property on the JobRepositoryFactoryBean, the setting is properly injected into the three primary daos
( JdbcJobInstanceDao, JdbcJobExecutionDao, JdbcStepExecutionDao ).

However the setting is not injected into the JdbcExecutionContextDao, resulting in an inconsistent table naming prefix strategy in the batch schema.

It appears to me that the JdbcJobExecutionDao and JdbcStepExecutionDao each create an instance of the JdbcExecutionContextDao, referred to as "ecDao", and should inject the tablePrefix.

They already set some properties of the "ecDao" in their afterPropertiesSet() .. but seems they neglect to inject the tablePrefix as well.

Should be a simple one line fix in each dao?



 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
david varnes added a comment - 13/Jul/08 10:22 PM
The attached simple patch works.

It is actually three lines :-) ,but the third one may be the one you don't like:
Making tablePrefix protected in the abstract dao? Otherwise create a public getter ... your call.

thanks for a great product
davidv

ps: You might want to correct the typos in the issue title.

Dave Syer added a comment - 14/Jul/08 02:35 AM - edited
I think the snapshots haven't been publishing properly (problem in the CI server). If you look in SVN you should find that this is already fixed.

Robert Kasanicky added a comment - 14/Jul/08 02:40 AM - edited
Actually I just commited the fix (the table prefix really wasn't being set) + created follow up issue for 2.0 BATCH-724. For now I just tried running the sample jobs manually with custom prefix and it worked fine.

david varnes added a comment - 14/Jul/08 03:44 AM
Thanks for applying so fast Robert .. updated code working for me.

@Dave .. I made the patch against svn .. I think Robert just committed before you looked :-)

thanks again guys
davidv

Dave Syer added a comment - 07/Aug/08 10:07 AM
Assume closed as resolved and released