Execute in the same transaction

2010-01-26 Thread Tom Henricksen
I'm calling the select statement selectTestObject in a transaction but it is very surprising that select="TEMPVsp.selectById" runs on a different connection. Is there a way that select="TEMPVsp.selectById" executes in the same transaction as selectTestObject.

RE: how to write Sql query in system out or to a log using ibatis?

2010-01-28 Thread Tom Henricksen
Use something like log4j and add something like this to your log4j.xml. You will get something like this: java.sql.PreparedStatement - {pstm-100028} Executing Statement: SELECT * FROM EMP WHERE EMPNAME = ? java.sql.PreparedStatement - {pstm-100028} Para

ConfigureAndWatch in Java iBatis

2007-01-26 Thread Tom Henricksen
A co-worker of mine who use's the iBatis .Net mentioned the ConfigureAndWatch method. They can change xml files and the server dynamically picks up the changes. .Net Sample Code: Protected Shared Sub InitMapper() Dim handler As New ConfigureHandler(AddressOfConfigure)

SQLMAP loading

2007-01-31 Thread Tom Henricksen
We run our application on Websphere 5.1 and are getting heapdumps. I was going through the IBM HeapAnalyzer to pin point possible memory leak suspects. One of the suspects is the HashMaps created from iBatis(2.1.5) when we load up all our sqlMap xml files. This made me wonder whether we are doin

RE: SQLMAP loading

2007-01-31 Thread Tom Henricksen
EMAIL PROTECTED] Sent: Wednesday, January 31, 2007 9:44 AM To: user-java@ibatis.apache.org Cc: user-java@ibatis.apache.org Subject: Re: SQLMAP loading At what point are you getting these heap-dumps? While executing a query, or during your load of the ibatis config files? -Ayan "Tom

Insert using select for values

2007-02-02 Thread Tom Henricksen
We are using Insert with select to populate the values. We are using the select for most of the values but there are a few that we try to pass in. The variables seem to be the problem. We are using iBatis(2.1.5). We also use p6spy (captures all SQL to log) and when we take the SQL insert and ru

RE: Insert using select for values

2007-02-02 Thread Tom Henricksen
select for values DB2 SQLSTATE 42610 means "A parameter marker is not allowed" My guess is that DB2 is complaining about the parameters in the select list (enteredBy, enteredDate, etc.) Try changing to simple substitution ($enteredBy$, $enteredDate$, etc.) Jeff Butler

RE: Insert using select for values

2007-02-02 Thread Tom Henricksen
rm that Date object into a properly formatted string for DB2 - like you used in your hardcoded example. Jeff Butler On 2/2/07, Tom Henricksen <[EMAIL PROTECTED]> wrote: We tried that and that works for everything but the date fields. The date is coming across Fri Feb 02 09:42:11

number of Initial connections

2007-02-22 Thread Tom Henricksen
We have a problem where we exceed our maximum connections on our database. Our setup is here. Does MaximumIdleConnections mean that the database right away grabs 25 connections? Or is that the maximum idle connections before it starts to clean up? I see in the iBatis-SqlMaps-2.pdf it says Pool.

Group By and a Union, possible collision.

2007-04-10 Thread Tom Henricksen
We are using a groupBy in our query for a report. In this query there is a union. The union is for two different tables and there is a possibility of a collision of the dispensingId that we are grouping on. So we could have dispensingId from table one of 50001 and a dispensingId of 50001 from tab

RE: Group By and a Union, possible collision.

2007-04-10 Thread Tom Henricksen
Subject: Re: Group By and a Union, possible collision. I would assume that it will not handle it in the way you would like. How could it expect to know the difference. They in-fact have the same id I could be wrong, so don't take my word for it. Nathan On 4/10/07, Tom Henricksen &l

callback hooks

2007-05-07 Thread Tom Henricksen
We are trying to do some diagnostic work on our iBatis code. We basically want to pinpoint slow running queries. Is there anything in the API we could have call back to our code to tell us the actual query running or giving us any timing information? Thanks, Tom

Trying to use iBatis's connection

