Re: How to Compare database record before UPDATE using iBatis?

2009-03-31 Thread Christopher Lamey
On 3/31/09 7:25 AM, Nicholoz Koka Kiknadze kikna...@gmail.com wrote: Hm, I usually override equals. Any advantages with hashCode? Just an FYI, if you override equals(), you should almost always override hashcode as well. From the Object.equals Javadoc API: Note that it is generally necessary

Re: iBatis+xStream

2009-03-25 Thread Christopher Lamey
On 3/25/09 3:35 PM, AlexElba ramal...@yahoo.com wrote: The problem is this lists must be lazy. I don't want to make them not lazy Whups! Didn't see this before. If you need lazy loading, then you'll have to write custom stuff in xstream to filter out the proxies. Cheers, topher

Re: Ibatis 2.3.0 + postgresql 8.2, returns org.postgresql.util.PSQLException: ERROR: transaction is read-only.

2008-08-11 Thread Christopher Lamey
On 8/11/08 10:26 AM, Torx [EMAIL PROTECTED] wrote: bean id=defaultTxAttributes class=org.springframework.transaction.interceptor .NameMatchTransactionAttributeSource property name=properties props prop key=update* PROPAGATION_REQUIRED,

Re: iBATIS 2.3.3. Clustering and Lazy Loading

2008-07-29 Thread Christopher Lamey
You need to disable the lazy loading and maybe the byte code enchancments in iBATIS. If you're caching, you might have to tweak the cache settings to allow for things to be serialized as well. Check out the settings element in the sqlmap config xml file. On 7/29/08 10:36 AM, nch [EMAIL

Re: ibatis+springframework for millions data loading

2008-07-23 Thread Christopher Lamey
On 7/23/08 8:11 AM, Emi Lu [EMAIL PROTECTED] wrote: I tried: === ... set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on ... I think the spool command is the one that actually tells sqlplus to write to a file. The set stuff just configures the output

Re: ibatis+springframework for millions data loading

2008-07-23 Thread Christopher Lamey
Er, that should read ...regardless of output type. On 7/23/08 10:12 AM, Christopher Lamey [EMAIL PROTECTED] wrote: On 7/23/08 8:11 AM, Emi Lu [EMAIL PROTECTED] wrote: I tried: === ... set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on ... I think

Re: ibatis+springframework for millions data loading

2008-07-22 Thread Christopher Lamey
On 7/22/08 9:59 AM, Emi Lu [EMAIL PROTECTED] wrote: Greeting, I will load millions of data from Oracle10 to postgreSQL8 through JDBC. I like the spring+ibatis framework. May I know how ibatis deal with big chunk of data please? The example I had is the following, would you suggest

Re: ibatis+springframework for millions data loading

2008-07-22 Thread Christopher Lamey
On 7/22/08 4:24 PM, Clinton Begin [EMAIL PROTECTED] wrote: True, other tools may be better... But with a RowHandler, iBATIS could easily meet this requirement. I've used iBATIS RowHandlers for ETL type stuff and achieved crazy performance with batch updates. 15,000 records per second on

Re: iBatis Tomcat log4j IntelliJ IDEA

2008-07-18 Thread Christopher Lamey
On 7/18/08 1:42 PM, Tokajac [EMAIL PROTECTED] wrote: That's exactly the topic here. My aim is to see SELECT * FROM... , INSERT INTO... on the console when they're executed Any more ideas? The FAQ has entry for this:

Re: Check if query exists before executing

2008-06-18 Thread Christopher Lamey
You could look at the database metadata through the Connection: sqlMapClient.getCurrentConnection().getMetaData().getDatabaseXXX() And then use that to call either the Oracle or generic sql. I personally wouldn't go that route because Oracle might change their metadata so it'd break your

Re: Memcached Ibatis controller ?

2008-06-11 Thread Christopher Lamey
Also, you can use oscache as well with ibatis, which supports a distributed cache. On 6/11/08 12:04 PM, Sundar Sankar [EMAIL PROTECTED] wrote: I am not aware of the usage of memcache. But googling on it tells me that it simply stores data in memory and you hit the database only when the data

