[Hibernate-JIRA] Created: (EJB-408) c3p0 not working with hibernate-entitymanager 3.4.0.GA
by Marcelo Romulo Fernandes (JIRA)
c3p0 not working with hibernate-entitymanager 3.4.0.GA
------------------------------------------------------
Key: EJB-408
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-408
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.4.0.GA
Environment: windows xp sp2; java sun 1.6.0_10; tomcat 6.0.18; maven 2.0.9
Reporter: Marcelo Romulo Fernandes
Priority: Minor
I was using hibernate-entitymanager 3.2.6.GA and c3p0 well, but I cannot run c3p0 with hibernate-entitymanager 3.4.0.GA. c3p0 is never called!!!
Below, follows persistence.xml, maven dependencies working with hibernate-entitymanager 3.2.6.GA, maven dependencies not woking with hibernate-entitymanager 3.4.0.GA
persistence.xml:
<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="SystemDDD" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<!-- Connection properties -->
<property name="hibernate.connection.username" value="DDD"/>
<property name="hibernate.connection.password" value="DDD"/>
<property name="hibernate.default_schema" value="DDD"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@//YYY:1521/ZZZ"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
<!-- Connection pooling properties -->
<property name="hibernate.c3p0.min_size" value="1"/>
<property name="hibernate.c3p0.max_size" value="10"/>
<property name="hibernate.c3p0.timeout" value="5000"/>
<property name="hibernate.c3p0.max_statements" value="50"/>
<property name="hibernate.c3p0.idle_test_period" value="60000"/>
<!-- Cache properties -->
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider"/>
<!-- Other properties -->
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.archive.autodetection" value="class, hbm"/>
<property name="hibernate.hbm2ddl.auto" value="none"/>
</properties>
</persistence-unit>
</persistence>
maven dependencies working with hibernate-entitymanager 3.2.6.GA
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.3.2.GA</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
maven dependencies not woking with hibernate-entitymanager 3.4.0.GA
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.4.0.GA</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>3.3.0.SP1</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.2</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>3.3.0.SP1</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
What is wrong or missing?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[Hibernate-JIRA] Commented: (HHH-1123) Cannot put more than 1000 elements in a InExpression
by Frank Klein Koerkamp (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123?page=c... ]
Frank Klein Koerkamp commented on HHH-1123:
-------------------------------------------
Is it not possible to create a temporary table of al in's and join on that?
> Cannot put more than 1000 elements in a InExpression
> ----------------------------------------------------
>
> Key: HHH-1123
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1123
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 rc2, 3.2.0.alpha1
> Environment: Oracle 9i
> Reporter: Alexis Seigneurin
> Assignee: Strong Liu
> Attachments: Animal.hbm.xml, hibernate-inexpression-oracle-3.2.patch, HQLHelper.java, LongInElementsTest.java, patch.txt
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The number of elements that we can put in a "in" expression is limited to a certain amount (1000 for Oracle, for instance). When creating a criteria query, the org.hibernate.criterion.InExpression class should split the expression into several smaller ones.
> Attached is a patch which splits the expression by slices of 500 elements. For example, if we have 1001 elements to put in the "in" expression, the result would be :
> (entity.field in (?, ?, ?...) or entity.field in (?, ?, ?...) or entity.field in (?))
> The surrounding parantheses are useful to avoid problems with other conditions (a "and" condition taking over the one of the "or" conditions).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[Hibernate-JIRA] Created: (HHH-6004) StructuredCacheEntry shall pass correct expected map size and loadFactor for HashMap constructor
by Sergey Vladimirov (JIRA)
StructuredCacheEntry shall pass correct expected map size and loadFactor for HashMap constructor
------------------------------------------------------------------------------------------------
Key: HHH-6004
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6004
Project: Hibernate Core
Issue Type: Improvement
Components: caching (L2)
Affects Versions: 3.6.0
Reporter: Sergey Vladimirov
There is a code in StructuredCacheEntry::structure that supposed to optimize usage of HashMap and not allow resizing of HashMap. But it doesn't work. To check put a breakpoint at hashmap::resize and call for StructuredCacheEntry::structure method:
at java.util.HashMap.resize(HashMap.java:462)
at java.util.HashMap.addEntry(HashMap.java:755)
at java.util.HashMap.put(HashMap.java:385)
at org.hibernate.cache.entry.StructuredCacheEntry.structure(StructuredCacheEntry.java:67)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:195)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:982)
I believe the line
Map map = new HashMap(names.length+2);
shall be rewritten as
Map map = new HashMap(names.length+3, 1.0);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months