Re: Logging?

2005-08-11 Thread max_lazzari
Thank you very much for the precious information ... I could have spent a couple of months to spot it by myself ;-) . Regards Max >-- Messaggio Originale -- >Reply-To: user-java@ibatis.apache.org >Date: Thu, 11 Aug 2005 12:15:20 -0500 >From: Jeff Butler <[EMAIL PROTECTED]> >To: user-java@ibatis.a

Re: Clob Issue

2005-08-11 Thread Nathan Maves
Steve, You almost had it! After checking the source code you just need to prepend "Driver." in front of your property name. // Additional Driver Properties prefix private static final String ADD_DRIVER_PROPS_PREFIX = "Driver."; So . ... Should do the trick. I

RE: Clob Issue

2005-08-11 Thread Steve Biondi
I've always used an external JDBC DataSource or a previously configured connection with iBatis, so I'm not exactly sure. From glancing at the SimpleDataSource code, you should be able to set the property as is in the JDBC section of the config file and it should get passed to the DataSource crea

Re: Clob Issue

2005-08-11 Thread Nathan Maves
Steve,How would one go about setting this property when using the jakarta connection pool build into ibatis?NathanOn Aug 11, 2005, at 5:13 PM, Steve Biondi wrote:Is this with Oracle? If so, the string can only be up to 4000 characters long if you use setString even if the underlying column is a

Re: SQLMaps and Web Services in the same application

2005-08-11 Thread Larry Meadors
Thanks! I added that to the WIKI... Larry On 8/11/05, Colin Lamond <[EMAIL PROTECTED]> wrote: > Hi, > > I thought I would update the list to the solution. > > I am using the Sun WSDK 1.6 (Web Service Development Kit) which is shipped > with JAXP 1.3. > > I am also running on J2SE 1.4, which in

Re: Passing a list as IN parameter to stored procedure

2005-08-11 Thread Larry Meadors
How would you do it with JDBC? Larry On 8/11/05, Rao, Satish <[EMAIL PROTECTED]> wrote: > > > Has anyone had success with passing a java.util.List as IN parameter to > stored procedure? > If yes, what would the jdbcType in the sqlmap and what would be the > corresponding declaration in store

N+1 Select with child elements stored in a map, not a list

2005-08-11 Thread Brian Yoffe
Ok, Best way to frame my question is in the context of the example on the wiki example located at: http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+get+a round+the+N+Plus+1+selects+problem%3F Now, I'm focusing on the part with the following text: When you call List myList =

RE: Clob Issue

2005-08-11 Thread Steve Biondi
Title: Clob Issue Is this with Oracle? If so, the string can only be up to 4000 characters long if you use setString even if the underlying column is a CLOB and you tell the driver that. With bigger strings, you need to use the CLOB-specific API stuff.   A nice workaround is to use the Or

Clob Issue

2005-08-11 Thread Craig Swift
Hello, Has anyone seen this type of error before when trying to use Clobs in IBatis? javax.servlet.ServletException: Error executing update. Cause: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in recognition/dao/ibatis/mapping/Nomination.xml. --- The error occurre

Re: stored procedures/functions

2005-08-11 Thread Denis Vladimirov
Thanks, now it works , I also had an error in my Java. Instead of getting the updated "result" object from the Map, I passed as a parameter to the getSqlMapClientTemplate().queryForObject( "getStringParameter", map); String result = (String) map.get("result"); I was trying to use the return objec

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
You are most welcome. Thank you for helping me to understand the proper use of iBatis Dao. :-)

Re: Multiple DaoManagers + transactions

2005-08-11 Thread Louis Letourneau
Actually, you made me reallise that I misread the code. The contextInTransactionList kept in the StandardDaoManager in non-static ThreadLocal. non-static is the keyword here. Which means that each DaoManager will have their instances of the context. But, it also means, that each of DaoManager i

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
WOW. Sometimes it is amazing the kind of requirement people have. There is so much to learn and see. Thanks for taking your time replying. Prashanth Sukumaran. --- Hycel Taylor <[EMAIL PROTECTED]> wrote: > I forgot to put the daoManager.commit(), in my example. > > The business requireme

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
I forgot to put the daoManager.commit(), in my example. The business requirement: Actually, my code is a lot more complicated than the three dao's that I am using in my example. There are actually nine Dao's being used in this particular batch. I'm iterating over 500,000 records and I'm commit

Re: Multiple DaoManagers + transactions

2005-08-11 Thread Prashanth Sukumaran
Hi Louis, Logically it should not. Coz., they are two different instances. Each DAOManger will have their own Connection object when they started respective transactions. So the commit will happen respectively connection objects. Right. For ex., when you say startTransaction() deep inside th

Multiple DaoManagers + transactions

2005-08-11 Thread Louis Letourneau
Hello, I'm trying to understand the problems/issues of using multiple DaoManagers in the same application. Say I have 2 jars: MyApp.jar TheirLib.jar Both use Ibatis DAO. So, somewhere in their initialization, each makes a call to DaoManagerBuilder.buildDaoManager(...) and keeps their DaoManag

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
Yah cool. You could do that. You would want to commit the transaction. Seeing the way you code i am sure you have considered this, but one question So all these must be under one transaction and in batch mode. So, even if one fails you want all to fail(not commit). Is that the business requi

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
I want to make sure I'm understanding how to use iBatis batching correctly. I understand now that SqlMapDaoTemplate, contains the method, startBatch() and execute batch. My Dao will extend SqlMapBaseDao which extends SqlMapDaoTemplate. So, since my Dao's are sharing the same daoManager, if I sta

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
Good Advice. Thanks.

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
Hi, But it is nothing. public class BaseSqlMapDao extends SqlMapDaoTemplate { protected static final int PAGE_SIZE = 4; public BaseSqlMapDao(DaoManager daoManager) { super(daoManager); } } you can directly use SqlMapDaoTemplate instead. I always follow a good habit of adding a bas

