Bonjour,
Voilà, sur un serveur Glassfish, j'ai de déployé Liferay et un certain nombres de portlets.
Ils sont en cluster (avec donc, réplication des sessions + load balancer mod_jk apache2)
Bref, j'essai de mettre l'EHCACHE pour les portlets ...
Mais je ne voit pas trop comment faire.
Il faudrait peut-être à ce que j'ai compris, configurer correctement le fichier persistence.xml d'un EJB, mais je ne sais pas comment faire.
Il est actuellement configuré ainsi :
Cordialement,
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="jpa-201"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>srmDataSource</jta-data-source> <properties> <property name="hibernate.transaction.manager_lookup_class" value="org.apache.openejb.hibernate.TransactionManagerLookup"/> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> <property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/> <property name="hibernate.cache.use_query_cache" value="true"/> <property name="hibernate.cache.use_second_level_cache" value="true"/> <property name="hibernate.generate_statistics" value="true"/> <!--<property name="hibernate.show_sql" value="true"/>--> <!-- <property name="hibernate.hbm2ddl.auto" value="update"/>--> </properties> </persistence-unit> <persistence-unit name="jpa-logger"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>srmLoggerDataSource</jta-data-source> <class>com.srmvision.persistence.ejb.logger.Log</class> <properties> <property name="hibernate.transaction.manager_lookup_class" value="org.apache.openejb.hibernate.TransactionManagerLookup"/> <property name="hibernate.archive.autodetection" value="hbm"/> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> <property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/> <property name="hibernate.cache.use_query_cache" value="true"/> <property name="hibernate.cache.use_second_level_cache" value="true"/> <property name="hibernate.generate_statistics" value="true"/> <!--<property name="hibernate.show_sql" value="true"/>--> <!-- <property name="hibernate.hbm2ddl.auto" value="update"/>--> </properties> </persistence-unit> </persistence>
Neophyse
Partager