[
https://issues.apache.org/jira/browse/OPENEJB-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12526593
]
David Blevins commented on OPENEJB-678:
---------------------------------------
A very common mistake is to declare bean callbacks as follows:
@PostConstruct <any-scope> void <method-name>(InvocationContext)
@PreDestroy <any-scope> void <method-name>(InvocationContext)
@PrePassivate <any-scope> void <method-name>(InvocationContext)
@PostActivate <any-scope> void <method-name>(InvocationContext)
That is only allowed for Interceptors. The correct syntax is
@PostConstruct <any-scope> void <method-name>()
@PreDestroy <any-scope> void <method-name>()
@PrePassivate <any-scope> void <method-name>()
@PostActivate <any-scope> void <method-name>()
This is checked for in org.apache.openejb.config.rules.CheckCallbacks. Just
need to improve the logic to check for this type explicitly and add more
specific info.
> Validation: Explicit check for InvocationContext incorrectly used in bean
> callbacks
> -----------------------------------------------------------------------------------
>
> Key: OPENEJB-678
> URL: https://issues.apache.org/jira/browse/OPENEJB-678
> Project: OpenEJB
> Issue Type: Sub-task
> Reporter: David Blevins
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.