-
Notifications
You must be signed in to change notification settings - Fork 12
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
Issue: Injection on EJB interceptors is not working #3 #10
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clean-ups the requested deployment validation in #5 by @carlosbarragan. Details: - Validating correct dependency configuration in the deployment process. - Refactored observed methodes in BeanTestExtension - Disabled TestInvalidInjectionPointConfiguration. The test case contains the reason. - Updated snapshot version - various cleanups
This commit fixes the injection failure in @ejb Interceptors. Details: - implemented an approach based on an @InterceptorBinding. The solution replaces @interceptors() in processed beans with an global interceptor wrapper/proxy. The wrapper delegates the InvocationContext to the modified InterceptorBinding. - implemented a cache optimization regarding the modification of Interceptor bindings in @ejb Interceptors. - implemented several test cases: Created Sample EJB together with a basic @AroundInvoke Interceptor to verify the NPE in the Interceptor proposed by @agori. - Fixed Debug log in EntityManagerProducer - Processing @interceptors annotation and replacing with altered InterceptionBindings. - Saving altered InterceptorBindings in GlobalInterceptorImpl
…t with the help of InterceptorWrapper (global interceptor) BeanTesting already supports correct transaction propagation in EJB interceptors. The transaction will be shared among invoked interceptor instances. Details: - the patch for issue #3 includes a modification of InterceptorWrapperImpl. During the verification of the proposed bug by @agori (see issue #4), I observed in TestEJBInterceptedByMultipleInterceptors a ClassCastException: occurs if an intercepted @ejb returns a value in a business method. The reason behind it was that InterceptorWrapperImpl didn´t returned results from invoked interceptor instances but rather the origin InvocationContext. - resolution of issue #4: the created test case (TestEJBInterceptedByMultipleInterceptors) demonstrates that EJB interceptors (Interceptor1SharingTransaction and Interceptor2SharingTransaction) are using an active transaction.
The last commit provides a resolution for issue #4 |
Great idea -> I´ll refactor it to a distinct Extension. Just a mom plz.^^ |
…ionality in seperate CDI Extensions This commit provides a spreading of the former BeanTestExtension in seperate CDI Extensions. Namely: BaseExtension, EJBExtension and InterceptorExtension. Further this commit contains various cleanups. Details: * Introduced Base class for CDI Extensions * Created distinct CDI Extensions and registered in the javax.enterprise.inject.spi.Extension file * Removed redundant type parameter from methods * Pulled up various common methods in BaseExtension * Updated Javadocs
Done 😉 |
carlosbarragan
force-pushed
the
master
branch
from
November 7, 2014 10:56
2fae656
to
a15891d
Compare
|
Since the commit history must be changed. I will close this pull request. Please open a new one with the changes mentioned in the last comment. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit fixes the injection failure in @ejb Interceptors. See issue #3.
verify the NPE in EJB Interceptors proposed by @agori.