RE: how to map huge resultsets?

2007-10-04 Thread robert.kasanicky
Seems like my question was quite confusing, so I'll try to explain what
I need once again from scratch.

1. I need to process a potentially huge number of rows (so
queryForList(query) is not an option because it would try to load all
objects into memory at once).

2. I need to control the iteration over the query results, so I can't
use queryWithRowHandler (in this case iBATIS iterates and I only tell
iBATIS how each record should be processed - I need to be able to ask
iBATIS for the next record instead - it is the internal vs. external
iterator difference, or SAX vs. StAX in case of XML processing or how
collections are typically iterated in ruby/groovy vs. Java or ... you
name it). Simply framework iterates, iBATIS knows the query and must
provide next record when it is asked for it.

First approach:
It is possible to implement these requirements by using
queryForList(query, skipSize, maxSize) and  query the database
TOTAL_ROW_COUNT / maxSize times (issuing a new query when records from
current list have been processed - this is invisible to the user
(framework) who just iteratively asks for next record for processing).

Second approach:
Hibernate allows to get a ScrollableResults object for a query allowing
the user to move the cursor and ask for an object that corresponds to
the current row. 

Questions:
1. is the second approach possible with iBATIS?
2. first vs. second approach pros  cons?

Thanks 
Robert

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Larry Meadors
Sent: Thursday, October 04, 2007 01:18
To: user-java@ibatis.apache.org
Subject: Re: how to map huge resultsets?

I'm confused, how would grabbing chunks of a huge result set be more
efficient than grabbing the records by PK?

Couldn't you just have a select that grabbed the requested item, and
passed it back to the consumer?

Larry


On 10/3/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 My problem with RowHandler is that iBATIS controls the iteration. I
just say

 sqlMap.queryWithRowHandler (getAllItems, rowHandler);

 and all items get processed by the rowHandler.

 But in my case I need to make iBATIS return items one-by-one when it
is asked to do so because the framework controls the iteration.
 This is a very simplified basic logic of the framework:

 while (itemProvider.hasNext()) {
  Object item = itemProvider.next();
  process(item);
 }



 -Original Message-
 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 the RowHandler
interface and
 the external code wouldn't know or care about it.  Or your item
provider
 could wrap something that does implement RowHandler so the external
code
 doesn't know it exists.  The main point is that you can pull mapped
objects
 on a row by row basis from the database.

 How is a RowHandler different that what you were describing in your
first
 mail?

 On 10/3/07 3:33 PM, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:

 
  Thanks for your reply.
 
  I can't use the rowhandler callback because the iteration is
external to
  iBATIS. In my case a batch framework iteratively asks for an item
and
  processes it - and I am trying to implement an iBATIS item provider
(I realize
  now I should have explained this in the initial post).
 
  Robert
 
 
  -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 of the pdf).
Basically,
  the RowHandler gets invoked for every row returned rather than
mapping all
  the rows into objects in a collection.
 
  Cheers,
  Chris
 
 
  On 10/3/07 2:37 PM, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I am wondering whether it possible to implement the following
scenario with
  iBATIS:
 
 1. run an iBATIS-managed select
 2. get a scrollable result set instead of a list of mapped
objects
 3. manually scroll the result set and ask iBATIS for object
corresponding
  to current row
 
  Hibernate provides this possibility
  (http://www.hibernate.org/hib_docs/reference/en/html/batch.html) so
I thought
  it would be feasible with iBATIS too, but I couldn't figure out a
way. The
  motivation is a batch scenario where the select returns a huge
number of rows
  so all mapped objects can't be loaded into memory at once.
 
  The iBATIS way I am aware of is to use queryForList(String
statementName, int
  skipResults, int maxResults), but this means querying the database
  (TOTAL_NUMBER_OF_ROWS / maxResults) times.
 
  Can somebody give advice about pros  cons of the two approaches?
 
  Thanks
  Robert
 
 
  This message is for the 

Re: how to map huge resultsets?

2007-10-04 Thread Jeff Butler
Your question is not that confusing.  Here are the answers:

1. No (although the approach suggested by Christopher Lamey is *very* close
if you are willing to shift your paradigm)

2. If the result set is truly huge, then approach #1 is a bad idea because
iBATIS will have to read through huge amounts of data to get to the latter
parts of the result set in subsequent calls (this is why Larry asked about
selecting by primary key rather than returning such a huge result set)

I guess you'll have to stick with Hibernate :)

Jeff Butler


On 10/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 Seems like my question was quite confusing, so I'll try to explain what
 I need once again from scratch.

 1. I need to process a potentially huge number of rows (so
 queryForList(query) is not an option because it would try to load all
 objects into memory at once).

 2. I need to control the iteration over the query results, so I can't
 use queryWithRowHandler (in this case iBATIS iterates and I only tell
 iBATIS how each record should be processed - I need to be able to ask
 iBATIS for the next record instead - it is the internal vs. external
 iterator difference, or SAX vs. StAX in case of XML processing or how
 collections are typically iterated in ruby/groovy vs. Java or ... you
 name it). Simply framework iterates, iBATIS knows the query and must
 provide next record when it is asked for it.

 First approach:
 It is possible to implement these requirements by using
 queryForList(query, skipSize, maxSize) and  query the database
 TOTAL_ROW_COUNT / maxSize times (issuing a new query when records from
 current list have been processed - this is invisible to the user
 (framework) who just iteratively asks for next record for processing).

 Second approach:
 Hibernate allows to get a ScrollableResults object for a query allowing
 the user to move the cursor and ask for an object that corresponds to
 the current row.

 Questions:
 1. is the second approach possible with iBATIS?
 2. first vs. second approach pros  cons?

 Thanks
 Robert

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Larry Meadors
 Sent: Thursday, October 04, 2007 01:18
 To: user-java@ibatis.apache.org
 Subject: Re: how to map huge resultsets?

 I'm confused, how would grabbing chunks of a huge result set be more
 efficient than grabbing the records by PK?

 Couldn't you just have a select that grabbed the requested item, and
 passed it back to the consumer?

 Larry


 On 10/3/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  My problem with RowHandler is that iBATIS controls the iteration. I
 just say
 
  sqlMap.queryWithRowHandler (getAllItems, rowHandler);
 
  and all items get processed by the rowHandler.
 
  But in my case I need to make iBATIS return items one-by-one when it
 is asked to do so because the framework controls the iteration.
  This is a very simplified basic logic of the framework:
 
  while (itemProvider.hasNext()) {
   Object item = itemProvider.next();
   process(item);
  }
 
 
 
  -Original Message-
  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 the RowHandler
 interface and
  the external code wouldn't know or care about it.  Or your item
 provider
  could wrap something that does implement RowHandler so the external
 code
  doesn't know it exists.  The main point is that you can pull mapped
 objects
  on a row by row basis from the database.
 
  How is a RowHandler different that what you were describing in your
 first
  mail?
 
  On 10/3/07 3:33 PM, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
 
  
   Thanks for your reply.
  
   I can't use the rowhandler callback because the iteration is
 external to
   iBATIS. In my case a batch framework iteratively asks for an item
 and
   processes it - and I am trying to implement an iBATIS item provider
 (I realize
   now I should have explained this in the initial post).
  
   Robert
  
  
   -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 of the pdf).
 Basically,
   the RowHandler gets invoked for every row returned rather than
 mapping all
   the rows into objects in a collection.
  
   Cheers,
   Chris
  
  
   On 10/3/07 2:37 PM, [EMAIL PROTECTED]
   [EMAIL PROTECTED] wrote:
  
   Hello,
  
   I am wondering whether it possible to implement the following
 scenario with
   iBATIS:
  
  1. run an iBATIS-managed select
  2. get a scrollable result set instead of a list of mapped
 objects
  3. manually scroll 

