History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-18320
Type: New Feature New Feature
Status: Open Open
Assignee: Sergey Vasiliev
Reporter: Stephen Friedrich
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Seam: Inspection/intention to annotate simple accessors with @BypassInterceptors

Created: 04 Jun 08 18:35   Updated: 19 Jun 08 00:46
Component/s: J2EE.Seam

Build: 8,431


 Description  « Hide
I am currently profiling my application and notice that a lot of time is spent by Seam doing bijection for calls to simple setters and getters for (not bijected) fields.
This of course is unnecessary and Seam includes the @BypassInterceptors annotation to prevent this.

I would be really nice if there were an inspection that said "Simple getter/setter can be annotated with "@BypassInterceptors".

OTOH hand it would be fantastic if IDEA could warn that a method annotated with @BypassIntereptors uses any feature that works only with Seam's interception in place, but that's a much harder problem.



 All   Comments   Work Log   Change History      Sort Order:
Stephen Friedrich - 04 Jun 08 19:24
Stop press!
That simple logic does not work - I'll try to research what the exact conditions are to allow @BypassInterceptors.

Stephen Friedrich - 19 Jun 08 00:46
That was a nice idea and even a seam developer said it should be ok.
However it is not ok, if the component has conversation scope and the field is of an entity type.

The ManagedEntityIdentityInterceptor sets those fields to null after each request and restores them prior to the next request (and saves only the ids in a private area in between).
That seems to be necessary for session passivation and replication.

However if you bypass interceptors then in this case the field won't be restored and the getter will always return null.

OTOH if you disable the interceptor completely (which you can't currently do without recompiling parts of seam, see http://jira.jboss.com/jira/browse/JBSEAM-3096) then the performance gain is minimal.

So for now if this inspection is going to be implemented, it must not trigger for fields of entity types in a component in conversation scope.