[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-4454) HibernatePersistenceProvider.init() and PersistenceProvider.init() not executing

Flavio Costa (JIRA) jira-events at lists.jboss.org
Thu Nov 19 12:39:29 EST 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-4454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12495615#action_12495615 ] 

Flavio Costa commented on JBSEAM-4454:
--------------------------------------

I came across the same bug and was introduced due to another bug here: JBSEAM-4093. / r10535.

The WILDCARD_AS_COUNT_QUERY_SUBJECT really stopped working, using Hibernate does not make a difference, because, like Arsen said, the init() method is never called.

My workaround was to create a component with the same name, the "correct" annotation (javax.annotation.PostConstruct) and a higher precedence.

Solutions are reverting revision 10535 (breaking Websphere), advise Websphere users to drop the needed jars with the correct annotations or create a different component that only gets installed when Websphere is detected (worst solution imho).

> HibernatePersistenceProvider.init() and PersistenceProvider.init() not executing
> --------------------------------------------------------------------------------
>
>                 Key: JBSEAM-4454
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4454
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.2.CR1, 2.1.2.CR2, 2.1.2.GA, 2.2.0.CR1, 2.2.0.GA
>            Reporter: Arsen Torbarina
>             Fix For: 2.2.1.CR1
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> Method org.jboss.seam.persistence.PersistenceProvider.init() (including its subclass' method HibernatePersistenceProvider.init()) never gets executed, because it is annotated with @org.jboss.seam.annotations.intercept.PostConstruct instead of @javax.ejb.PostConstruct.
> BTW, this is the root cause why EntityQuery breaks on MySQL when counts entities with composite keys. The method EntityQuery.validate() should setUseWildcardAsCountQuerySubject according to the HibernatePersistenceProvider.supportsFeature(Feature.WILDCARD_AS_COUNT_QUERY_SUBJECT), but the latter always returns false, because HibernatePersistenceProvider.init() that sets the feature flag is never executed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list