Updated IDEA plug-in for iBATIS

2007-10-04 Thread Larry Meadors
Hey all,

Libing Chen (a 29 year old software developer from China) posted to
one of the mailing lists about an iBATIS plug-in for IDEA that he had
started working on.

Now that IDEA 7 is closer to release (I've been using M2 since it's
release, and it's been pretty solid), and cheaper ($250 now), I've
started working with (and on) this plug-in.

We now have intentions for automatically creating result maps and all
CRUD operations (insert, select, update, and delete).

Here's a link to a short (about 10MB - 4:45 long - apologies for the
crappy audio) video demonstration of some of the SQL mapping
functions.
 - http://www.elm-software.com/video/ibatis-demo2.mov

To download the plug-in, go here:
 - http://code.google.com/p/ibatis-plugin/downloads/list

To read more about the plug-in, go here:
 - http://docs.google.com/View?id=dc73pj2h_6db54mm

Larry


un-subsribe

2007-10-04 Thread Hosamane, Chandra
Please delete [EMAIL PROTECTED] from the mailing list
 




In accordance with applicable professional regulations, please understand that, 
unless expressly stated otherwise, any written advice contained in, forwarded 
with, or attached to this e-mail is not intended or written by Grant Thornton 
LLP to be used, and cannot be used, by any person for the purpose of avoiding 
any penalties that may be imposed under the Internal Revenue Code. 



 This e-mail is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information.  Any 
review, dissemination, copying, printing or other use of this e-mail by persons 
or entities other than the addressee is prohibited.  If you have received this 
e-mail in error, please contact the sender immediately and delete the material 
from any computer.
winmail.dat

RE: how to map huge resultsets?

2007-10-04 Thread robert.kasanicky
Spring-Batch processes items (item = arbitrary domain object). It
iteratively asks item provider for the next object and passes them to
item processor for processing. Item provider and processor are just
interfaces and there are provided implementations for typical inputs and
outputs (flat file, xml, database).

Robert

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Larry Meadors
Sent: Thursday, October 04, 2007 15:55
To: user-java@ibatis.apache.org
Subject: Re: how to map huge resultsets?

So does the Spring-Batch framework only process Lists?

What are the options for feeding it?

Larry


On 10/4/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:




 Thanks for the insights Jeff.



 Shifting a paradigm and letting iBATIS control the flow is not an
option
 this case, but I think iBATIS can still be used in a slightly
different
 driving query scenario. In this case a driving query is run first
which
 retrieves all primary keys. When framework asks for next item, the
item
 provider takes the next key and asks iBATIS for the corresponding
object -
 it is not what I was originally looking for, but still useful.



 Btw. the motivation for my post is to figure out how ibatis can be
 integrated as an input source for the emerging Spring-Batch framework.
It
 provides support for ordinary sql with manual mapping, but supporting
ORM
 frameworks (especially Hibernate  iBATIS) would be a valuable
addition.



 Robert



  


 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 is very
close if
 you are willing to shift your paradigm)





 2. If the result set is truly huge, then approach #1 is a bad idea
because
 iBATIS will have to read through huge amounts of data to get to the
latter
 parts of the result set in subsequent calls (this is why Larry asked
about
 selecting by primary key rather than returning such a huge result set)





 I guess you'll have to stick with Hibernate :)





 Jeff Butler




 On 10/4/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] 
 wrote:

 Seems like my question was quite confusing, so I'll try to explain
what
  I need once again from scratch.

  1. I need to process a potentially huge number of rows (so
  queryForList(query) is not an option because it would try to load all
  objects into memory at once).

  2. I need to control the iteration over the query results, so I can't
  use queryWithRowHandler (in this case iBATIS iterates and I only tell
  iBATIS how each record should be processed - I need to be able to ask
  iBATIS for the next record instead - it is the internal vs. external
  iterator difference, or SAX vs. StAX in case of XML processing or how
  collections are typically iterated in ruby/groovy vs. Java or ... you
  name it). Simply framework iterates, iBATIS knows the query and must
  provide next record when it is asked for it.

  First approach:
  It is possible to implement these requirements by using
  queryForList(query, skipSize, maxSize) and  query the database
  TOTAL_ROW_COUNT / maxSize times (issuing a new query when records
from
  current list have been processed - this is invisible to the user
  (framework) who just iteratively asks for next record for
processing).

  Second approach:
  Hibernate allows to get a ScrollableResults object for a query