2007-05-09 Thread Tom Henricksen
We are adding some non iBatis code and trying to tap in to the iBatis connection for some code analysis purposes. This works when we run our code but through builds unit test we get an exception. Here is some code examples: Connection connection = mapSession.getCurrentConnection(); if (co

Transaction started

2007-05-09 Thread Tom Henricksen
I have some code that could be called when a transaction is already started or when there isn't one. I was hoping for some like SqlMapSession.transactionStarted() and then call SqlMapSession.startTransaction() if it isn't or tap into the existing one somehow. Is this possible or maybe there is a

iBatis without Bind variables?

2007-05-10 Thread Tom Henricksen
and if you had any suggestions. I understand bind variables are a good thing. This just seems like the exception to the rule where they or the database isn't doing the correct thing. Thanks, Tom Henricksen Consultant Advanced Technologies Group, Inc.

Trying to upgrade iBatis

2007-05-17 Thread Tom Henricksen
We are currently using iBatis 2.0.9( I know we are a little behind). I would like to get to the current version(2.3.0). I have tried 2.0.9b and 2.1.5 and get the following exception com.ibatis.common.exception.NestedRuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletExcepti

RE: Trying to upgrade iBatis

2007-05-17 Thread Tom Henricksen
I apologize this error is happening on the line after the one I mentioned. Here is the code. singleton = SqlMapClientBuilder.buildSqlMapClient(reader); Thanks, Tom -Original Message- From: Tom Henricksen [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 10:45 AM To

RE: newbie - Java Heap

2007-06-20 Thread Tom Henricksen
Does this occur right on startup or after your application runs for awhile? We have experienced a similar issue with Websphere after our application has run for a while. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 20, 2007 9:10 AM To: use

iBatis upgrade issue

2007-07-18 Thread Tom Henricksen
that would cause such an exception? Could this be related to? http://issues.apache.org/jira/browse/IBATIS-357 I can run this unit test by itself through Eclipse. I only get this during my automated Ant build and test. Thanks, Tom Henricksen Consultant Advanced Technologies Group

javaTypes and jdbcTypes in result maps

2007-07-26 Thread Tom Henricksen
-javaType-tf2048046.html#a5 748022 According to this they may help performance and are useful in resultMaps, correct? Thanks, Tom Henricksen Consultant Advanced Technologies Group, Inc.

RE: javaTypes and jdbcTypes in result maps

2007-07-27 Thread Tom Henricksen
found no discernable performance difference either way. As with all performance claims - your milage may vary. It's best to try it out in your environment to verify. Jeff Butler On 7/26/07, Tom Henricksen <[EMAIL PROTECTED]> wrote: A co-worker who uses the .Net versio

iBatis cleanup

2007-10-05 Thread Tom Henricksen
void stopService() { //Get ready for garbage collection singleton = null; reportingClientSingleton = null; nestedTransactionSingleton = null; } We have some memory leaks from our Websphere production environment and I just want tidy things up. Thanks, Tom

sub-selects causing row level locking error

2007-10-12 Thread Tom Henricksen
sing 2.2.0 and 2.3.0. Did iBatis previously run these sub-select within the same SqlMapSession or did it add some isolation level options to the query? Thanks, Tom Henricksen Consultant Advanced Technologies Group, Inc.

Differences in versions

2007-10-25 Thread Tom Henricksen
to change with the new version? Thanks, Tom Henricksen Consultant Advanced Technologies Group, Inc.

RE: Differences in versions

2007-10-25 Thread Tom Henricksen
map client directly. IMHO this is preferred. We don't think that the session stuff is well understood in general and usually unneeded. Jeff Butler On 10/25/07, Tom Henricksen <[EMAIL PROTECTED]> wrote: We recently upgraded our application to use iBatis 2.3.0. We used to use 2.0.

RE: Ibatis java.sql and log4j

2007-12-03 Thread Tom Henricksen
P6spy is pretty easy to setup. http://www.p6spy.com/documentation/index.htm from what I remember you basically point your system to there driver driver=com.p6spy.engine.spy.P6SpyDriver Then setup the spy.properties to point to your drvier. # ibm db2 driver # realdriver=COM.i

RE: Ibatis java.sql and log4j

2007-12-03 Thread Tom Henricksen
And yes it will capture your SQL Here is some of our output in our console p6spy - 1196689443367|0|2|statement||select * from sysibm.SYSDUMMY1 -Original Message- From: Tom Henricksen [mailto:[EMAIL PROTECTED] Sent: Monday, December 03, 2007 7:42 AM To: user-java@ibatis.apache.org

optimal datasource

2008-03-03 Thread Tom Henricksen
Is it best from an optimization standpoint to use the JNDI data source? We currently develop on Tomcat and deploy to WebSphere and use the Simple datasource. Would it be beneficial to use the JNDI to optimize the datasource? Thanks, Tom Henricksen Consultant Advanced

Ping query

2008-03-03 Thread Tom Henricksen
ed to verify. Thanks, Tom Henricksen Consultant Advanced Technologies Group, Inc. 1601 48th Street, Suite 220 West Des Moines, IA 50265 * Office: (515) 221-9344 Ext 138 * Fax: (515) 221-1266 * Email: [EMAIL PROTECTED]

queryForList/Map/Object... rollbacks

2008-03-04 Thread Tom Henricksen
ssume it is better to not have commitRequired? Thanks for your time. Tom Henricksen Consultant Advanced Technologies Group, Inc.

RE: queryForList/Map/Object... rollbacks

2008-03-04 Thread Tom Henricksen
application with CMT, or just a web application? Have you read the information in the WIKI about configuring iBATIS on WebSphere? http://opensource.atlassian.com/confluence/oss/display/IBATIS/Environmen t+Specific+Information Jeff Butler On Tue, Mar 4, 2008 at 3:32 PM, Tom Henricksen

Websphere and iBatis Configuration

2008-03-15 Thread Tom Henricksen
We are setting up our application to use Websphere's JDBC connection. When we setup this in Websphere in version 5.1 we needed to add the commitRequired=true to get it to work. Although in our Websphere 6.1 server we didn't have to add this. Would it be a good idea to use this? Do most

iBatis - tomcat JNDI setup

2008-03-26 Thread Tom Henricksen
pplication web.xml jdbc/medical jdbc/medical javax.sql.DataSource Container Any suggestions? Thanks in advance, Tom Henricksen Consultant Advanced Technologies Group, Inc. 1601 48th Str

RE: iBatis - tomcat JNDI setup

2008-03-26 Thread Tom Henricksen
xml. On 3/26/08 3:17 PM, "Tom Henricksen" <[EMAIL PROTECTED]> wrote: > I am trying to setup Tomcat JNDI to work on our application with iBatis. > > I get the following error: > > > > java.lang.RuntimeException: Error occurred. Cause: > com.ibatis.comm

RE: iBatis - tomcat JNDI setup

2008-03-27 Thread Tom Henricksen
te.java:615) Thanks, Tom -Original Message- From: Tom Henricksen [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2008 9:09 PM To: user-java@ibatis.apache.org Subject: RE: iBatis - tomcat JNDI setup I tried following: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

RE: iBatis - tomcat JNDI setup

2008-03-27 Thread Tom Henricksen
ur whole SqlMapConfig.xml? On 3/27/08 6:47 AM, "Tom Henricksen" <[EMAIL PROTECTED]> wrote: > I tried what you suggested (removing the entry from web.xml and the > resource link from the context.xml) and I now get this error message > from my application. > > org

RE: iBatis - tomcat JNDI setup

2008-03-27 Thread Tom Henricksen
;); Connection conn = ds.getConnection(); System.out.println("DB Version : " + conn.getMetaData().getDatabaseMajorVersion()); conn.close(); That way you'll know if it's a Tomcat or iBATIS issue. On 3/27/08 10:18 AM, "Tom Henricksen" <[EMAIL PROTECTED]> wrot

RE: iBatis - tomcat JNDI setup

2008-03-27 Thread Tom Henricksen
ava:5 20) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:198) -Original Message- From: Tom Henricksen [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 2:36 PM To: user-java@ibatis.apache.org Subject: RE: iBatis - tomcat JNDI setup I will make a serv

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

2008-04-01 Thread Tom Henricksen
do DB unit test in this situation? I am open to any ideas. Thanks, Tom Henricksen Consultant Advanced Technologies Group, Inc. 1601 48th Street, Suite 220 West Des Moines, IA 50265 * Office: (515) 221-9344 Ext 138 * Fax: (515) 221-1266 * Email: [EMAIL PROTECTED]

IBATIS-458 and deadlock or timeout

2008-07-15 Thread Tom Henricksen
Thanks, Tom Henricksen Consultant Advanced Technologies Group, Inc.

Obsfucation in iBatis xml file

2006-06-21 Thread Tom Henricksen
We are working on looking into code obfuscation for Java application.  Is there some way to obfuscate the iBatis xml file?  My guess is probably not as this would be very difficult. Thanks, Tom