You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sirona.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2015/03/22 16:11:11 UTC

[jira] [Commented] (SIRONA-44) use PersistenceProviderResolver to guess jpa provider

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

Hudson commented on SIRONA-44:
------------------------------

SUCCESS: Integrated in sirona-1.7 #95 (See [https://builds.apache.org/job/sirona-1.7/95/])
SIRONA-44 use as adviced by Emeric Vernat PersistenceProviderResolver to try to guess the provider (rmannibucau: rev 1668384)
* /incubator/sirona/trunk/agent/performance/jpa/src/main/java/org/apache/sirona/jpa/SironaPersistence.java


> use PersistenceProviderResolver to guess jpa provider
> -----------------------------------------------------
>
>                 Key: SIRONA-44
>                 URL: https://issues.apache.org/jira/browse/SIRONA-44
>             Project: Sirona
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>            Assignee: Romain Manni-Bucau
>             Fix For: 0.3-incubating
>
>
> Main from Vernat Emeric on the list:
> {quote}
> Hi Sirona and JavaMelody devs,
> In the Sirona JPA monitoring, inside SironaPersistence [1], the PersistenceProvider is guessed by trying to load the classes of 11 possible providers: org.apache.openjpa.persistence.PersistenceProviderImpl, org.hibernate.jpa.HibernatePersistenceProvider, etc
> The one which is found by the ClassLoader wins.
> The JavaMelody JPA monitoring was heavily inspired by Sirona's one as you probably know [2].
> My question is: would it be possible and simpler for SironaPersistence to look into javax.persistence.spi.PersistenceProviderResolverHolder.getPersistenceProviderResolver().getPersistenceProviders() instead of loading the classes of providers?
> By the way, it seems to me that this change would fix a usage "issue" with WildFly 8.2 because in WildFly, by default:
> - Thread.currentThread().getContextClassLoader() does not find the org.hibernate.jpa.HibernatePersistenceProvider class from the WildFly JBoss module,
> - while PersistenceProviderResolverHolder.getPersistenceProviderResolver().getPersistenceProviders() returns something like [org.apache.sirona.jpa.SironaPersistence@20abb1, org.hibernate.jpa.HibernatePersistenceProvider@e7f394, org.hibernate.ejb.HibernatePersistence@28b99c].
> (Otherwise, you could read the very long WildFly documentation, or to keep it short you can certainly add a META-INF/MANIFEST.MF file in the webapp resources with "Dependencies: org.hibernate")
> Thanks guys and girls,
> - Emeric
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)