allowing
  the user to move the cursor and ask for an object that corresponds to
  the current row.

  Questions:
  1. is the second approach possible with iBATIS?
  2. first vs. second approach pros  cons?

  Thanks
  Robert

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf
  Of Larry Meadors
  Sent: Thursday, October 04, 2007 01:18
  To: user-java@ibatis.apache.org
  Subject: Re: how to map huge resultsets?

  I'm confused, how would grabbing chunks of a huge result set be more
  efficient than grabbing the records by PK?

  Couldn't you just have a select that grabbed the requested item, and
  passed it back to the consumer?

  Larry


  On 10/3/07, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
   My problem with RowHandler is that iBATIS controls the iteration. I
  just say
  
   sqlMap.queryWithRowHandler (getAllItems, rowHandler);
  
   and all items get processed by the rowHandler.
  
   But in my case I need to make iBATIS return items one-by-one when
it
  is asked to do so because the framework controls the iteration.
   This is a very simplified basic logic of the framework:
  
   while (itemProvider.hasNext()) {
Object item = itemProvider.next ();
process(item);
   }
  
  
  
   -Original Message-
   From: Christopher Lamey [mailto:[EMAIL PROTECTED]
   Sent: Wed 10/3/2007 11:55 PM
   To: user-java@ibatis.apache.org
   Subject: Re: how to 

Re: how to map huge resultsets?

2007-10-04 Thread Larry Meadors
So does the Spring-Batch framework only process Lists?

What are the options for feeding it?

Larry


On 10/4/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:




 Thanks for the insights Jeff.



 Shifting a paradigm and letting iBATIS control the flow is not an option
 this case, but I think iBATIS can still be used in a slightly different
 driving query scenario. In this case a driving query is run first which
 retrieves all primary keys. When framework asks for next item, the item
 provider takes the next key and asks iBATIS for the corresponding object –
 it is not what I was originally looking for, but still useful.



 Btw. the motivation for my post is to figure out how ibatis can be
 integrated as an input source for the emerging Spring-Batch framework. It
 provides support for ordinary sql with manual mapping, but supporting ORM
 frameworks (especially Hibernate  iBATIS) would be a valuable addition.



 Robert



  


 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 is very close if
 you are willing to shift your paradigm)





 2. If the result set is truly huge, then approach #1 is a bad idea because
 iBATIS will have to read through huge amounts of data to get to the latter
 parts of the result set in subsequent calls (this is why Larry asked about
 selecting by primary key rather than returning such a huge result set)





 I guess you'll have to stick with Hibernate :)





 Jeff Butler




 On 10/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] 
 wrote:

 Seems like my question was quite confusing, so I'll try to explain what
  I need once again from scratch.

  1. I need to process a potentially huge number of rows (so
  queryForList(query) is not an option because it would try to load all
  objects into memory at once).

  2. I need to control the iteration over the query results, so I can't
  use queryWithRowHandler (in this case iBATIS iterates and I only tell
  iBATIS how each record should be processed - I need to be able to ask
  iBATIS for the next record instead - it is the internal vs. external
  iterator difference, or SAX vs. StAX in case of XML processing or how
  collections are typically iterated in ruby/groovy vs. Java or ... you
  name it). Simply framework iterates, iBATIS knows the query and must
  provide next record when it is asked for it.

  First approach:
  It is possible to implement these requirements by using
  queryForList(query, skipSize, maxSize) and  query the database
  TOTAL_ROW_COUNT / maxSize times (issuing a new query when records from
  current list have been processed - this is invisible to the user
  (framework) who just iteratively asks for next record for processing).

  Second approach:
  Hibernate allows to get a ScrollableResults object for a query allowing
  the user to move the cursor and ask for an object that corresponds to
  the current row.

  Questions:
  1. is the second approach possible with iBATIS?
  2. first vs. second approach pros  cons?

  Thanks
  Robert

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
  Of Larry Meadors
  Sent: Thursday, October 04, 2007 01:18
  To: user-java@ibatis.apache.org
  Subject: Re: how to map huge resultsets?

  I'm confused, how would grabbing chunks of a huge result set be more
  efficient than grabbing the records by PK?

  Couldn't you just have a select that grabbed the requested item, and
  passed it back to the consumer?

  Larry


  On 10/3/07, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
   My problem with RowHandler is that iBATIS controls the iteration. I
  just say
  
   sqlMap.queryWithRowHandler (getAllItems, rowHandler);
  
   and all items get processed by the rowHandler.
  
   But in my case I need to make iBATIS return items one-by-one when it
  is asked to do so because the framework controls the iteration.
   This is a very simplified basic logic of the framework:
  
   while (itemProvider.hasNext()) {
Object item = itemProvider.next ();
process(item);
   }
  
  
  
   -Original Message-
   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 the RowHandler
  interface and
   the external code wouldn't know or care about it.  Or your item
  provider
   could wrap something that does implement RowHandler so the external
  code
   doesn't know it exists.  The main point is that you can pull mapped
  objects
   on a row by row basis from the database.
  
   How is a RowHandler different that what you were describing in 

SV: Updated IDEA plug-in for iBATIS

2007-10-04 Thread erlend.bjorge
Hi there!

This plugin looks great, but are you also thinking about a feature like this:

Generate CRUD SQL . with default class or alias as input param ?

???

This feature should also have the possibilities to change the default query 
names for each CRUD operation from e.g:

Default:   Custom:
select$Class name$ ... to  fetch$Class name$  ... 
delete$Class name$ ... to  remove$Class name$ ...

Then you could do this once, instead of 4 times in each xml for each bean.

Keep up the good work!


Best regards,
Erlend Bjørge


Re: un-subsribe

2007-10-04 Thread Gwyn Evans
On Thursday, October 4, 2007, 2:28:07 PM, Chandra [EMAIL PROTECTED] wrote:

 List-Help: mailto:[EMAIL PROTECTED]
 List-Unsubscribe: mailto:[EMAIL PROTECTED]

 Please delete [EMAIL PROTECTED] from the mailing list

See the above list headers for where you need to email to
un-subscribe.

/Gwyn



SV: Updated IDEA plug-in for iBATIS

