Hello Leszek,

Tuesday, May 11, 2004, 9:48:48 PM, you wrote:

> Peter Velychko wrote:
>> Hello Leszek,
>> 
>> I have in production the following configuration:
>>   tomcat + cocoon 2.1.5-cvs + hibernate 2.1.3 + dbcp.
>> It works without problem.
> Did you configure dbcp in Tomcat and referred to the pool by JNDI or let 
> Hibernate manage pool via dbcp (so you set only hibernate.dbcp.* 
> properties)?
I configured dbcp in Tomcat.

>> Just now I've configured my tomcat to work with c3p0 connection pool
>> and it works corectly also.
> Same question as above. Could you post your configuration files? I tried 
> with tomcat 4.1.27 - same error.
server.xml
<Resource name="jdbc/MyDB" scope="Shareable" type="javax.sql.DataSource" 
auth="Container"/>
<ResourceParams name="jdbc/MyDB">
        <parameter>
                <name>factory</name>
                <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
        </parameter>
        <!-- DBCP database connection settings -->
        <parameter>
                <name>username</name>
                <value>test</value>
        </parameter>
        <parameter>
                <name>password</name>
                <value>test</value>
        </parameter>
        <parameter>
                <name>driverClassName</name>
                <value>oracle.jdbc.driver.OracleDriver</value>
        </parameter>
        <parameter>
                <name>url</name>                                                       
 
                <value>jdbc:oracle:thin:@serverurl:1521:db</value>
        </parameter>
        <!-- DBCP connection pooling options -->
        <parameter>
                <name>maxWait</name>
                <value>5000</value>
        </parameter>
        <parameter>
                <name>maxIdle</name>
                <value>2</value>
        </parameter>
        <parameter>
                <name>maxActive</name>
                <value>4</value>
        </parameter>
</ResourceParams>


web.xml
<resource-ref>
        <description>Datasource</description>
        <res-ref-name>jdbc/MyDB</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>  
        <res-auth>Container</res-auth>
</resource-ref>


hibernate.cfg.xml
<hibernate-configuration>
    <session-factory>
        <property name="connection.datasource">java:comp/env/jdbc/MyDB</property>
        <property name="show_sql">false</property>
        <property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
        <property name="jdbc.use_streams_for_binary">true</property>
        <property 
name="cache.provider_class">net.sf.ehcache.hibernate.Provider</property>
        <property name="cache.use_query_cache">true</property>
        <property name="jdbc.batch_size">0</property>
        <property name="cache.region_prefix">my</property>
        <property name="jdbc.use_scrollable_resultset">true</property>
        <!-- Mapping files -->
        <mapping resource="mapping.hbm"/>
    </session-factory>
</hibernate-configuration>

>> I'll try to start my application on jetty. What version of jetty are
>> you use?
> 4.2.19.

> I've been trying to use proxool. I was able to run it with proxool 
> configured outside hibernate. With proxool created within hibernate I 
> think there is a bug that occurs when you set hbm2ddl to create.

> Please give more info on your working configuration.

> My regards
>         Leszek Gawron


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Best regards,
Peter Velychko                            
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to