Re: [JNDI] datasource on remote server

2005-10-26 Thread Eugeny N Dzhurinsky
On Tue, Oct 25, 2005 at 10:23:54AM -0500, Jeff Butler wrote: > Hmmm...another undocumented feature :( > From browsing through the source code, it looks like you can do this: > > > value="urlToYourProvider"/> > > Any property with the prefix "context." will be passed to the constructor > of

calling trim() on sql map returned strings

2005-10-26 Thread Gareth Moorst
Before acting on this e-mail or opening any attachments you are advised to read The Caudwell Holdings group of companies' disclaimer at the end of this e-mail. === Hi All my iBatis created objects have large amounts of spaces in their string p

RE: calling trim() on sql map returned strings

2005-10-26 Thread Gareth Moorst
Before acting on this e-mail or opening any attachments you are advised to read The Caudwell Holdings group of companies' disclaimer at the end of this e-mail. === It would appear that I didn't make myself at all clear in that last email - it m

Re: calling trim() on sql map returned strings

2005-10-26 Thread Daniel Henrique Ferreira e Silva
Hi Gareth, Doesn't Informix have a trim-like function you could apply in your query? Like: select trim(mycolumn) as mycolumn from mytable Doing that kind of stuff in the database is the best pick IMHO. Cheers, Daniel Silva. On 10/26/05, Gareth Moorst <[EMAIL PROTECTED]> wrote: > Before acting

cacheModel question

2005-10-26 Thread Rao, Satish
Title: cacheModel question Does cacheModel only work with resultClass and resultMap? Currently I have the following entry in the sqlMap                                                 {call PROC_NAME(?,?)}     The stored

how to map unsigned bigint in MySql to long value

2005-10-26 Thread Siming Weng
Hi, I'm trying to map a table field of unsigned bigint to long value in java. But it always give wrong numbers looks like being overflow. Pure JDBC code can return the correct value. JDBC documenation says RecordSet.getObject(int columnIndex) will return a java.math.BigInteger if the field is uns

Re: [JNDI] datasource on remote server

2005-10-26 Thread Jeff Butler
It's totally dependant on your application server:   On WebSphere, it's like this:    java.naming.provider.url="">      (remote_port is often 2809 on WebSphere)   On WebLogic, it's like this:    java.naming.provider.url="">      (remote_port is often 7001 on WebLogic)   Your application server's

How to set up a select map

2005-10-26 Thread Rajah_Mithra
Hi, I want to do a pattern matching search on the database; for e.g select all rows that have text "ab" in them. The text can occur independantly or embedded. How do I do a pattern matching Select with the IBATIS map? Thanks, Mithra Rajah

Re: how to map unsigned bigint in MySql to long value

2005-10-26 Thread Jeff Butler
iBATIS does not have a type handler for BigInteger - because there is no "getBigInteger()" method on a result set.  iBATIS will call getObject() if it doesn't know what the data type is (i.e. if you use a Map as a result, or if the property in your result class is of type Object) - then you could c

Re: how to map unsigned bigint in MySql to long value

2005-10-26 Thread Siming Weng
I'll have a go later. Thank you for the quick response. On 10/26/05, Jeff Butler <[EMAIL PROTECTED]> wrote: > iBATIS does not have a type handler for BigInteger - because there is no > "getBigInteger()" method on a result set. iBATIS will call getObject() if > it doesn't know what the data type i

Re: How to set up a select map

2005-10-26 Thread Larry Meadors
Three ways: 1) Use "where value like #property# and put the pattern in your property. 2) Use "where value like '%' || #property# || '%'and put the value in your property. 3) Use "where value like '%$property$%" and put the value in your property. The last option will open you you up to SQL inje

RE: calling trim() on sql map returned strings

2005-10-26 Thread Gareth Moorst
Before acting on this e-mail or opening any attachments you are advised to read The Caudwell Holdings group of companies' disclaimer at the end of this e-mail. === So it does... I hadnn't spotted that. One downside of doing it that way is that

RE: How to set up a select map

2005-10-26 Thread Rajah_Mithra
Thanks a  lot! It works.   I had another question as well. I want to select a full table of data; (Select * from User) . How can I collect the result? (I have a class & beans for each row & an array list to store the rows).   Thanks,   Mithra Rajah   From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: calling trim() on sql map returned strings

2005-10-26 Thread Ron Grabowski
IBatisNet has support for replacing the built-in type handlers: TrimStringTypeHandlerCallback could be implemented in such a way that it automatically calls trim() before sending values to the database. You could continue to use the normal #property# syntax without having to specify the ty

RE: calling trim() on sql map returned strings

2005-10-26 Thread Gareth Moorst
That's interesting... I'll have a look at that tomorrow- The sqlmapconfig dtd does have a typehandler child.. Cheers -Original Message- From: Ron Grabowski [mailto:[EMAIL PROTECTED] Sent: 26 October 2005 17:13 To: [email protected] Subject: RE: calling trim() on sql map returne

RE: calling trim() on sql map returned strings

2005-10-26 Thread Ron Grabowski
Custom type handler support has been around for a while. One draw back is that you can't say "use this type handler for all strings". You have to specify the special type handler per each item in your parameterMap/resultMap. A lot of people don't use parameter maps. Its a pain to have to specify a

Re: calling trim() on sql map returned strings

2005-10-26 Thread Nathan Maves
why could you not just put this logic into your POJO. example public void setThePropertyThatNeedsToBeTrimmed(String property) { this.property = property.trim(); } On Oct 26, 2005, at 10:23 AM, Ron Grabowski wrote: Custom type handler support has been around for a while. One draw back

Re: dataSource simple or dbcp?

2005-10-26 Thread Clinton Begin
I think it is.  :-) It's a 3 year old piece of code, with nearly no bug reports.  So it's pretty darn stable.  The other nice thing is that it doesn't spawn threads or anything crazy.   So it's predictable and solid.  Try it out to see what you think. Cheers, Clinton On 10/20/05, Zsolt Koppany <

Re: update() accepts ?

2005-10-26 Thread Clinton Begin
Yes, ibatis allows you to call inserts or updates regardless of the XML element used...the primary reason is that some people need to call update() on selects. Consider them separate intentions.  One is a descriptive XML document synax, the other is a descriptive Java  syntaxeven if they m

Re: java.net.SocketException: Unexpected end of file from server

2005-10-26 Thread Clinton Begin
Looks like a messed up XML parser can you use Xerces or the JDK parser instead of the Oracle one? ClintonOn 10/24/05, Jani Lall <[EMAIL PROTECTED]> wrote: Hi!I am using iBATIS with Oracle OC4J and when I am trying to readSqlMapConfig file AS throws exception mentioned in subject. The log look

Cache w/ Hierarchical ResultMaps

2005-10-26 Thread reubenf
Hello, I found that the cache doesn't behave exactly as I'd have expected; I'm using an LRU cache. Is there a way that I can configure it to behave as I'd like? I have a hierarchical object tree, mapped using ResultMaps: ... ... I am caching A. It looks like all of the Bs that belong to A

Re: How to set up a select map

2005-10-26 Thread Daniel Henrique Ferreira e Silva
Hi Mithra, 1) Create a result-map from your expected resultset to your bean. Like: map your resultset fields to bean properties here 2) Create the statement: select * from User 3) In your java code do this: List allUsers = queryForList("getAllUse

Multiple Statements in one transaction/command

2005-10-26 Thread H.E. Sum
What's a good pattern to perform multiple statements on a single DAO method. Suppose I have a bunch of "User" objects each containing a list of "Group" objects. Right now I'm doing the following: (Pseudocode) AddUser(User) { [BeginTransaction] Mapper.Instance().Insert("InsertUser", user); f

Re: how to map unsigned bigint in MySql to long value

2005-10-26 Thread Siming Weng
Hi, The problem still exists. Here's my situation: I have a field in table in MySQL, unsigned bigint(20) time_stamp I have a result class which has a member "private long timeStamp" ... ... the value in database is 1428387426 whose binary format is 1010101001000110111011001100010 the value in

Re: Paginated List Problem in Ibatis

2005-10-26 Thread Sabyasachi Biswas
Hi Larry,   Thank You for your response.   I have a instance variable Paginated List , that all my methods use . There are a large number of methods that use this Paginated List object. I had thought it would not be feasible by making so many objects of The Paginated List in each of my methods.   A