2007-10-04 Thread erlend.bjorge
Hi again!

To quick respons last time:

We now have intentions for automatically creating result maps and all
CRUD operations (insert, select, update, and delete).

Yes you are planning automatically creating all CRUD operations :-)

That's realy good! ... but remember the option to override 
the default query names!

Erlend


Re: how to map huge resultsets?

2007-10-04 Thread Christopher Lamey
I think the issue is that the RowHandler would need to call back to the
framework code, which might decide to not continue processing or roll the
transaction back or do any number of things.

My guess is that this loop:

while (itemProvider.hasNext()) {
  Object item = itemProvider.next ();
  process(item);
}

Is more like this:

[...]
Set up state
[...]
while (itemProvider.hasNext()) {
Object item = itemProvider.next ();
[...]
do lots and lots of different kinds of stuff
[...]
}
[...]
Tear down state
[...]

So unless the framework has a callback to do lots and lots of different
kinds of stuff in the framework state, it would be hard to replicate that
in the RowHandler in a generic way.

In other words, you can't have an object implement Iterator and RowHandler
and have it work like an Iterator.

Cheers,
Chris

Since iBATIS calls RowHandler.handleRow,

On 10/4/07 8:13 AM, Jean-Francois Poilpret [EMAIL PROTECTED] wrote:

 As far as I understand what you need, I do believe that the RowHandler
 approach is suitable. However, your RowHandler has to be a bit smarter than
 the typical RowHandler. Since RowHandler is a class instance, it may have
 data members in which you store the currently handled row to compare with
 the next row (on next call, so). I don't see, from your description, what
 could prevent you from going that way.
 
  
 
 Cheers
 
  
 
 Jean-Francois
 
  
 
   _  
 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 Sent: Thursday, October 04, 2007 8:43 PM
 To: user-java@ibatis.apache.org
 Subject: RE: how to map huge resultsets?
 
  
 
 Thanks for the insights Jeff.
 
  
 
 Shifting a paradigm and letting iBATIS control the flow is not an option
 this case, but I think iBATIS can still be used in a slightly different
 driving query scenario. In this case a driving query is run first which
 retrieves all primary keys. When framework asks for next item, the item
 provider takes the next key and asks iBATIS for the corresponding object -
 it is not what I was originally looking for, but still useful.
 
  
 
 Btw. the motivation for my post is to figure out how ibatis can be
 integrated as an input source for the emerging Spring-Batch framework. It
 provides support for ordinary sql with manual mapping, but supporting ORM
 frameworks (especially Hibernate  iBATIS) would be a valuable addition.
 
  
 
 Robert
 
  
 
   _  
 
 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 is very close if
 you are willing to shift your paradigm)
 
  
 
 2. If the result set is truly huge, then approach #1 is a bad idea because
 iBATIS will have to read through huge amounts of data to get to the latter
 parts of the result set in subsequent calls (this is why Larry asked about
 selecting by primary key rather than returning such a huge result set)
 
  
 
 I guess you'll have to stick with Hibernate :)
 
  
 
 Jeff Butler
 
  
 
 On 10/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] 
 wrote: 
 
 Seems like my question was quite confusing, so I'll try to explain what
 I need once again from scratch.
 
 1. I need to process a potentially huge number of rows (so
 queryForList(query) is not an option because it would try to load all
 objects into memory at once).
 
 2. I need to control the iteration over the query results, so I can't
 use queryWithRowHandler (in this case iBATIS iterates and I only tell
 iBATIS how each record should be processed - I need to be able to ask
 iBATIS for the next record instead - it is the internal vs. external
 iterator difference, or SAX vs. StAX in case of XML processing or how
 collections are typically iterated in ruby/groovy vs. Java or ... you
 name it). Simply framework iterates, iBATIS knows the query and must
 provide next record when it is asked for it.
 
 First approach:
 It is possible to implement these requirements by using
 queryForList(query, skipSize, maxSize) and  query the database
 TOTAL_ROW_COUNT / maxSize times (issuing a new query when records from
 current list have been processed - this is invisible to the user
 (framework) who just iteratively asks for next record for processing).
 
 Second approach:
 Hibernate allows to get a ScrollableResults object for a query allowing
 the user to move the cursor and ask for an object that corresponds to
 the current row.
 
 Questions:
 1. is the second approach possible with iBATIS?
 2. first vs. second approach pros  cons?
 
 Thanks 
 Robert
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of Larry Meadors 
 Sent: Thursday, October 04, 2007 01:18
 To: user-java@ibatis.apache.org
 Subject: Re: how to map huge resultsets?
 
 I'm confused, how would grabbing chunks of a huge result set be more
 efficient than grabbing 

Re: Updated IDEA plug-in for iBATIS

2007-10-04 Thread Larry Meadors
Heh, try it out, I hope it works for you.

I am a big fan of the I'll provide what I need, you provide what you
need model of Open Source development. :-)

Not to sound like a capitalist pig, but this is a market-driven
project, and only investors get to request features. If you'd like to
sponsor changes, feel free! :-)

There are three ways to invest:

* Sweat equity: Get the source from the SVN repo and dive in, it's
pretty simple.

* Intellectual capital: Send us your ideas, if we like them, we
*might* build them.

* Sponsorship: If the other two approaches fail, we'll *sell* you our
spare time. Only my wife and kids get *free* time...well, OK, I bill
the kids, but at a cut rate. ;-)

Larry


On 10/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi again!

 To quick respons last time:

 We now have intentions for automatically creating result maps and all
 CRUD operations (insert, select, update, and delete).

 Yes you are planning automatically creating all CRUD operations :-)

 That's realy good! ... but remember the option to override
 the default query names!

 Erlend



Re: SV: Updated IDEA plug-in for iBATIS

2007-10-04 Thread Lambert Torres
Any hope for a Netbeans version? =)

Lambert Torres
NBA Information Technology
Web Technology Group
100 Plaza Drive
Secaucus, NJ 07094
Ph : (201) 974-6785
Fax: (201) 974-6001



   
 [EMAIL PROTECTED] 
 tenposten.no 
