ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Berri <marco.be...@bluestudio.it>
Subject [SOLVED]Re: [HELP] [HELP ]Problem Oscache + Ibatis
Date Wed, 03 Aug 2005 13:16:57 GMT
I solved the Problem,

My application Use API QueryWithRowsHandler.
this API NOT SUPPORT write/read the CACHE!

by
Marco Berri


Marco Berri wrote:
> 
> Hi all!
> 
> I tried a lot of times and I noticed that Ibatis is the matter.
> 
> Recalling OScache API in writing and reading, everything is completely 
> functional.
> 
> OScache logs make me know they are able to write cache informations.
> 
> Other sqlmap specifications:
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 
> 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> <sqlMapConfig>
>    <settings cacheModelsEnabled="true"
>                        enhancementEnabled="true"
>                        lazyLoadingEnabled="true"
>                        maxRequests="32"
>                        maxSessions="10"
>                        maxTransactions="10"
>                        useStatementNamespaces="false"
>                />
>            <transactionManager type="JDBC">
>                <dataSource type="SIMPLE">
>                    <property name="JDBC.Driver" 
> value="org.postgresql.Driver"/>
>                    <property name="JDBC.ConnectionURL" 
> value="jdbc:postgresql://127.0.0.1:5432/tnes2"/>
>                    <property name="JDBC.Username" value="xxx"/>
>                    <property name="JDBC.Password" value="xxx"/>
>                </dataSource>
>            </transactionManager>
>    <sqlMap 
> url="file:////usr/local/customers/tnes2/www/WEB-INF/tnes/conf/storage/login.xml"/>

> 
> 
> ...
> ...
> ..
> ..
> ..
> ..
> ..
> ..
> ..
> </sqlMapConfig>
> 
> 
> file login.xml
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" 
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
> <sqlMap namespace="Login">
> 
>    <cacheModel id="login-cache" type="OSCACHE">
>        <flushOnExecute statement="updLoginInfobyLoginId"/>
>        <flushOnExecute statement="insLogin"/>
>        <flushOnExecute statement="delLoginById"/>
>        <flushOnExecute statement="updRetrybyId"/>
>    </cacheModel>         <cacheModel id="pswpolicy-cache" type="OSCACHE">
>        <flushOnExecute statement="insPswPolicy"/>
>        <flushOnExecute statement="delPswPolicy"/>
>        <flushOnExecute statement="updPswPolicybyId"/>
>    </cacheModel>
>       <select id="getCountLoginbyUsrCtx" resultClass="java.lang.Integer" 
> cacheModel="login-cache">
>        SELECT COUNT(VLOGIN_ID) FROM TNES2.VLOGIN WHERE 
> TRIM(UPPER(TNES2.VLOGIN.VLOGIN_USERNAME)) = UPPER(TRIM(#username#)) AND 
> UPPER(TRIM(TNES2.VLOGIN.VLOGIN_CONTEXT)) = UPPER(TRIM(#area#))
>    </select>
> 
> ..........
> .........
> .........
> .......
> ........
> .....
> 
> 
>  >>>>>
>  >>>>> SO: windows 2003 Server EE
>  >>>>> Ibatis: 2.1.0.565
>  >>>>> OSCACHE: 2.1.1
>  >>>>>
>  >>>>> Tomcat: 5.0
>  >>>>>
>  >>>>> oscache.properties
>  >>>>>
>  >>>>> cache.memory=false
>  >>>>> cache.key=__oscache_cache
>  >>>>> cache.persistence.class =
>  >>>>> 
> com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener 
> 
>  >>>>>
>  >>>>> #because the windows don't write file with "|"
>  >>>>> cache.persistence.disk.hash.algorithm = MD5
>  >>>>>
>  >>>>> cache.path=f:\\oscache
>  >>>>> 
> cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache
>  >>>>> cache.capacity=150
>  >>>>> cache.unlimited.disk=true
>  >>>>>
> 
> 
> 
> 
> 
> 
> 
> Marco Berri wrote:
> 
>> Hi,
>> no f is the Local Hard disk Drive
>>
>> cache.path=f:\\oscache
>>
>>
>> Larry Meadors wrote:
>>
>>> Is F: a network drive?
>>>
>>> Larry
>>>
>>>
>>> On 7/20/05, Marco Berri <marco.berri@bluestudio.it> wrote:
>>>
>>>> Hi!
>>>> Thanks for your answer.
>>>> Application runs using Administrator user and OSCache writes the folder
>>>> f:\oscache, the sub-folders Application and group and put files into
>>>> them, but it seems that it has some problems reading these files;
>>>> application runs in an infinite loop without any message.
>>>> Anyboby have suggestions?
>>>> Thank you!
>>>>
>>>>
>>>>
>>>> Daniel Henrique Ferreira e Silva wrote:
>>>>
>>>>> Hi Marco,
>>>>>
>>>>> Not sure but it seems to be not iBATIS.
>>>>> I'd guess your windows box has a filesystem permissions issue. How are
>>>>> the permissions for f:\\oscache? Does the user that Tomcat relies on
>>>>> has write permission on that directory?
>>>>>
>>>>> Hope that helped,
>>>>> Daniel Silva.
>>>>>
>>>>> On 7/19/05, Marco Berri <marco.berri@bluestudio.it> wrote:
>>>>>
>>>>>
>>>>>> Hy all!
>>>>>> I realized an Ibatis embedded Java application with OScache.
>>>>>> Within Linux environment everything is right, but within Win 
>>>>>> environment
>>>>>> (Windows 2003 Server) OS cache falls down and cache can't be written.
>>>>>> Anybody could help me?
>>>>>> Lot of thanks
>>>>>>
>>>>>>
>>>>>> Specifications::
>>>>>>
>>>>>> SO: windows 2003 Server EE
>>>>>> Ibatis: 2.1.0.565
>>>>>> OSCACHE: 2.1.1
>>>>>>
>>>>>> Tomcat: 5.0
>>>>>>
>>>>>> oscache.properties
>>>>>>
>>>>>> cache.memory=false
>>>>>> cache.key=__oscache_cache
>>>>>> cache.persistence.class =
>>>>>> com.opensymphony.oscache.plugins.diskpersistence.HashDiskPersistenceListener

>>>>>>
>>>>>> #because the windows don't write file with "|"
>>>>>> cache.persistence.disk.hash.algorithm = MD5
>>>>>>
>>>>>> cache.path=f:\\oscache
>>>>>> cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache

>>>>>>
>>>>>> cache.capacity=150
>>>>>> cache.unlimited.disk=true
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>>
> 
> 

Mime
View raw message