Re: No caching / validating cache

2008-06-02 Thread Christopher Lamey
Do you have this attribute defined in the setting element: cacheModelsEnabled=true In the sqlMapConfig file? On 6/2/08 3:23 PM, andrew cooke [EMAIL PROTECTED] wrote: Hi, I have a very simple system, with two tables, related 1:many, and a single query which reads all entries from the

Re: Calling a procedure by default.

2008-05-22 Thread Christopher Lamey
Why not use a trigger on the table to call the procedure? What database are you using? On 5/22/08 5:22 PM, Sundar Sankar [EMAIL PROTECTED] wrote: Hi, I am using Spring and Ibatis in our application and we have a requirement where an audit procedure needs to be called every time an update

Re: Dynamic queries w/o using dynamic tags in sql?

2008-05-13 Thread Christopher Lamey
Have you looked at iBATOR for generating all that conditional CRUD stuff? Might be worth your time. On 5/13/08 3:11 PM, Josh Joy [EMAIL PROTECTED] wrote: Thanks Clinton for your reply. Just to clarify...I'm not looking for any performance optimizations...when I say best practices I'm

Re: sqp maps, namespaces a queries' IDs

2008-05-08 Thread Christopher Lamey
Hello, Yes you can. Please see page 10 of the iBATIS PDF, specifically the section on useStatementNamespaces for details. Cheers, Chris On 5/8/08 1:47 PM, Filipe David Manana [EMAIL PROTECTED] wrote: Hi, In my app I have several sql maps (each one in a separate xml file). Each sql map

Re: sqp maps, namespaces a queries' IDs

2008-05-08 Thread Christopher Lamey
PROTECTED] wrote: Ah! So, even with false (default) for the useStatementNamespaces setting, I will be able to use the Namespace.queryName notation? right? thanks a lot On Thu, May 8, 2008 at 10:24 PM, Christopher Lamey [EMAIL PROTECTED] wrote: Hello, Yes you can. Please see page 10

Re: iBatis using Tomcat JNDI, Now DB unit Tests???

2008-04-01 Thread Christopher Lamey
I use Spring's SimpleNamingContextBuilder to create my own JNDI DataSources outside of a container. You might also want to look at DBUnit and hsqldb. On 4/1/08 9:09 AM, Tom Henricksen [EMAIL PROTECTED] wrote: We have been using the Simple datasource in iBatis and had unit test that would tap

Re: iBatis - tomcat JNDI setup

