Poitras Christian | 3 Nov 2009 20:49
Picon

Bug IBATIS-679

Hi,
 
The correction made to bug https://issues.apache.org/jira/browse/IBATIS-679 is not appropriate in BETA 5.
It enters an infinite loop when 2 resultMap point to each other with discrimator tags.
For example :
    <resultMap id="personMap" type="Person">
        <id property="id" column="id"/>
        <result property="firstName" column="firstName"/>
        <result property="lastName" column="lastName"/>
        <discriminator column="personType" javaType="String">
            <case value="EmployeeType" resultMap="employeeMap"/>
        </discriminator>
    </resultMap>
    <resultMap id="employeeMap" type="Employee" extends="personMap">
        <result property="jobTitle" column="jobTitle"/>
        <discriminator column="employeeType" javaType="String">
            <case value="PersonType" resultMap="personMap"/>
        </discriminator>
    </resultMap>

And a select that returns 'EmployeeType' as personType and 'PersonType' as employeeType.
 
I've also proposed a correction for this bug.
Is it possible to reopen the bug and apply the patch?
 
Thanks.
Christian
Simone Tripodi | 17 Nov 2009 21:23
Picon
Gravatar

[iBatis 3] Cache troubles

Hi all guys,
I've been doing some experiment using the last beta of iBatis 3 and
I've the feeling you happily fixed the inglorious IBATIS-555 issue
about the CacheKey unique hashcode generation on different JVMs :)

Now I've been porting my old stuff to the new iBatis implementation
and everything has worked fine until I plugged-in the cache, I really
hope you can help me to understand where I'm wrong: I implemented a
Memcached-based Cache class, wrapping the spy memcached client
(code.google.com/p/spymemcached/), injecting a singleton instance to
the Configuration programmatically using google-guice 2 and finally
referenced in the sql-map via the snippet:

<cache-ref namespace="memcached"/>

What I noticed, reading the logs, is the following:
* when flushing the statements defined in the sql map, is called the
method org.apache.ibatis.cache.Cache#clear(): that makes me a little
worried, because in a memcached context I ideally want to use just one
memcached client instance and reference it in the whole application,
when performing an insert operation I wouldn't flush the whole cache,
but rather remove only the interested statements; since I'm still used
to the old iBatis2 cache model, how can I fix it?
* no data is cached, the method
org.apache.ibatis.cache.Cache#putObject(Object,Object) is never
called;

All the code I've been producing is public, you can find it on
google-code[1], and on the test directory you can find the scenario[2]
I described

Thanks in advance for your help, any kind of suggestion will be very
appreciated!!!
Simone

[1] http://code.google.com/p/ibaguice/source/browse/#svn/trunk
[2] http://code.google.com/p/ibaguice/source/browse/trunk/src/test/java/com/ibaguice/SimpleTestCase.java
Jeremy Jardin | 26 Nov 2009 09:58
Picon

Ibatis with my own pool


Hi,

I'm trying to use Ibatis with my own pool, and I don't want ibatis to handle
it itself.
So, in the sqlmapConfig.xml file, I set the URL of my common pool.

But, I can see that ibatis still manage my connections, and I can't close it
explicitely ?
What could I do ?

Thx,

Jeremy
Jeremy Jardin | 26 Nov 2009 09:59
Picon

Ibatis with my own pool


Hi,

I'm trying to use Ibatis with my own pool, and I don't want ibatis to handle
it itself.
So, in the sqlmapConfig.xml file, I set the URL of my common pool.

But, I can see that ibatis still manage my connections, and I can't close it
explicitely ?
What could I do ?

Thx,

Jeremy
Jeremy Jardin | 26 Nov 2009 10:02
Picon

Ibatis with my own pool


Hi,

I'm trying to use Ibatis with my own pool, and I don't want ibatis to handle
it itself.
So, in the sqlmapConfig.xml file, I set the URL of my common pool.

But, I can see that ibatis still manage my connections, and I can't close it
explicitely ?
What could I do ?

Thx,

Jeremy
Jeremy Jardin | 26 Nov 2009 10:23
Picon

Ibatis with my own pool


Hi,

I'd like toconfigure ibatis with my own connection pool, so I set my pool as
the connnectionUrl in the sqlMapConfig.xml file.
But, unfortunately, it seems that ibatis still use his own pool ?
Can I disable the ibatis pool ?

Thx, 

Jeremy
Jeremy Jardin | 26 Nov 2009 15:42
Picon

