ibatis

Pitfalls and practical Use-Cases: Toplink, Hibernate, Eclipse Link, Ibatis ...

I worked a lot with Hibernate as my JPA implementation. In most cases it works fine! But I have also seen a lot of pitfalls: Remoting with persisted Objects is difficult, because Hibernate replaces the Java collections with its own collection implementation. So the every client must have the Hibernate .jar libraries. You have to take c...

iBatis | Configuring xml file as a datasource in ibatis

hi, How do I configure an xml file as the datasource in iBatis? thanks, R ...

Is it possible injecting memcached in Apache iBatis?

I've been working on a complex project using a and distribuited application that requires caching SQL queries: since I've been using iBatis framework, I'd like to use memcached - sysadmin requires it - as caching engine. Is it possible? If yes, does anyone know existing solutions/implementations? I already know OSCACHE works also in clus...

How to implement an Audit Interceptor using iBATIS ?

I want to log all changes in my database for auditing purposes, using a table called AuditEvent that stores the modified row ID (primary key), table name, column name, previous value, new value, date of change (timestamp), operation type (insert / update / delete) and the name of the user who did the changes. I'm using SQL Server 2005,...

Ibatis inheritance and one to many

Good day I have a complex model (ddd) which i want to map using ibatis. My model is as follows: class A { int id; String title; List <B> b; } abstract class B { int id; String title; List <C> f; int type; } class BA extends B { BA() { setType(1); } } class BB extends B { BB { setType(2); } } My current XML Map...

iBATOR classPathEntry, can it be set as relative to the project?

When following this tutorial the one thing I really have a question on is the classPathEntry: http://blog.agdunn.net/?p=313 Notice his entry is hard wired to the full path of the mysql-connector jar: Is there a way to specify the project root as a variable in this type of situation? example: Thanks! ...

Can I annotate an inherited final property with @Autowire?

Resolution: No I'm no longer extending the original parent. Original: Is there a way to annotate an inherited final setter method? I am extending a class which has a final setter which I would like to @Autowire with Spring. The parent class is from a library and cannot be modified. A workaround I have found is to write a proxy method, ...

Spring: replace SqlMapClientTemplate for all clients?

I have a number of DAO classes that extend SqlMapClientDaoSupport, and call getSqlMapClientTemplate() to run iBatis queries. For a particular test, I wish to replace the object returned when each DAO calls getSqlMapClientTemplate(), with my own custom class. How can I do this? I know that there is a setSqlMapClientTemplate( org.sprin...

Oracle - connection Pooling with spring framework

Hi, We are trying to implement Oracle connection pooling with the help of Spring Framework. We are using DBCP connection pooling method. However the integration between DBCP and spring doesn't go down that well. Problem that we face is that DBCP returns PoolableConnections Object while Oracle expects OracleConnection Objects. (Thorws C...

How do you map a List<string> in iBatis?

I have a class like this public SomeClass { private List<string> _strings = new List<string>(); public IEnumerable<string> Strings { { get return _strings; } } } How would I do the mapping for _strings? I tried this, but it complains about the List typehandler not being found, which it doesn't complain about if I ...

Crosstab / pivot query in Oracle's PL/SQL - iBatis - Exjs and JasperReport

Hi all, I tried to create a pivot table created from a table in Oracle 10g. here is the table structure : CREATE TABLE KOMUNIKA.STOCK_AREA ( PRODUCT_CODE VARCHAR2(20 BYTE) NOT NULL, PRODUCT_NAME VARCHAR2(50 BYTE), AREA_CODE VARCHAR2(20 BYTE), AREA_NAME VARCHAR2(50 BYTE), QUANTITY NUMBER(20,2) )...

Ingres connection on an IIS deployed site

Hey all, I have a .net 2.0 app being hosted on IIS, that connects to a Ingres DB. The connection uses iBatis with an ODBC driver to connect to an ingres database being protected behind an installation password. For some reason, when I'm debugging my code, everything runs fine. It establishes the connection without any problems. However...

ibatis ibator Java code generation problem

I use ibator eclipse plugin 1.2.1. My RDBMS is MySQL 5.1. I have a ibator config file as shown below: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE ibatorConfiguration PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS Ibator Configuration 1.0//EN" "http://ibatis.apache.org/dtd/ibator-config_1_0.dtd" > <ibatorConfigura...

Use of Non-Company approved 3rd party software libraries

Is it unethical to use a third party library/framework (spring/ibatis) in your app anyway, even though you've been told it will take too long to approve and you can just make do without? ...

Indefinite flushInterval in iBATIS

Does anyone know what the behavior of an iBATIS cacheModel is when flushInterval is left out, say if the cache type is MEMORY? I'm hoping that it simply leaves the cached results in memory indefinitely. I have a set of results that will never change without a server restart, and I'm hoping only to query for them once during the lifetim...

Your views about the gap between naming convention of field names in Java bean and database

Hi, In many past projects, I observed that people tend to keep database column name as two or three words separated with '_', for example : first_name. However the same column is mapped to Java bean's variable : firstName. I don't know why people don't keep database field names like firstName but tend to use _ in between. Even if we us...

Integrating Spring 2.5 with Ibatis 3

Does anyone know of a way to integrate the new Ibatis with the current Spring 2.5? I'm exploring pulling it in to a project and was curious if anyone had done it before. ...

ibatis check for exist before creating value

I have a property definition table and second one that holds the actual property values: table propdef: id, name, description table props: id, propdefid, userid, value This way i can dynamically create properties for my users. When I want to update a property for a user I have to check the props table if a propdefid/userid row exists...

Java - retrieving large amounts of data from a DB using iBatis

I need to extract data from a DB2 table, run some processing on each returned row and output to a flat file. I'm using iBatis but found that using the queryForList I started getting out of memory errors, I'll be looking at 100k+ rows of data increasing. I've looked at using queryWithRowHandler instead but the iBatis RowHandler interfac...

Is there a simple way to do Query By Example in iBATIS?

I had hoped this was baked into the most recent release, but if it is, I can't find the docs via a simple Google search. Failing that, I'd prefer a simple library, but I'll settle for a tutorial. Thanks. ...