8000 Use @Transactional when handling JPA ticket/service ops by mmoayyed · Pull Request #1825 · apereo/cas · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use @Transactional when handling JPA ticket/service ops #1825

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

Merged
merged 11 commits into from
Jun 6, 2016
Merged

Use @Transactional when handling JPA ticket/service ops #1825

merged 11 commits into from
Jun 6, 2016

Conversation

@mmoayyed
Copy link
Member Author
mmoayyed commented Jun 6, 2016

This is also relevant for #1772

@NotNull
@Autowired
@Qualifier("authenticationManager")
@Resource(name="authenticationManager")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note on the unrelated work I'm doing on another - I do the opposite i.e. replacing the use of @Resource with @Autowired @Qualifier combination to be consistent throughout our config infrastructure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that done just for consistency? One-liner @resource tags seems easier to read me, no? (I also do know @Autowired does not work with generic collections, though 4.3 will likely fix that)

Copy link
Contributor
@dima767 dima767 Jun 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency and also @Resource did not work for me in some scenarios (don't remember which. Could be constructor injection, etc.). In general @Autowired is more powerful and leverages the full power of Spring, etc. Let's pick an autowiring injection style and stick to it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I'll swich over.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, +1 on the change from me.

@mmoayyed mmoayyed merged commit 8ecb708 into apereo:4.2.x Jun 6, 2016
@mmoayyed mmoayyed deleted the jpa-ticket-reg-transaction branch June 6, 2016 20:10
mmoayyed pushed a commit that referenced this pull request Sep 19, 2016
* moved onto transactional annotations with JPA ticket registry

* moved onto transactional annotations with JPA svc registry

* moved onto transactional annotations with JPA svc registry

* moved onto transactional annotations with JPA svc registry

* moved onto transactional annotations with JPA svc registry

* moved onto transactional annotations with JPA svc registry

* moved onto transactional annotations with JPA svc registry

* fixed version number

* moved onto transactional annotations with JPA svc registry

* Fixed test cases; reverted to autowired

* Fixed test cases; reverted to autowired
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0