Re: sql include #

2005-08-11 Thread Eric Blue
Henry, You should be able to escape the column with another #.  See: http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+use+POUND+or+DOLLAR+symbols+in+my+queries%3F On 8/11/05, Henry Lu <[EMAIL PROTECTED]> wrote: How do I use a SQL statemen including a column name with #:EXamp

sql include #

2005-08-11 Thread Henry Lu
How do I use a SQL statemen including a column name with #: EXample: select emp#, empName from emp; -Henry

Re: Logging?

2005-08-11 Thread Jeff Butler
FYI...I just added a FAQ entry on the Wiki about configuring logging in WebSphere:   http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+Configure+Logging+in+WebSphere   Jeff Butler  

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
I see! This is what I needed to know. Thanks again!

Passing a list as IN parameter to stored procedure

2005-08-11 Thread Rao, Satish
Title: Passing a list as IN parameter to stored procedure Has anyone had success with passing a java.util.List as IN parameter to stored procedure? If yes, what would the jdbcType in the sqlmap and what would be the corresponding declaration in stored procedure? If this cannot be accomplis

RE: How do I do batch processing with IBatis DAO

2005-08-11 Thread Rafiq, Adnan
We just created a BaseSqlMapDao (extends SqlMapDaoTemplate) (similar to the petstore one) for our project. -Original Message- From: Hycel Taylor [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 11:21 AM To: user-java@ibatis.apache.org Subject: Re: How do I do batch processing wit

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
>From what I understand, looking at your source code, it appears that the batching is handled by, BaseSqlMapDao. As best I can tell, this is not a standard IBatis Class. It's package structure is the following: java.lang.Object com.ibatis.dao.client.template.DaoTemplate com.ibatis.dao.cl

Re: Setting null in a lazy-load object.

2005-08-11 Thread Clinton Begin
There's nothing that iBATIS can do in this regard.  But you could create a dynamic proxy (see CGLIB) for the class that holds the property, and you can write the code to check for null and load on demand. However you must be dealing with absolutely ENORMOUS objects or MILLIONS of them to worry ab

Re: How do I do batch processing with IBatis DAO

2005-08-11 Thread Prashanth Sukumaran
Hi Hycel, I don't know if this will answer your question but i will try. My DAO is defined this way public class ShopSqlMapDao extends BaseSqlMapDao implements ShopDao Just like in the JPetStore application. When executing in batch mode i do this. try { startTransaction();

Re: flashing the cache

2005-08-11 Thread Clinton Begin
Just call sqlMapClient.flushDataCache(); or sqlMapClient.flushDataCache(cacheId); Not sure that it's any more complex than that. Clinton On 8/9/05, Steven Pannell <[EMAIL PROTECTED]> wrote: Hi,I use the oscache with my data queries and am wondering if there is anyway Ican force flush the cache b

Re: Logging?

2005-08-11 Thread Jeff Butler
Even though iBATIS 2.1.5 is not dependant on JCL, it will use JCL if it finds it in the classpath.  WebSphere supplies JCL in the application server classpath.  QED - iBATIS running on WebSphere will always use JCL for logging.   Adding log4j to the WEB-INF\lib directory has no effect (as you well

RE: stored procedures/functions

2005-08-11 Thread Priyesh Mashelkar
jdbcType should be VARCHAR and not VARCHAR2 i suppose. -Original Message- From: Denis Vladimirov [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 4:58 PM To: user-java@ibatis.apache.org Subject: stored procedures/functions Hi there, I am trying to make a call to a stored Oracle

stored procedures/functions

2005-08-11 Thread Denis Vladimirov
Hi there, I am trying to make a call to a stored Oracle function and I get the following error. What am I doing wrong? Or what is the best and simple way to call stored functions? Error === The error occurred while executing query procedure. --- Check the {? = c

How do I do batch processing with IBatis DAO

2005-08-11 Thread Hycel Taylor
Hi, I apologize, if this is the second time my email appears on the forum. I didn't see the first one show up after I posted it and this is my first time posting on this forum. Also, the first time I posted this email, there were '3D' characters all in my code example. I don't know how they got

RE: SQLMaps and Web Services in the same application

2005-08-11 Thread Colin Lamond
Hi, I thought I would update the list to the solution. I am using the Sun WSDK 1.6 (Web Service Development Kit) which is shipped with JAXP 1.3. I am also running on J2SE 1.4, which includes JAXP1.1. JAXP 1.1 and 1.3 are not compatible at all as they come from completely different code bases.

Re: Logging?

2005-08-11 Thread max_lazzari
Hi Prashanth, I've tried to remove all "unnecessary" lines from the log4j.properties file but nothing changed. At the moment this is my configuration: *** LIBs in project classpath *** - commons-logging-api.jar - commons-logging.jar - log4j.1.2.11.jar *** log4j.properties file *** # Global loggin