Re: Ibatis with my own pool


This is the part of my config file I'd like to change : 

<transactionManager type="JDBC">
		<dataSource type="SIMPLE">			
			<property name="JDBC.Driver" value="${driver}" />
			<property name="JDBC.ConnectionURL" value="${url}" />
			<property name="JDBC.Username" value="${username}" />
			<property name="JDBC.Password" value="${password}" />
			<property name="JDBC.DefaultAutoCommit" value="true" />
		</dataSource>
</transactionManager>

I don't want to use that datasource, i just want to connect my common pool I
set
as the connectionUrl..

Jeremy Jardin wrote:
> 
> Hi,
> 
> I'd like toconfigure ibatis with my own connection pool, so I set my pool
> as the connnectionUrl in the sqlMapConfig.xml file.
> But, unfortunately, it seems that ibatis still use his own pool ?
> Can I disable the ibatis pool ?
> 
> 
> Thx, 
> 
> Jeremy
> 

Kambix | 26 Nov 2009 16:18
Favicon

Re: Ibatis with my own pool


Hi,

the <dataSource type="SIMPLE">	uses the iBATIS built-in Connection Pool.

You can use 
<dataSource type="DBCP"> for jakarta commons database connection pool
or
<dataSource type="JNDI"> if you have a Container-based data source located
via JNDI

--
kambiz

Jeremy Jardin wrote:
> 
> This is the part of my config file I'd like to change : 
> 
> <transactionManager type="JDBC">
> 		<dataSource type="SIMPLE">			
> 			<property name="JDBC.Driver" value="${driver}" />
> 			<property name="JDBC.ConnectionURL" value="${url}" />
> 			<property name="JDBC.Username" value="${username}" />
> 			<property name="JDBC.Password" value="${password}" />
> 			<property name="JDBC.DefaultAutoCommit" value="true" />
> 		</dataSource>
> </transactionManager>
> 
> I don't want to use that datasource, i just want to connect my common pool
> I set
> as the connectionUrl..
> 
> 
> 
> 
> Jeremy Jardin wrote:
>> 
>> Hi,
>> 
>> I'd like toconfigure ibatis with my own connection pool, so I set my pool
>> as the connnectionUrl in the sqlMapConfig.xml file.
>> But, unfortunately, it seems that ibatis still use his own pool ?
>> Can I disable the ibatis pool ?
>> 
>> 
>> Thx, 
>> 
>> Jeremy
>> 
> 
> 

Nathan Maves | 26 Nov 2009 17:25
Picon

Re: Ibatis with my own pool

This does not belong on the development list.  Please move the conversation to the users list and don't post the same question on multiple lists.

On Thu, Nov 26, 2009 at 8:18 AM, Kambix <kambiz.tavakoli <at> mgm-tp.com> wrote:

Hi,

the <dataSource type="SIMPLE">  uses the iBATIS built-in Connection Pool.

You can use
<dataSource type="DBCP"> for jakarta commons database connection pool
or
<dataSource type="JNDI"> if you have a Container-based data source located
via JNDI

--
kambiz



Jeremy Jardin wrote:
>
> This is the part of my config file I'd like to change :
>
> <transactionManager type="JDBC">
>               <dataSource type="SIMPLE">
>                       <property name="JDBC.Driver" value="${driver}" />
>                       <property name="JDBC.ConnectionURL" value="${url}" />
>                       <property name="JDBC.Username" value="${username}" />
>                       <property name="JDBC.Password" value="${password}" />
>                       <property name="JDBC.DefaultAutoCommit" value="true" />
>               </dataSource>
> </transactionManager>
>
> I don't want to use that datasource, i just want to connect my common pool
> I set
> as the connectionUrl..
>
>
>
>
> Jeremy Jardin wrote:
>>
>> Hi,
>>
>> I'd like toconfigure ibatis with my own connection pool, so I set my pool
>> as the connnectionUrl in the sqlMapConfig.xml file.
>> But, unfortunately, it seems that ibatis still use his own pool ?
>> Can I disable the ibatis pool ?
>>
>>
>> Thx,
>>
>> Jeremy
>>
>
>

--
View this message in context: http://old.nabble.com/Ibatis-with-my-own-pool-tp26525311p26530882.html
Sent from the iBATIS - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe <at> ibatis.apache.org
For additional commands, e-mail: dev-help <at> ibatis.apache.org



Gmane