2008-03-27 Thread Christopher Lamey
-Original Message- From: Christopher Lamey [mailto:[EMAIL PROTECTED] Sent: Wed 3/26/2008 4:23 PM To: user-java@ibatis.apache.org Subject: Re: iBatis - tomcat JNDI setup Having the ResourceLink and the Resource in the context xml might be screwing it up. You're telling it to link

Re: iBatis - tomcat JNDI setup

2008-03-27 Thread Christopher Lamey
/advtechgrp/bop/medical/common/data/admcounter.xml/ sqlMap resource=com/advtechgrp/bop/medical/activity/data/ActivityFrequencyVsp. xml/ sqlMap resource=com/advtechgrp/bop/medical/activity/data/ActivityVsp.xml/ /sqlMapConfig -Original Message- From: Christopher Lamey [mailto:[EMAIL

Re: iBatis - tomcat JNDI setup

2008-03-26 Thread Christopher Lamey
Having the ResourceLink and the Resource in the context xml might be screwing it up. You're telling it to link to a global JNDI object, but it doesn't exist at that level. Also using a resource-ref in the web.xml and a Resource element in the context.xml is redundant. Read the Resource

Re: select * causing OutOfMemoryError: Java heap space

2008-03-18 Thread Christopher Lamey
Looks like you can use the userCursorFetch=true param on the JDBC URL to get it to adhere to the fetch size: http://bugs.mysql.com/bug.php?id=18148 Cheers, topher On 3/18/08 12:24 PM, nch [EMAIL PROTECTED] wrote: So-lu-tion. But, yeah, WOW!! Clinton, you've been really helpful. Lots of

Re: Retrieve the SQL statement being executed

2008-03-09 Thread Christopher Lamey
I'm not sure why a RowHandler wouldn't fit your needs. It basically is a callback that gets invoked on each row returned from the query. Only one resultant row is mapped at a time, so the memory usage is very small. The result does get mapped into an object, but the overhead is minimal - and

Re: queryForList/Map/Object... rollbacks

2008-03-05 Thread Christopher Lamey
for the aggressive rollbacks -- thus we should probably make that configurable too. Clinton -Original Message- From: Christopher Lamey [mailto:[EMAIL PROTECTED] Sent: March-04-08 5:07 PM To: user-java@ibatis.apache.org Subject: Re: queryForList/Map/Object... rollbacks That is not the default

Re: queryForList/Map/Object... rollbacks

2008-03-04 Thread Christopher Lamey
That is not the default iBATIS behavior, I'm guessing your container is getting involved. From what I understand, the SIMPLE datasource type is generally for standalone programs, not for apps running in a container. On 3/4/08 4:20 PM, Tom Henricksen [EMAIL PROTECTED] wrote: Currently we are

Re: data source issue

2008-02-29 Thread Christopher Lamey
How are you setting up JNDI in your command line client? Try accessing the DataSource via JNDI in the command line client directly to verify that it's there. On 2/29/08 12:06 PM, Marrs, Kasey [EMAIL PROTECTED] wrote: I am using SQLMaps and have had good success using it, but I have ran into

Re: Transaction Time Out and Stale Connection Exception when using IBatis SQLMapper

2008-02-15 Thread Christopher Lamey
First, some etiquette advise is in order. It is considered a faux pas to send the same message to the list 6 times in a short amount of time. Posting something more will not get you more or quicker responses. Also, sending the same message directly to members of the list immediately after

Re: Stored procedure help.

2008-02-12 Thread Christopher Lamey
Hello, The following is from the iBATIS PDF, page 37: Result Maps can also conveniently populate a Map instance such as HashMap or TreeMap. Collections of such objects (e.g. Lists of Maps) can also be retrieved using the APIs described below (see queryForList()). Map types are mapped exactly

Re: Stored procedure help.

2008-02-12 Thread Christopher Lamey
for STATUS, and the other entry to contain a fully hydrated customer object based off the remaining OUT parameters. Thanks, Craig. On 2/12/08, Christopher Lamey [EMAIL PROTECTED] wrote: Hello, The following is from the iBATIS PDF, page 37: Result Maps can also conveniently populate

Re: Stored procedure help.

2008-02-12 Thread Christopher Lamey
BTW, you can always write a RowHandler that pulls things together into a Map for you if the resultMap route doesn't work for whatever reason. On 2/12/08 4:13 PM, Christopher Lamey [EMAIL PROTECTED] wrote: So the next section of the iBATIS docs on page 37 talks about Complex Properties

Re: Exit out of rowHandler

2008-01-30 Thread Christopher Lamey
Interesting - I don't think I used a groupBy with my large volume RowHandlers. If you're writing to the output stream from the RowHandler and the user Cancels the download, wouldn't the stream get closed and cause an exception the next time you tried to write? It seems like you're going through

Re: deep (and wide) inheritance model

2008-01-30 Thread Christopher Lamey
So are you basically looking at one big query with a bunch of joined tables or a bunch of smaller queries to pull it all together? If so, which one would fit better for your app? On 1/29/08 6:42 PM, Hugh Ross [EMAIL PROTECTED] wrote: I have the good fortune to work on a large domain model,

Re: How get DB2Connection object from SqlMapClient?

2008-01-24 Thread Christopher Lamey
So you want to change JDBC driver configuration based on the invoked method? For reporting reasons? I'm very curious, can you give more details? An example? On 1/24/08 1:19 PM, Hugh Ross [EMAIL PROTECTED] wrote: Unfortunately, the InvocationHandler for SimplePooledConnection is a private

Re: Default Transaction Manager

2008-01-23 Thread Christopher Lamey
As I remember, if you're using the Spring SqlMapClientTemplate, iBATIS will assume you're using an EXTERNAL transaction manager. So whatever you have defined (or don't have defined in your case) in the sql-map-config.xml will be ignored. On 1/23/08 12:50 PM, [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: ueryForObject returns bean with null properties

2008-01-22 Thread Christopher Lamey
# User.java # public class User implements java.io.Serializable { private String userName; public String getUserName() { return this.userName; } public void setUserName(String s) { this.userName = userName; } } Should the setter do this? public void setUserName(String s) {

Re: howto pass a Long argument to a query (isNotNull)

2008-01-18 Thread Christopher Lamey
Yea, the problem is that you've specified a Long as the parameter and then you've got a isNotNull testing, which is trying to do this kind of thing: Long.getUserId() Long.userId Long.get(userId) Which won't work. Besides what Larry said, you could also just pass in a map:

Re: How to configure Multiple datasource in SqlMapConfig.xml

2008-01-17 Thread Christopher Lamey
OK - so you need completely different sqlmaps. On 1/17/08 2:27 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: They are completely different schemas and totally different databases - on different machines. Christopher Lamey [EMAIL PROTECTED] 01/17/2008 04:23 PM Please respond

Re: How to configure Multiple datasource in SqlMapConfig.xml

2008-01-17 Thread Christopher Lamey
Are they completely different schemas? If so, then you'll need two different sqlmaps, DAOs, datasources, etc. A single sqlmap generally only talks to one schema. If they're the same and you can switch based on a runtime parameter, take a look at this:

Re: How to pass Database connection dynamically

2008-01-16 Thread Christopher Lamey
Check out page 8 of the iBATIS PDF, specifically the properties element. Cheers, Chris On 1/16/08 2:24 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am using iBATIS 2.3.0. My SqlMapConfig.xml file looks like this transactionManager type=JDBC commitRequired=false dataSource

Re: Ibatis throttle - possible deadlock (ibatis 2.2, 2.3)

2008-01-15 Thread Christopher Lamey
I usually just turn it on for everything and let it rip...but then I have large amounts of disk space. You could probably switch off the result set stuff if you want. On 1/15/08 5:48 AM, Nikolas Kyriazopoulos Panagiotopoulos [EMAIL PROTECTED] wrote: You could set the java.sql logging

Re: Changing datasource at runtime

2008-01-15 Thread Christopher Lamey
Spring isn't good at dynamic DataSource stuff, especially new ones that get created after the Spring context is instantiated. This item on the FAQ details the solution I came up with for my stuff: http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId= 12583003 There aren't

Re: Changing datasource at runtime

2008-01-15 Thread Christopher Lamey
class=com.foo.persistence.dao.SiteDaoImpl property name=sqlMapClient ref=projSqlMapClient / /bean /beans On 15/01/2008, Christopher Lamey [EMAIL PROTECTED] wrote: Spring isn't good at dynamic DataSource stuff, especially new ones that get created after the Spring context

Re: Performance question

2008-01-10 Thread Christopher Lamey
On 1/10/08 1:58 PM, Brian Parkinson [EMAIL PROTECTED] wrote: Hi Christopher - Finally got a chance to look at adding transaction support to my iBATIS code using Spring 2.5.1. Needed to use spring.jar as well as aspectweaver.jar. Yea, it needs that jar for the AOP stuff. Your config looks

Re: Performance question

2008-01-10 Thread Christopher Lamey
On 1/10/08 2:52 PM, Brian Parkinson [EMAIL PROTECTED] wrote: I wasn't quite sure in your answer whether the startBatch/executeBatch should work properly under the setup I have now - I was assuming that the performance problems I encountered were related (in part at least) to the fact that the

Re: Performance question

2008-01-09 Thread Christopher Lamey
Hello, A transaction can get to a certain size and start to build up a big enough rollback segment or two that it slows the whole thing down. So you might want to consider breaking up your inserts into smaller transactions and see if that helps your speed. I usually make the size of the commit

Re: Performance question

2008-01-09 Thread Christopher Lamey
=maxActive value=5 / property name=maxIdle value=2 / /bean bean id=sqlMapClient class=org.springframework.orm.ibatis.SqlMapClientFactoryBean property name=dataSource ref=dataSource / property name=configLocation ref=mapConfig / /bean -Original Message- From: Christopher Lamey [mailto

Re: Converting iBATIS DAO to Spring DAO in non-web application

2008-01-04 Thread Christopher Lamey
Yea, Spring is usually auto-init'd in a webapp, but for a standalone main() program, you need to init the context yourself. Here's an example with a classpath context: http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#bea ns-factory-instantiation Cheers, Chris On 1/4/08

Re: error after adding a field in table

2007-12-26 Thread Christopher Lamey
On 12/26/07 12:24 AM, Joni Tan [EMAIL PROTECTED] wrote: it's localhost_log.2007-12-26.txt log file, there is another log file localhost_examples_log.2007-12-26.txt but i think it's just an example log file and it doesn't have any exception hmm, i don't have exception caught like try and

Re: Best way to insert thousands of records

2007-12-17 Thread Christopher Lamey
Yea, that's immediately what I thought - don't go through Java. Each RDBMS has its own bulk import tool. Oracle has sqlldr, MS SQL Server has bc.exe, postgres has the copy statement. They are much much faster than going the JDBC at all. On 12/17/07 3:14 PM, Larry Meadors [EMAIL PROTECTED]

ResultMap groupBy with outer join

2007-12-10 Thread Christopher Lamey
Heya, I essentially have a star schema - a fact table with various detail tables hanging off of it. Each detail table has the fact_id as FK in it. Since not all the details will be filled out, I'm using an outer join to pull them in and the `groupBy=factId` on the resultMap. The problem I'm

Re: ResultMap groupBy with outer join

2007-12-10 Thread Christopher Lamey
creates the object that way. So yes, your options are a row handler or to post-process the data and check for empty null values in factId. Larry On Dec 10, 2007 11:12 AM, Christopher Lamey [EMAIL PROTECTED] wrote: Heya, I essentially have a star schema - a fact table with various detail

Re: Ibatis java.sql and log4j

2007-11-30 Thread Christopher Lamey
From the p6spy website: P6Log intercepts and logs the database statements of any application that uses JDBC. This application is particularly useful for developers to monitor the SQL statements... You could also use a profiler like Jprofiler or YourKit, both of which have the ability to log JDBC

Re: Parsing xml-Definition For Creating SqlMapClient

2007-11-28 Thread Christopher Lamey
The sqlmapclient is thread-safe, you can have multiple threads hit a single sqlmapclient instance with no problems. Read page 58 of the iBATIS PDF doc for details on threading and transactions. On 11/28/07 9:53 AM, Ralf Assmann [EMAIL PROTECTED] wrote: Hi there, creating a SqlMapClient

Re: encoding not supported-error using iBATIS with db2 on z/os

2007-11-21 Thread Christopher Lamey
It looks like the parameters to the sqlmap are in an encoding that the db doesn't support. Most likely an extended character in one encoding that isn't valid in another. What encoding is the db using? What encoding are the parameters coming in from? Java will use UTF-8 internally, but if

Re: Using Ibatis to stream results

2007-11-21 Thread Christopher Lamey
Hello, I regularly stream out gigs worth of xml without any trouble. Do do this, I use XStream and an object that implements RowHandler. The XStream object is just a member variable of the RowHandler that gets invoked in the handleRow() method. Something like this: public class

Re: encoding not supported-error using iBATIS with db2 on z/os

2007-11-21 Thread Christopher Lamey
are running our programm on z/os itself, the error also does not occur. Ralf Christopher Lamey schrieb: It looks like the parameters to the sqlmap are in an encoding that the db doesn't support. Most likely an extended character in one encoding that isn't valid in another. What encoding

Re: encoding not supported-error using iBATIS with db2 on z/os

2007-11-21 Thread Christopher Lamey
On 11/21/07 1:08 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In addition, I've worked with DB2 previously on a z/OS system utilizing the type driver supplied by IBM. The database was expecting EBCDIC and the data I was working with in the Java world was ASCII coming in from an XML

Re: Setting up user id, password for JDBC connection

2007-11-21 Thread Christopher Lamey
Try creating a properties object, setting the name/value pairs on that, and passing that into: public static SqlMapClient buildSqlMapClient(java.io.Reader reader, java.util.Properties props) Cheers, Chris On 11/21/07 2:15 PM, Ashish Kulkarni [EMAIL PROTECTED] wrote: Hi I am working on a

Re: proper use of start/endTransaction()

2007-11-12 Thread Christopher Lamey
Yes. If you call startT, you *always* need to call endT. On 11/12/07 12:23 PM, Toby Thain [EMAIL PROTECTED] wrote: On 12-Nov-07, at 4:21 PM, Christopher Lamey wrote: No, startT makes no claim (and most likely can't make such a claim) to clean up properly if it encounters an exception

Re: AW: unexpected ExceptionInInitializerError

2007-11-09 Thread Christopher Lamey
Can you do these commands in the root of your Tomcat install? find . -name *commons-logg*jar fina . -name *ibatis*jar So we know what jars are where. Also, what version of ibatis are you using? Cheers, Chris On 11/9/07 3:12 AM, Jeremy Jardin [EMAIL PROTECTED] wrote: Of course, I

Re: AW: unexpected ExceptionInInitializerError

2007-11-09 Thread Christopher Lamey
the code and then deploying to Tomcat? On 11/9/07 9:48 AM, Jeremy Jardin [EMAIL PROTECTED] wrote: all of those jars are in the WEB-INF/lib directory where the have to be ! Ibatis version2.2 ./.. Christopher Lamey wrote: Can you do these commands in the root of your Tomcat

Re: AW: unexpected ExceptionInInitializerError

2007-11-09 Thread Christopher Lamey
and re-configurate a new one.. Christopher Lamey wrote: Are there ibatis or commons-logging jars anywhere else in Tomcat besides WEB-INF/lib? For example, if you have an ibatis jar in the server/lib directory, it won't have visibility into WEB-INF/lib. And are you running Tomcat

Re: [OT] Crosspost: Facebook

2007-10-18 Thread Christopher Lamey
We'll need more information to help. To start with, what server, what is different between local and server runtimes, and what is the error (cut and paste the exception). On 10/18/07 1:44 PM, Chetan Nayak [EMAIL PROTECTED] wrote: Hi All , Im facing a vert strange problem ,Our

Re: Please Help

2007-10-18 Thread Christopher Lamey
We'll need more information to help. To start with, what server, what is different between local and server runtimes, and what is the error (cut and paste the exception). On 10/18/07 1:57 PM, Chetan Nayak [EMAIL PROTECTED] wrote: Hi All , Im facing a vert strange problem ,Our

Re: Please Help

2007-10-18 Thread Christopher Lamey
According to the logs you sent, the root cause is this: java.lang.UnsupportedOperationException: XMLType mapping only supported for Oracle RDBMS at com.cerner.clm.dao.sqlmap.XMLTypeHandlerCallback.getResult(XMLTypeHandlerCallb ack.java:69) Which I'm guessing is the one from here that you

Re: how to map huge resultsets?

2007-10-04 Thread Christopher Lamey
_ From: Jeff Butler [mailto:[EMAIL PROTECTED] Sent: Thursday, October 04, 2007 14:15 To: user-java@ibatis.apache.org Subject: Re: how to map huge resultsets? Your question is not that confusing. Here are the answers: 1. No (although the approach suggested by Christopher Lamey

Re: how to map huge resultsets?

2007-10-03 Thread Christopher Lamey
-Original Message- From: Christopher Lamey [mailto:[EMAIL PROTECTED] Sent: Wed 10/3/2007 11:06 PM To: user-java@ibatis.apache.org Subject: Re: how to map huge resultsets? Hello, You should take a look at the RowHandler interface and the queryWithRowHandler calls in SqlMapClient (page 61

Re: how to map huge resultsets?

2007-10-03 Thread Christopher Lamey
- From: Christopher Lamey [mailto:[EMAIL PROTECTED] Sent: Wed 10/3/2007 11:55 PM To: user-java@ibatis.apache.org Subject: Re: how to map huge resultsets? Hmm...I don't see how having an external framework prevents you from using a RowHandler. Your item provider could implement

Re: How to setup JNDI connection in ibatis

2007-09-27 Thread Christopher Lamey
Hello, You then need to add a ResourceLink either in conf/context.xml or in the webapp's specific context file (if you're using one). I don't know what version of Tomcat you're using, but here are the JNDI docs for 5.5: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html PS: I

Re: How to setup JNDI connection in ibatis

2007-09-27 Thread Christopher Lamey
to java:/comp/env/jdbc/AS400B and it works now I wish this was documented some where in ibatis, or it is and i have never read it Ashish On 9/27/07, Christopher Lamey [EMAIL PROTECTED] wrote: I think the use of the Resource element in the server.xml is the same as using the resource-ref

Re: How to setup JNDI connection in ibatis

2007-09-27 Thread Christopher Lamey
Well, that was easy: http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId= 12582997 On 9/27/07 10:46 AM, Christopher Lamey [EMAIL PROTECTED] wrote: How do I use a JNDI DataSource with iBATIS in Tomcat?

Re: Array or List in a ParameterClass

2007-09-25 Thread Christopher Lamey
Hello, Take a look at pages 49 and 50 of the developer's guide. It has examples of what you're trying to do. http://ibatis.apache.org/docs/java/pdf/iBATIS-SqlMaps-2_en.pdf Cheers, Chris On 9/25/07 11:45 AM, Felipe Maza [EMAIL PROTECTED] wrote: Hi, I'm trying send a array to ibatis

Re: TransactionManager thorowing NPE

2007-08-22 Thread Christopher Lamey
environment: DataSource dataSource = (DataSource) initCtx.lookup(java:DATASOURCE); Clinton -Original Message- From: Christopher Lamey [mailto:[EMAIL PROTECTED] Sent: August-16-07 8:43 AM To: user-java@ibatis.apache.org Subject: Re: TransactionManager thorowing NPE Well

Re: TransactionManager thorowing NPE

2007-08-16 Thread Christopher Lamey
Well, that looks ok. Could the transaction be closed or committed early, before the delete? On 8/16/07 6:12 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Pretty straight forwardI assume we are using some default Transaction Manager.. ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE

Re: Caching question

2007-08-09 Thread Christopher Lamey
The answer to that question and your previous one are both in the iBATIS SqlMaps PDF on page 42: http://svn.apache.org/repos/asf/ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2_e n.pdf Cheers, topher On 8/9/07 6:26 AM, avalerio [EMAIL PROTECTED] wrote: Thanks for the reply, one more question if

Re: Small problem with date.

2007-08-09 Thread Christopher Lamey
: Christopher Lamey [mailto:[EMAIL PROTECTED] Sent: woensdag 8 augustus 2007 22:07 To: user-java@ibatis.apache.org Subject: Re: Small problem with date. Ah, the joy of legacy systems. If you only have one SQL call that needs this, then I would write a new SELECT element in your sqlmap and call

Re: Question regarding Spring DAO

2007-08-09 Thread Christopher Lamey
You could try several things: Search your favorite search engine for ³spring ibatis example². Look at the jpetstore example in the Spring (with dependencies) distribution. Read the Spring docs, specifically the section on iBATIS. Search this mail list archive, here's on way to do that:

Re: Caching question

2007-08-08 Thread Christopher Lamey
You can use the: flushOnExecute statement=somequeryname/ To automatically flush a specific cache when a specific query is run. Cheers, Chris On 8/8/07 1:44 PM, avalerio1 [EMAIL PROTECTED] wrote: I've implemented the LRU caching model here's the config: cacheModel id=a-cache type =LRU

Re: Small problem with date.

2007-08-08 Thread Christopher Lamey
Ah, the joy of legacy systems. If you only have one SQL call that needs this, then I would write a new SELECT element in your sqlmap and call it through the DAO. Something like this in the sqlmap xml, where you reuse the abator result map: select id=search_by_date parameterClass=map

Re: public int executeBatch()

2006-06-02 Thread Christopher Lamey
On Thu, 2006-06-01 at 20:45 -0400, rs wrote: --- On Thu 06/01, Christopher Lamey [EMAIL PROTECTED] wrote: FWIW, BatchUpdateException is thrown if there's an exception during a batch update and has enough info for me to figure out what broke when. I'd be interested to find out more how

Re: public int executeBatch()

2006-06-01 Thread Christopher Lamey
Hello, I use executeBatch quite a bit and would not want to see it break backwards compatibility in a minor version release. FWIW, BatchUpdateException is thrown if there's an exception during a batch update and has enough info for me to figure out what broke when. The getUpdateCounts() method

RE: Not very useful error message

2006-05-24 Thread Christopher Lamey
Hello, You could do something like this: # find src/xml -name *.xml | xargs xmllint /dev/null xmllint would then write any errors, including the full path and file name, to non-redirected stderr. If you wanted the errors to go to a file: # find src/xml -name *.xml | xargs xmllint

Re: One query populating *multiple* lists per object returned

2006-05-12 Thread Christopher Lamey
Hello, The SqlMap PDF references a queryForList method in the SqlMapClient that takes a RowHandler and I think that's what you're referencing as well, but I don't see it in the code. Plus the docs say that the RowHandler interface gets passed a List along with an Object, but the RowHandler.java

two ?s

2006-05-10 Thread Christopher Lamey
Hello, I have a couple questions: 1) Is svn.apache.org, both HTTP and SVN, down? 2) Can I use the groupBy attribute of a resultMap to collapse down rows from a query that uses a bunch of outer joins? For example, I have a query hits a couple directly associated tables, a join table, and a

Re: two ?s

2006-05-10 Thread Christopher Lamey
, Christopher Lamey wrote: Hello, I have a couple questions: 1) Is svn.apache.org, both HTTP and SVN, down? 2) Can I use the groupBy attribute of a resultMap to collapse down rows from a query that uses a bunch of outer joins? For example, I have a query hits a couple directly associated

Re: two ?s

2006-05-10 Thread Christopher Lamey
Hello, It turns out the groupBy attribute references a property in the resultMap, not a column. Doh! It'd be nice if the iBATIS DataMapper PDF mentioned that on page 29 and used different names in the example on page 28 (rather than 'quarter' for everything). I'd be willing to put together a

Re: Can I use Hibernate 3.x with latest iBatis DAO?

2006-05-01 Thread Christopher Lamey
Hello, The one and only time I've used Hibernate, I think I saw that message when 3.x code resolved to a 2.x library. Is there a 2.x Hibernate library in your CLASSPATH somewhere before the 3.x library? If you're using JBoss, there's a 2.x hibernate deployer by default in

Re: iBatis performance FYI

2006-04-28 Thread Christopher Lamey
On Fri, 2006-04-28 at 10:07 -0600, Larry Meadors wrote: That is not to bad, for reference, I did a jdbc import of 180,674 records in 186.620s, which is only 1032/second. Any tips learned along the way that you'd like to share? Hello all, I would be very interested in hearing anyone's

Re: Survey - do you use Abator?

2006-04-05 Thread Christopher Lamey
at 09:39 -0600, Christopher Lamey wrote: On Tue, 2006-04-04 at 12:17 +0200, Davide Rogora wrote: Hi, I'm new to iBATIS and I'm going to start a new application for my company using it. One of my last doubt is: Should I use Abator to generate sqlmap files and classes? I have this doubt

Re: Survey - do you use Abator?

2006-04-04 Thread Christopher Lamey
On Tue, 2006-04-04 at 12:17 +0200, Davide Rogora wrote: Hi, I'm new to iBATIS and I'm going to start a new application for my company using it. One of my last doubt is: Should I use Abator to generate sqlmap files and classes? I have this doubt because I saw that JPetStore application has