To 
 10/04/2007 11:24  user-java@ibatis.apache.org,  
 AM[EMAIL PROTECTED]   
cc 
   
 Please respond to Subject 
 [EMAIL PROTECTED] SV: Updated IDEA plug-in for iBATIS 
apache.org 
   
   
   
   
   




Hi again!

To quick respons last time:

We now have intentions for automatically creating result maps and all
CRUD operations (insert, select, update, and delete).

Yes you are planning automatically creating all CRUD operations :-)

That's realy good! ... but remember the option to override
the default query names!

Erlend




Re: SV: Updated IDEA plug-in for iBATIS

2007-10-04 Thread Larry Meadors
There are 3 scenarios I can see that would make that happen:

1) Someone else wants it bad enough to write it.

2) Someone wants it bad enough to pay me to write it.

3) I start using netbeans (You will know, because there will be
monkeys flying out of my butt).

Larry


PS: For $300, I'll give you a NetBeans version...it'll just look a
*lot* like IDEA. ;-)
Hint: http://www.jetbrains.com/idea/buy/buy.html#personal


On 10/4/07, Lambert Torres [EMAIL PROTECTED] wrote:
 Any hope for a Netbeans version? =)

 Lambert Torres
 NBA Information Technology
 Web Technology Group
 100 Plaza Drive
 Secaucus, NJ 07094
 Ph : (201) 974-6785
 Fax: (201) 974-6001




  [EMAIL PROTECTED]
  tenposten.no
 To
  10/04/2007 11:24  user-java@ibatis.apache.org,
  AM[EMAIL PROTECTED]
 cc

  Please respond to Subject
  [EMAIL PROTECTED] SV: Updated IDEA plug-in for iBATIS
 apache.org









 Hi again!

 To quick respons last time:

 We now have intentions for automatically creating result maps and all
 CRUD operations (insert, select, update, and delete).

 Yes you are planning automatically creating all CRUD operations :-)

 That's realy good! ... but remember the option to override
 the default query names!

 Erlend





Re: Updated IDEA plug-in for iBATIS

2007-10-04 Thread Jeff Butler
Are you guys using Abator for code generation?  If so, let me know if you
want/need anything added - I'd be happy to help.

BTW - Abator already allows you to override the generated DAO method names
like Erland wants, but not the generated SqlMap ids.

Jeff Butler


On 10/4/07, Larry Meadors [EMAIL PROTECTED] wrote:

 Heh, try it out, I hope it works for you.

 I am a big fan of the I'll provide what I need, you provide what you
 need model of Open Source development. :-)

 Not to sound like a capitalist pig, but this is a market-driven
 project, and only investors get to request features. If you'd like to
 sponsor changes, feel free! :-)

 There are three ways to invest:

 * Sweat equity: Get the source from the SVN repo and dive in, it's
 pretty simple.

 * Intellectual capital: Send us your ideas, if we like them, we
 *might* build them.

 * Sponsorship: If the other two approaches fail, we'll *sell* you our
 spare time. Only my wife and kids get *free* time...well, OK, I bill
 the kids, but at a cut rate. ;-)

 Larry


 On 10/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:
  Hi again!
 
  To quick respons last time:
 
  We now have intentions for automatically creating result maps and all
  CRUD operations (insert, select, update, and delete).
 
  Yes you are planning automatically creating all CRUD operations :-)
 
  That's realy good! ... but remember the option to override
  the default query names!
 
  Erlend
 



Re: oracle nested table

2007-10-04 Thread Larry Meadors
Show us the SQL.

Lary

On 10/4/07, a b [EMAIL PROTECTED] wrote:
 Hi, if i have a nested table and i want to map some
 column within that nested table to some property of an
 object how can do that?

 thanks in advance



 
 Need a vacation? Get great deals
 to amazing places on Yahoo! Travel.
 http://travel.yahoo.com/



Re: Updated IDEA plug-in for iBATIS

2007-10-04 Thread Larry Meadors
Nope, just StringBuilder and the DB metadata IDEA provides.

I suspect as it gets used more, it'll grow into a more mature tool
(unless i3 makes it obsolete), but for now, it's purpose as I see it
is to simplify CRUD operation creation.

I'd like to see it grow it beyond that, because I suspect I will be
using i2 for a couple more years after i3 is released, so it'd be nice
to have some more active tool support.

Larry


On 10/4/07, Jeff Butler [EMAIL PROTECTED] wrote:
 Are you guys using Abator for code generation?  If so, let me know if you
 want/need anything added - I'd be happy to help.

 BTW - Abator already allows you to override the generated DAO method names
 like Erland wants, but not the generated SqlMap ids.

 Jeff Butler


 On 10/4/07, Larry Meadors [EMAIL PROTECTED] wrote:
  Heh, try it out, I hope it works for you.
 
  I am a big fan of the I'll provide what I need, you provide what you
  need model of Open Source development. :-)
 
  Not to sound like a capitalist pig, but this is a market-driven
  project, and only investors get to request features. If you'd like to
  sponsor changes, feel free! :-)
 
  There are three ways to invest:
 
  * Sweat equity: Get the source from the SVN repo and dive in, it's
  pretty simple.
 
  * Intellectual capital: Send us your ideas, if we like them, we
  *might* build them.
 
  * Sponsorship: If the other two approaches fail, we'll *sell* you our
  spare time. Only my wife and kids get *free* time...well, OK, I bill
  the kids, but at a cut rate. ;-)
 
  Larry
 
 
  On 10/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:
   Hi again!
  
   To quick respons last time:
  
   We now have intentions for automatically creating result maps and all
   CRUD operations (insert, select, update, and delete).
  
   Yes you are planning automatically creating all CRUD operations :-)
  
   That's realy good! ... but remember the option to override
   the default query names!
  
   Erlend
  
 




oracle nested table

2007-10-04 Thread a b
Hi, if i have a nested table and i want to map some
column within that nested table to some property of an
object how can do that?

thanks in advance


   

Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/


RE: Updated IDEA plug-in for iBATIS

2007-10-04 Thread Yu, Jack
I am wondering whether the plugin could support stored procedure, as I
know ibator does __not___.
 
