openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Blevins (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENEJB-678) Validation: Explicit check for InvocationContext incorrectly used in bean callbacks
Date Tue, 11 Sep 2007 20:24:32 GMT

    [ 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.


Mime
View raw message