tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Bell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENEJB-1286) Bug in reporting invalid @PostActivate/@PrePassivate usage in Stateful and Singleton beans
Date Thu, 05 May 2011 14:05:04 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-1286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029338#comment-13029338
] 

Darren Bell commented on OPENEJB-1286:
--------------------------------------

Can confirm that this is happening.  I'm using 3.1.4.  When commenting @PostActivate and @PostPassivate
in my single bean, the error went away.

> Bug in reporting invalid @PostActivate/@PrePassivate usage in Stateful and Singleton
beans
> ------------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1286
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1286
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.1, 3.1.2
>            Reporter: David Blevins
>            Assignee: David Blevins
>            Priority: Minor
>             Fix For: 3.1.3
>
>
> Instead of the appropriate warning saying using these annotations is not valid unless
the bean is @Stateful, users would instead see:
> java.lang.UnsupportedOperationException
> 	at java.util.AbstractList.add(AbstractList.java:131)
> 	at java.util.AbstractList.add(AbstractList.java:91)
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.processCallbacks(AnnotationDeployer.java:2080)
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1069)
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:680)
> 	at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:194)
> 	at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:248)
> 	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:612)
> 	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:562)
> 	at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:391)
> 	at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:300)
> 	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:279)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
> The correct output should be warnings like the following:
> WARN - WARN ... TestStateless:	@PrePassivate is ignored for beans of type Stateless.
 Method: myPassivate
> WARN - WARN ... TestStateless:	@PostActivate is ignored for beans of type Stateless.
 Method: myActivate
> WARN - WARN ... TestSingleton:	@PrePassivate is ignored for beans of type Singleton.
 Method: myPassivate
> WARN - WARN ... TestSingleton:	@PostActivate is ignored for beans of type Singleton.
 Method: myActivate

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message