if you have equivlent plugin on eclipse, i will be more than happy to
try.
 
Jack


  _  

From: Jeff Butler [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 04, 2007 12:48 PM
To: user-java@ibatis.apache.org; [EMAIL PROTECTED]
Subject: Re: Updated IDEA plug-in for iBATIS


Are you guys using Abator for code generation?  If so, let me
know if you want/need anything added - I'd be happy to help.
 
BTW - Abator already allows you to override the generated DAO
method names like Erland wants, but not the generated SqlMap ids.
 
Jeff Butler

 
On 10/4/07, Larry Meadors [EMAIL PROTECTED] wrote: 

Heh, try it out, I hope it works for you.

I am a big fan of the I'll provide what I need, you
provide what you 
need model of Open Source development. :-)

Not to sound like a capitalist pig, but this is a
market-driven
project, and only investors get to request features. If
you'd like to
sponsor changes, feel free! :-) 

There are three ways to invest:

* Sweat equity: Get the source from the SVN repo and
dive in, it's
pretty simple.

* Intellectual capital: Send us your ideas, if we like
them, we
*might* build them. 

* Sponsorship: If the other two approaches fail, we'll
*sell* you our
spare time. Only my wife and kids get *free*
time...well, OK, I bill
the kids, but at a cut rate. ;-)

Larry


On 10/4/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi again!

 To quick respons last time: 

 We now have intentions for automatically creating
result maps and all
 CRUD operations (insert, select, update, and delete).

 Yes you are planning automatically creating all CRUD
operations :-) 

 That's realy good! ... but remember the option to
override
 the default query names!

 Erlend






RE: oracle nested table

2007-10-04 Thread Yu, Jack
Yes, ibatis could work with Oracle Object in the table.

If that's output parameter, you could use java.sql.Array to hold
response data.

If it is input, you would need to play some tricks to get Oracle
Connection object and create oracle ARRAY. I am not sure whether that's
the prefer way or not, but at least works fine. 

See my previous post.

Cheers.

-- Jack


 

-Original Message-
From: a b [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 04, 2007 12:47 PM
To: user-java@ibatis.apache.org; [EMAIL PROTECTED]
Subject: oracle nested table

Hi, if i have a nested table and i want to map some
column within that nested table to some property of an
object how can do that?

thanks in advance


   


Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/




Re: Ibatis IRAD

2007-10-04 Thread Larry Meadors
Hmm, not to sound too much like I'm telling you to RTFM, but that
answer is on http://ibatis.apache.org/ (the home page), which
incidentally was the first response when I googled for ibatis dtd.

===
DTDs @ iBATIS.com - The Deed has been done

(Jul 30, 2006) The DTDs hosted at iBATIS.com have been permanently
removed. The multiple warnings went starting with a broadcast
announcement to the mailing lists and a permanent space on the
homepage. With over 1.5 million hits to the DTD per month, it was time
to move the burden over to the Apache servers. ;-) If you're a year
behind on your email and using an old version of iBATIS, and you're
wondering why your application won't start anymore...try changing the
DOCTYPE of your XML files to the following.

!DOCTYPE sqlMapConfig
PUBLIC -//ibatis.apache.org//DTD SQL Map Config 2.0//EN
http://ibatis.apache.org/dtd/sql-map-config-2.dtd;

!DOCTYPE sqlMap
PUBLIC -//ibatis.apache.org//DTD SQL Map 2.0//EN
http://ibatis.apache.org/dtd/sql-map-2.dtd;

!DOCTYPE daoConfig
PUBLIC -//ibatis.apache.org//DTD DAO Configuration 2.0//EN
http://ibatis.apache.org/dtd/dao-2.dtd;

Notice the change to http://ibatis.apache.org/dtd/
===

Larry


On 10/4/07, Kani [EMAIL PROTECTED] wrote:

  I 'm using iBATIS 2.0 with the WebSphere6. In my sqlMapConfig file, the IRAD
 server complains about Unknownhost exception www.ibatis.com .
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 2.0//EN
 http://www.ibatis.com/dtd/sql-map-config-2.dtd;

 sqlMapConfig
settings cacheModelsEnabled=true
  lazyLoadingEnabled=false
  enhancementEnabled=true
  maxSessions   =64
  maxTransactions   =8
  maxRequests   =128 /

transactionManager type=JDBC
   property name=UserTransaction value=java:comp/env/UserTransaction
 /

   dataSource type=JNDI
  property name=DataSource value=java:comp/env/kpts /
   /dataSource
/transactionManager

sqlMap resource=PfHeader.xml /

 /sqlMapConfig

 And also the same with the data configuration

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE sqlMap
 PUBLIC -//iBATIS.com//DTD SQL Map 2.0//EN
 http://www.ibatis.com/dtd/sql-map-2.dtd;

 sqlMap namespace=PfmeaHeader

typeAlias alias=Header
 type=com.dcx.mfg.ame.kpts.pfmea.model.PfmeaHeader/

 !-- select id=getPfmea  parameterClass=int resultClass=Header
   select I_FMEA_NUM as fmeaNum,I_FMEA_DESC fmeaDesc,C_AUTHOR_ID engId
   from   MFHEADR_TBL
   where  I_FMEA_NUM = #fmeaNum#
/select
  --
select id=getPfmea  resultClass=Header
   select I_FMEA_NUM as fmeaNum,I_FMEA_DESC fmeaDesc,C_AUTHOR_ID engId
   from   MFHEADR_TBL
   where  I_FMEA_NUM = 48
/select
 /sqlMap
 --
 View this message in context: 
 http://www.nabble.com/Ibatis-IRAD-tf4570451.html#a13045535
 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.




Ibatis IRAD

2007-10-04 Thread Kani

 I 'm using iBATIS 2.0 with the WebSphere6. In my sqlMapConfig file, the IRAD
server complains about Unknownhost exception www.ibatis.com . 
?xml version=1.0 encoding=UTF-8? 
!DOCTYPE sqlMapConfig PUBLIC -//iBATIS.com//DTD SQL Map Config 2.0//EN
http://www.ibatis.com/dtd/sql-map-config-2.dtd; 

