Questo contenuto non è disponibile nella lingua selezionata.

28.2. Using Alternate JPA Providers


Seam comes packaged and configured with Hibernate as the default JPA provider. To use a different JPA provider, you must configure it with Seam.

Note

This is a workaround — future versions of Seam will not require configuration changes to use alternative JPA providers, unless you add a custom persistence provider implementation.
There are two ways to tell Seam about your JPA provider. The first is to update your application's components.xml so that the generic PersistenceProvider takes precedence over the Hibernate version. Simply add the following to the file:
<component name="org.jboss.seam.persistence.persistenceProvider" 
           class="org.jboss.seam.persistence.PersistenceProvider" 
           scope="stateless"> 
</component>
Copy to Clipboard Toggle word wrap
To take advantage of any of your JPA provider's non-standard features, you must write your own implementation of the PersistenceProvider. (You can use HibernatePersistenceProvider as a starting point.) Tell Seam to use this PersistenceProvider like so:
<component name="org.jboss.seam.persistence.persistenceProvider" 
           class="org.your.package.YourPersistenceProvider"> 
</component>
Copy to Clipboard Toggle word wrap
Now, update persistence.xml with the correct provider class, and any properties required by your provider. Remember to package any required JAR files with your application.
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2026 Red Hat