8000 Add warning to InMemory Service Registry by mmoayyed · Pull Request #750 · apereo/cas · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add warning to InMemory Service Registry #750

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 4 commits into from
Nov 13, 2014
Merged

Add warning to InMemory Service Registry #750

merged 4 commits into from
Nov 13, 2014

Conversation

mmoayyed
Copy link
Member

Partially addresses: https://github.com/Jasig/cas/issues/548

This pull adds a warning to the InMemory Service Registry to note/stress the InMemory nature of the persistence backend. This is to allow CAS adopters to better understand that changed made at runtime will be lost upon container restarts.

Also added some test cases for the class.

@mmoayyed mmoayyed added this to the 4.1 milestone Nov 11, 2014
* Instantiates a new In memory service registry.
*/
public InMemoryServiceRegistryDaoImpl() {
LOGGER.warn("[{}] is designed to retrieve and persist service definitions in memory. Changes that are made to service definitions during runtime "
Copy link
Contributor

Choose a reason for hiding this comment

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

Class name seems redundant since most loggers already output the class name.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is also fixed of course.

@mmoayyed
Copy link
Member Author

Pull is updated to address feedback.

/**
* This is test cases for {@link org.jasig.cas.services.InMemoryServiceRegistryDaoImpl}.
*
* @author Misagh Moayyed mmoayyed@unicon.net
Copy link
Contributor

Choose a reason for hiding this comment

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

@since ?

@leleuj
Copy link
Contributor
leleuj commented Nov 13, 2014

Why not?

+1

public class InMemoryServiceRegistryDaoImplTests {

@Test
public void testSave() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I find the usage of "test" to be redundantly annoying but not enough to care. We may want to declare one way or the other in our standards if we haven't. (we probably have a mix now)

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a fine idea. I have got some CS and FindBugs items planned ahead. I'll account for this as well in the standards. Would be a lot of noise to get this fixed as you noted, we have a mix right now but consistency one way or another would be even better.

@battags
Copy link
Contributor
battags commented Nov 13, 2014

+1

mmoayyed pushed a commit that referenced this pull request Nov 13, 2014
Add warning to InMemory Service Registry
@mmoayyed mmoayyed merged commit 0308572 into apereo:master Nov 13, 2014
@mmoayyed mmoayyed deleted the inmemory-svcreg-warn branch November 13, 2014 23:37
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.

4 participants
0