sqlMapConfig 
   settings cacheModelsEnabled=true 
 lazyLoadingEnabled=false   
 enhancementEnabled=true 
 maxSessions   =64 
 maxTransactions   =8 
 maxRequests   =128 / 

   transactionManager type=JDBC 
  property name=UserTransaction value=java:comp/env/UserTransaction
/ 

  dataSource type=JNDI 
 property name=DataSource value=java:comp/env/kpts / 
  /dataSource 
   /transactionManager 

   sqlMap resource=PfHeader.xml / 

/sqlMapConfig 

And also the same with the data configuration 

?xml version=1.0 encoding=UTF-8? 
!DOCTYPE sqlMap 
PUBLIC -//iBATIS.com//DTD SQL Map 2.0//EN 
http://www.ibatis.com/dtd/sql-map-2.dtd; 

sqlMap namespace=PfmeaHeader 

   typeAlias alias=Header
type=com.dcx.mfg.ame.kpts.pfmea.model.PfmeaHeader/ 

!-- select id=getPfmea  parameterClass=int resultClass=Header 
  select I_FMEA_NUM as fmeaNum,I_FMEA_DESC fmeaDesc,C_AUTHOR_ID engId 
  from   MFHEADR_TBL 
  where  I_FMEA_NUM = #fmeaNum# 
   /select 
 -- 
   select id=getPfmea  resultClass=Header 
  select I_FMEA_NUM as fmeaNum,I_FMEA_DESC fmeaDesc,C_AUTHOR_ID engId 
  from   MFHEADR_TBL 
  where  I_FMEA_NUM = 48 
   /select 
/sqlMap 
-- 
View this message in context: 
http://www.nabble.com/Ibatis-IRAD-tf4570451.html#a13045535
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.



RE: how to map huge resultsets?

2007-10-04 Thread robert.kasanicky
Yes, you're right about the lots and lots of different kinds of stuff :)

The root of the problem with queryWithRowHandler(callback) is that it's based 
on internal iterator and framework expects external iterator. Using some 
continuations voodoo it might be possible to make an external iterator from the 
internal one, but that would be an overkill + probably wildly ineffective and 
therefore unusable for batch processing where good performance is necessary.

Robert

