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

Fix for #340 - JNDI lookup returns object or throws exception #341

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

dmatej
Copy link
Contributor

@dmatej dmatej commented Nov 8, 2022

  • Both usages in Soteria require an object, null results in exceptions
  • BeanManager can have two possible JNDI names, we don't care which, we need an instance.
  • The lookup now allows to provide a list contexts which are processed in order.
  • IllegalStateException was replaced by NamingException. It's message simply reports used unsuccessful names.
  • BeanManager is used in functions etc, so the exception may be wrapped by IllegalStateException again. Null cannot be provided (old impl then resulted in NullpointerException).
  • DataSource can still result in the same exception if it is not available, but new impl simplified the code.

Signed-off-by: David Matějček david.matejcek@omnifish.ee

…tion

- Both usages in Soteria require an object, null results in exceptions
- BeanManager can have two possible JNDI names, we don't care which, we need
  an instance.
- The lookup now allows to provide a list contexts which are processed in order.
- IllegalStateException was replaced by NamingException. It's message simply
  reports used unsuccessful names.
- BeanManager is used in functions etc, so the exception may be wrapped by
  IllegalStateException again. Null cannot be provided (old impl then resulted
  in NullpointerException).
- DataSource can still result in the same exception if it is not available, but
  new impl simplified the code.

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
Copy link
Contributor

@arjantijms arjantijms left a comment

Choose a reason for hiding this comment

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

lgtm!

@arjantijms arjantijms merged commit 64ce56d into eclipse-ee4j:master Nov 8, 2022
@dmatej dmatej deleted the beanManager branch November 8, 2022 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants