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

Weld5 needs Priority annotation on Interceptor #155

Closed
wants to merge 1 commit into from
Closed

Weld5 needs Priority annotation on Interceptor #155

wants to merge 1 commit into from

Conversation

shadogray
Copy link
Contributor

Interceptor is not visible for DeltaSpikeProxyInterceptorLookup, so Interceptor detection will fail.
By Priority annotation the visibility is elevated to application.

Further cleanup of legacy Weld-2.0 specific handling.

MyRepository myRepository = BeanProvider.getContextualReference(MyRepository.class);

List<String> users = myRepository.getAllUsers();

Assert.assertNotNull(users);
Assert.assertEquals(3, users.size());

Assert.assertSame(users, myRepository.getAllUsers());
Assert.assertEquals(users, myRepository.getAllUsers());
Copy link
Member

Choose a reason for hiding this comment

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

IMO assertSame is by design here as the result is cached - it needs to be the same object instance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on Wildfly-managed it is not, as it seems - or else no fail.
IMHO it is up to the container to serialize/deserialize request/response objects down the interceptor chain - whatever it may be.
Iff this poses a problem, I could try to identify where this - evident? - ser/deser happens to better understand what to do.
Another possibilty would be to check for "jboss.server.name" SysProp here to capture the case.
Any decision welcome!

Copy link
Member

Choose a reason for hiding this comment

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

There is no serialization here
The interceptor caches the method return value
If it doesnt, its still broken for weld
Therefore the exclude propably

Copy link
Member

Choose a reason for hiding this comment

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

Is it also broken with deltaspike.bean-manager.delegate_lookup?

@tandraschko
Copy link
Member

i updated the weld excludes, they are still valid
i will close this for now and it wildfly-build-managed should work fine now actually

thanks for your hard work on debugging all this!

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