-Original Message-
From: Christopher Lamey [mailto:[EMAIL PROTECTED]
Sent: Thu 10/4/2007 5:37 PM
To: user-java@ibatis.apache.org
Subject: Re: how to map huge resultsets?
 
I think the issue is that the RowHandler would need to call back to the
framework code, which might decide to not continue processing or roll the
transaction back or do any number of things.

My guess is that this loop:

while (itemProvider.hasNext()) {
  Object item = itemProvider.next ();
  process(item);
}

Is more like this:

[...]
Set up state
[...]
while (itemProvider.hasNext()) {
Object item = itemProvider.next ();
[...]
do lots and lots of different kinds of stuff
[...]
}
[...]
Tear down state
[...]

So unless the framework has a callback to do lots and lots of different
kinds of stuff in the framework state, it would be hard to replicate that
in the RowHandler in a generic way.

In other words, you can't have an object implement Iterator and RowHandler
and have it work like an Iterator.

Cheers,
Chris

Since iBATIS calls RowHandler.handleRow,

On 10/4/07 8:13 AM, Jean-Francois Poilpret [EMAIL PROTECTED] wrote:

 As far as I understand what you need, I do believe that the RowHandler
 approach is suitable. However, your RowHandler has to be a bit smarter than
 the typical RowHandler. Since RowHandler is a class instance, it may have
 data members in which you store the currently handled row to compare with
 the next row (on next call, so). I don't see, from your description, what
 could prevent you from going that way.
 
  
 
 Cheers
 
  
 
 Jean-Francois
 
  
 
   _  
 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 
 Sent: Thursday, October 04, 2007 8:43 PM
 To: user-java@ibatis.apache.org
 Subject: RE: how to map huge resultsets?
 
  
 
 Thanks for the insights Jeff.
 
  
 
 Shifting a paradigm and letting iBATIS control the flow is not an option
 this case, but I think iBATIS can still be used in a slightly different
 driving query scenario. In this case a driving query is run first which
 retrieves all primary keys. When framework asks for next item, the item
 provider takes the next key and asks iBATIS for the corresponding object -
 it is not what I was originally looking for, but still useful.
 
  
 
 Btw. the motivation for my post is to figure out how ibatis can be
 integrated as an input source for the emerging Spring-Batch framework. It
 provides support for ordinary sql with manual mapping, but supporting ORM
 frameworks (especially Hibernate  iBATIS) would be a valuable addition.
 
  
 
 Robert
 
  
 
   _  
 
 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 is very close if
 you are willing to shift your paradigm)
 
  
 
 2. If the result set is truly huge, then approach #1 is a bad idea because
 iBATIS will have to read through huge amounts of data to get to the latter
 parts of the result set in subsequent calls (this is why Larry asked about
 selecting by primary key rather than returning such a huge result set)
 
  
 
 I guess you'll have to stick with Hibernate :)
 
  
 
 Jeff Butler
 
  
 
 On 10/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] 
 wrote: 
 
 Seems like my question was quite confusing, so I'll try to explain what
 I need once again from scratch.
 
 1. I need to process a potentially huge number of rows (so
 queryForList(query) is not an option because it would try to load all
 objects into memory at once).
 
 2. I need to control the iteration over the query results, so I can't
 use queryWithRowHandler (in this case iBATIS iterates and I only tell
 iBATIS how each record should be processed - I need to be able to ask
 iBATIS for the next record instead - it is the internal vs. external
 iterator difference, or SAX vs. StAX in case of XML processing or how
 collections are typically iterated in ruby/groovy vs. Java or ... you
 name it). Simply framework iterates, iBATIS knows the query and must
 provide next record when it is asked for it.
 
 First approach:
 It is possible to implement these requirements by using
 queryForList(query, skipSize, maxSize) and  query the database
 TOTAL_ROW_COUNT / maxSize times (issuing a new query when records from
 current list have been processed - this is invisible to the user
 (framework) who just iteratively asks for next 

Log file location in Web application

2007-10-04 Thread Ashish Kulkarni
Hi
How do we set the log file location dyanamically in web application,
Currently i am using log4j.xml file with following definiation, this file is
under WEB-INF file
appender name=A2 class=org.apache.log4j.DailyRollingFileAppender
param name=File
value=C:\\Documents and Settings\\Kulkara\\My
Documents\\ashish\\code\\workspace5.1M\\version6300build12-00\\log4jXmlFilter.log
/
... /appender
and in load the this xml file in Servlet using
String fileName = config.getInitParameter(log4j.xml);
ServletContext oCtx = config.getServletContext();
URL path = oCtx.getResource(fileName);
DOMConfigurator.configure(path);

But if i have to install this on unix, i have to change the path, also
the server on which i will install this  may
not have the folder, so i will have to recreate a war file
So is there a dynamic way of telling log4j the location and name of log
file? which can work on any system.
i would prefer the log file to be under the same folder application is
installed

Ashish


Re: Log file location in Web application

2007-10-04 Thread Larry Meadors
http://logging.apache.org/

Larry


On 10/4/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:
 Hi
 How do we set the log file location dyanamically in web
 application,
  Currently i am using log4j.xml file with following definiation, this file
 is under WEB-INF file
 appender name=A2 class=
 org.apache.log4j.DailyRollingFileAppender
 param name=File
  value=C:\\Documents and Settings\\Kulkara\\My
 Documents\\ashish\\code\\workspace5.1M\\version6300build12-00\\log4jXmlFilter.log
 /
 ... /appender
 and in load the this xml file in Servlet using
  String fileName = config.getInitParameter(log4j.xml);
  ServletContext oCtx = config.getServletContext();
 URL path = oCtx.getResource (fileName);
 DOMConfigurator.configure(path);

 But if i have to install this on unix, i have to change
 the path, also the server on which i will
 install this  may not have the folder, so i will have to recreate a war file
 So is there a dynamic way of telling log4j the location and name of log
 file? which can work on any system.
 i would prefer the log file to be under the same folder application is
 installed

 Ashish





Re: Log file location in Web application

2007-10-04 Thread Ashish Kulkarni
Hi
Can you please let me know where do i look into for this information, any
hints please

Ashish

On 10/4/07, Larry Meadors [EMAIL PROTECTED] wrote:

 http://logging.apache.org/

 Larry


 On 10/4/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:
  Hi
  How do we set the log file location dyanamically in web
  application,
   Currently i am using log4j.xml file with following definiation, this
 file
  is under WEB-INF file
  appender name=A2 class=
  org.apache.log4j.DailyRollingFileAppender
  param name=File
   value=C:\\Documents and Settings\\Kulkara\\My
 
 Documents\\ashish\\code\\workspace5.1M\\version6300build12-00\\log4jXmlFilter.log
  /
  ... /appender
  and in load the this xml file in Servlet using
   String fileName = config.getInitParameter(log4j.xml);
   ServletContext oCtx = config.getServletContext();
  URL path = oCtx.getResource (fileName);
  DOMConfigurator.configure(path);
 
  But if i have to install this on unix, i have to change
  the path, also the server on which i will
  install this  may not have the folder, so i will have to recreate a war
 file
  So is there a dynamic way of telling log4j the location and name of log
  file? which can work on any system.
  i would prefer the log file to be under the same folder application is
  installed
 
  Ashish
 
 
 



Re: Log file location in Web application

2007-10-04 Thread Ashish Kulkarni
Hi
Sorry i send it to wrong forum, send the question to log4j forum

Ashish

On 10/4/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:

 Hi
 Can you please let me know where do i look into for this information, any
 hints please

 Ashish

 On 10/4/07, Larry Meadors  [EMAIL PROTECTED] wrote:
 
  http://logging.apache.org/
 
  Larry
 
 
  On 10/4/07, Ashish Kulkarni [EMAIL PROTECTED] wrote:
   Hi
   How do we set the log file location dyanamically in web
   application,
Currently i am using log4j.xml file with following definiation, this
  file
   is under WEB-INF file
   appender name=A2 class=
   org.apache.log4j.DailyRollingFileAppender
   param name=File
value=C:\\Documents and Settings\\Kulkara\\My
  
  Documents\\ashish\\code\\workspace5.1M\\version6300build12-00\\log4jXmlFilter.log
 
   /
   ... /appender
   and in load the this xml file in Servlet using
String fileName = config.getInitParameter(log4j.xml);
ServletContext oCtx = config.getServletContext();
   URL path = oCtx.getResource (fileName);
   DOMConfigurator.configure(path);
  
   But if i have to install this on unix, i have to change
   the path, also the server on which i will
   install this  may not have the folder, so i will have to recreate a
  war file
   So is there a dynamic way of telling log4j the location and name of
  log
   file? which can work on any system.
   i would prefer the log file to be under the same folder application is
   installed
  
   Ashish
  
  
  
 




Unknown Column Name problem

2007-10-04 Thread Claus Hausberger
Hello

I am using IBatis 2.3 with Spring and a Oracle 10g database.When I use a
select query where I specify the columns
I always get an Unknown column name error. But the database does not
say which column. I switched one debugging output
with a log4j.xml to get the SQL IBatis uses for the query. When I copy
the query of the log output into an Oracle client
and execute the SQL, it works fine.

any idea what I might be doing wrong here ?

best wishes

Claus
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


Re: Unknown Column Name problem

2007-10-04 Thread Jeff Butler
It sounds like you should set remapResults=true in the select element.

Jeff Butler



On 10/4/07, Claus Hausberger [EMAIL PROTECTED] wrote:

 Hello

 I am using IBatis 2.3 with Spring and a Oracle 10g database.When I use a
 select query where I specify the columns
 I always get an Unknown column name error. But the database does not
 say which column. I switched one debugging output
 with a log4j.xml to get the SQL IBatis uses for the query. When I copy
 the query of the log output into an Oracle client
 and execute the SQL, it works fine.

 any idea what I might be doing wrong here ?

 best wishes

 Claus
 --
 Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
 Browser-Versionen downloaden: http://www.gmx.net/de/go/browser