RE: [OT sort of] If using Tomcat, what would you use to hook into slqlmapclient flushDataCache (and change logging)?

2008-12-26 Thread Chris Lamey
We have some apps that use a page with a button on it and other apps that use JMX for flushing the cache. It depends on who wants to flush the cache. If it's an ops group and there are other JMX things they're watching/using, JMX can be good. If it's a user group, then a UI would might be bet

RE: [OT sort of] If using Tomcat, what would you use to hook into slqlmapclient flushDataCache (and change logging)?

2008-12-27 Thread Chris Lamey
ithout classpath errors? the mbeans obviously will need hooks into the classpath of my webapp itself. I guess that just works its way out when you deploy to common/lib ? On Fri, Dec 26, 2008 at 5:09 PM, Chris Lamey wrote: > We have some apps that use a page with a button on it and other apps tha

RE: iBatis+xStream

2009-03-25 Thread Chris Lamey
Try turning off the lazy loading (it uses the cglib bytecode instrumentation): false Cheers, topher -Original Message- From: AlexElba [mailto:ramal...@yahoo.com] Sent: Wed 3/25/2009 3:35 PM To: user-java@ibatis.apache.org Subject: Re: iBatis+xStream BTW the file contains this for each

RE: LazyLoading and CGLIB return wrong types

2009-07-29 Thread Chris Lamey
Yea, your best bet is to disable lazy loading. -Original Message- From: Dawson Lewis [mailto:hardcore...@yahoo.com.br] Sent: Wed 7/29/2009 1:09 AM To: user-java@ibatis.apache.org Subject: Re: LazyLoading and CGLIB return wrong types Hi, I am aware of that , but there are so many fields

RE: ibatis v hibernate

2006-12-16 Thread Chris Lamey
Hello, My group currently uses iBATIS with several 'from scratch' data models. We used Hibernate as an experiment on one data model before settling on iBATIS for everything. What I would say about the two is that if you don't know SQL and you don't want to know about SQL and you have large da

RE: Connection session bound

2006-12-16 Thread Chris Lamey
I was under the impression that the transaction per HTTP request was more for easy error handling than performance. If some SQL halfway through the request bombs out you automatically roll everything back. Anyway, iBATIS has nothing like this built in, but you could set something similar up wi

Re: Extending iBATIS to support queryForIterator()

2007-01-08 Thread Chris Lamey
On Mon, 2007-01-08 at 15:53 -0700, Clinton Begin wrote: > So Tegan, I'm thinking about this, and I'm still not quite sure what > this Iterator buys you... > > Why couldn't you just do: > > return sqlMapper.queryForList("getMyList", params, skip, > max).iterator(); Right, but I think Tegan is sa

Re: getFailingSqlStatement()

2007-01-16 Thread Chris Lamey
Last I checked, the JDBC spec left this behavior up to the driver, but only the MySQL driver actually tries anything after the first exception (and you had to explicitly turn that feature on). So I think every other JDBC driver bails on the whole thing after the first Exception. At least, that's

Re: Problems compiling

2007-01-29 Thread Chris Lamey
On Mon, 2007-01-29 at 11:43 -0200, André Rodrigues Pena wrote: > >Is Tests your Main-Class in the mainfest? > > I don't have a MANIFEST file because I'm not packaging it into a JAR. > I'm just compiling and executing it locally :) Sounds like a CLASSPATH issue. Here's what I would do. - Select

Re: Problems compiling

2007-01-29 Thread Chris Lamey
On Mon, 2007-01-29 at 09:26 -0700, Chris Lamey wrote: > On Mon, 2007-01-29 at 11:43 -0200, André Rodrigues Pena wrote: > > > >Is Tests your Main-Class in the mainfest? > > > > I don't have a MANIFEST file because I'm not packaging it into a JAR. > >

RE: jdbc driver problem

2007-02-14 Thread Chris Lamey
Are you getting any exceptions or related messages in a logfile? -Original Message- From: Rajesh Thakur [mailto:[EMAIL PROTECTED] Sent: Wed 2/14/2007 11:09 PM To: user-java@ibatis.apache.org Subject: jdbc driver problem Hi I am trying to use Ibatis with weblogic 8.1. I am not able

RE: Avoiding N+1 Selects

2007-02-19 Thread Chris Lamey
Some DBs have support for selecting trees, like Oracle and Postgres' CONNECT_BY functions. I don't have my O'Reilly SQL Cookbook handy, but it's got a chapter on the different DBs (although it completely skips over the Postgres CONNECT_BY function), if you want some pointers. If your DB has th

RE: Transaction issue with 2.2.0

2007-02-27 Thread Chris Lamey
If you're using the same datasource, you can easily wrap that in Spring data source transaction manager and then use declarative transactions so that your DAOs transparently join in existing transactions or create new ones on demand: Here's some sample Spring xml from a project I'm working on now:

pgsql & fetchsize

2007-03-08 Thread Chris Lamey
Hey all, I'm working on a quick and dirty app that unfortunately has to run on a machine with all of a gig of RAM with a decent size dataset (2M rows). I really want the 'fetchSize' attribute of the select element to work so my RowHandler runs lean and mean. The app basically issues a query up fr

Re: transactions with Spring DAOs

2007-03-14 Thread Chris Lamey
I'd highly recommend using Spring's declarative transactions over manually handling them in your code. The big benefit is that you can string calls together in a single transaction without having to pass transactions/connections/whatever around in your methods. Plus your code is cleaner because t

Re: writing XML with attributes

2007-03-14 Thread Chris Lamey
True, it is common, but it's not really a core competency of iBATIS. iBATIS goes along the path of a tool that does its one job very well, rather than a big one that tries to do everything. I also have a need for generating large sets of XML from a db via iBATIS. I use an iBATIS RowHandler that u

Re: ibatis to return xml instead of arraylist (of hashmap).

2007-03-15 Thread Chris Lamey
xstream is pretty flexible, take a look at the Converter examples to see how you can tweak the output. If what you want is vastly different than your object model, you can either create a adapter object model that takes data from iBATIS or use some kind of xml transform. We use stx, which is a sm

Re: Support for database specific SQL config

2007-03-15 Thread Chris Lamey
I don't know offhand, but I would a) first see if the postgres JDBC can support what you want (because if it can't, iBATIS can't either) and b) try a simple throwaway app with iBATIS to see what happens. Personally, I would try another approach, using session and set like that isn't something I've

Re: Abator generated SqlMap.xml files

2007-03-20 Thread Chris Lamey
I use Postgres with Abator and don't have the db name in the $TABLE_SqlMap.xml file names. Here's what one of my table elements looks like: The schema is then specified on the JDBC URL (connectionURL="jdbc:postgresql://localhost/suggestions"), like Jeff said. Cheers, Chris O

Re: Abator generated SqlMap.xml files

2007-03-20 Thread Chris Lamey
On Tue, 2007-03-20 at 10:06 -0500, Mark Volkmann wrote: > Postgres has a notion of a "search path" that is a list of schemas > that are searched to find databases. > I think I need to add my schema to the search path, but I don't know > how to do that. > Any ideas? It's been a while since I u

Re: Postgres JDBC driver

2007-03-20 Thread Chris Lamey
The issue is that you're specifying a postgres driver as a JBoss-wide JNDI resource but the postgres jar isn't in the JBoss classpath. Putting the jar in a war won't do because the JNDI resource is shared among all apps. You'll need to put it either in the server's lib dir or the top level lib dir

Re: DAO update with partial model objects

2007-03-23 Thread Chris Lamey
Take a look at your "abatorgenerated_updateByPrimaryKey" update elements in your SQL Maps. Mine will update all values by primary key every time. On Fri, 2007-03-23 at 14:30 -0500, Mark Volkmann wrote: > I'm using Spring DAOs generated by Abator. Is it the case that I can > pass a partially pop

Re: converting complex object to xml data file

2007-03-23 Thread Chris Lamey
In your first mail about this you listed Parent and Child objects as example objects that you're mapping in iBATIS. If you use xstream, which just writes Java to XML, you don't need to write another set of objects, you can use the same ones you use in iBATIS. The example Meindert used just aliase

Re: Anemic Domain Model and iBatis

2007-04-02 Thread Chris Lamey
Hello, There's nothing that says the model objects you use to get things in and out of the relational database have to be the ones you present in higher levels. iBATIS doesn't dictate your object model. >From the posts I see on this list, a lot of people use a intermediate layer (or two or three

RE: Anemic Domain Model and iBatis

2007-04-04 Thread Chris Lamey
On Wed, 2007-04-04 at 09:12 +0300, Cihat Altuntaş wrote: > You mentioned about developers that using higher level of code to hide > relational model. Can you show me an explain ? In that model Are Batis POJOs > have been using instead of DTO objects? I would guess the most common approach is to us

AbstractRoutingDataSource & cache

2007-04-06 Thread Chris Lamey
Hello all, I'm looking at using Spring's new-ish AbstractRoutingDataSource to hit multiple DataSources with iBATIS. I think it'll work fine in terms of routing to the right DataSource via a ThreadLocal, but I'm concerned about the iBATIS caching mechanism. Specifically, it seems to me that if I

Re: AbstractRoutingDataSource & cache

2007-04-06 Thread Chris Lamey
ction handling, but I think it will work. Transactions are handled on a per-thread basis, so as along as the key to the routing sqlmapclient says the same on a per-thread call it should all work. I would really appreciate any thoughts on this. Thanks, Chris On Fri, 2007-04-06 at 10:03 -0600,

Re: How can I change datasource connect info on the fly w/iBATIS and Spring?

2007-04-13 Thread Chris Lamey
Yea, Spring has a new AbstractRoutingDataSource that can route to a different datasource based on a ThreadLocal. The problem is that the iBATIS SqlMapClient doesn't know the datasource isn't the same between calls, so your caching gets horked. Based on the AbstractRoutingDataSource idea, I wrote

RE: How can I change datasource connect info on the fly w/iBATIS and Spring?

2007-04-16 Thread Chris Lamey
rce from the DAO bean and inject it by hand in the controller method. I lose the niceness of the Spring framework for this particular task but I think it should work? Paul Chris Lamey wrote: > > Yea, Spring has a new AbstractRoutingDataSource that can route to a > different datasourc

Re: SqlMapClientFactoryBean configuration

2007-04-17 Thread Chris Lamey
Hello, WEB-INF is not part of a webapp's CLASSPATH. The file needs to either go in the WEB-INF/classes directory, or in a jar file in WEB-INF/lib. Additionally, Spring might need the configLocation value to be pre-pended with 'classpath:' in order to do what you want. So it would be something l

Re: How can I change datasource connect info on the fly w/iBATIS and Spring?

2007-04-17 Thread Chris Lamey
hem as soon as the first servlet class is loaded. Can the targetDataSource > Map get updated after the AbstractRoutingDataSource has been created? > > Paul > > Chris Lamey wrote: > > > > Yea, Spring has a new AbstractRoutingDataSource that can route to a > > di

RE: XA transactions

2007-04-20 Thread Chris Lamey
Do you want to use Spring for everything? If so, then you don't need to do anything iBATIS-wise if your transaction setup is already done. You will need to read the Spring docs on XA transaction management, but it'll be transparent to iBATIS. If you don't want to use Spring, then you need to

Re: nearly time to give up on XA

2007-04-20 Thread Chris Lamey
I'm not doing XA with iBATIS, so I'm afraid I can't show you examples. Have you looked at the examples that ship with jboss? jboss/docs/examples/jca/oracle-xa-ds.xml jboss/docs/examples/jca/mssql-xa-ds.xml This has more detail, which may or may not help: http://www.ubookcase.com/book/Sa

RE: How to set datasource thread save?

2007-04-21 Thread Chris Lamey
The Spring SqlMapClient is defintely thread safe. I've had thousands of concurrent threads hitting a single SqlMapClient and each one has proper transaction handling and caching. I use Abator generated DAOs, not the Spring ones, but my guess is that the Spring DAOs are thread-safe too because

RoutableSqlMapClient Example

2007-04-23 Thread Chris Lamey
Hello, Here is how I've got dynamic DataSources working in my app. It is based on the idea of Spring's AbstractRoutingDataSource class, but operates with SqlMapClients instead to avoid caching issues in iBATIS. Since SqlMapClient doesn't segment its cache based on DataSources, a single SqlMapCli

RE: Taking care of different databases

2007-05-07 Thread Chris Lamey
FYI, you can have a single sqlmap hit multiple datasources. Search the mailing list archive for AbstractRoutingDataSource and RoutableSqlMapClient. On Mon, 2007-05-07 at 08:41 +0200, Niels Beekman wrote: > As for selectKey statements, see > http://issues.apache.org/jira/browse/IBATIS-142 for a hi

Re: NoClassDefFoundError Resources

2007-05-09 Thread Chris Lamey
Did you declare that jar in the ear deployment descriptor? On Wed, 2007-05-09 at 14:52 -0400, Steve Wooten wrote: > I am attempting to use ibatis in a Session bean with JBoss. > > I have a helper class that load the ibatis config with the following > code > >try { > >

Re: Transaction started

2007-05-09 Thread Chris Lamey
Hello, If I were you, I'd take a look at the Spring declarative transaction handling. Using that means no explicit transaction handling in your code so you don't have to muck with Connection stuff. And you can set things up on a per-method basis to either create a new transaction or join an exis

RE: NoClassDefFoundError for class Resources

2007-05-16 Thread Chris Lamey
What does your ear file's deployment descriptor look like? On Wed, 2007-05-16 at 16:15 -0400, Steve Wooten wrote: > Thanks for the response but that is not the issue. > I am deploying an ear file. All of the ibatis work is done in a session > bean so the web application knows nothing about it. >

RE: NoClassDefFoundError for class Resources

2007-05-16 Thread Chris Lamey
gt; I have no issue using those classes. > > My application.xml for my ear deploys a war and an ejb jar as well as my 3rd > party jars. The manifest has the class path listed with those jars on it. > > > -Original Message- > From: Chris Lamey [mailto:[EMAIL PROTEC

Re: Desktop apps with iBatis

2007-05-22 Thread Chris Lamey
Hello, We have an API in front of a database schema that uses iBATIS as the DB interface. This API is used by swing, command line, and web applications. It is packaged in a jar file with an external configuration file. The jar file has all the iBATIS sqlmap xml files and all of the Spring conte

Re: How can I change datasource connect info on the fly w/iBATIS and Spring?

2007-05-22 Thread Chris Lamey
nManager in Spring but have to use > DataSourceTransactionManager which is not notified when datasource > change. > > 2007/4/13, Chris Lamey <[EMAIL PROTECTED]>: > Yea, Spring has a new AbstractRoutingDataSource that can route > to a > different datasour

Re: How can I change datasource connect info on the fly w/iBATIS and Spring?

2007-05-22 Thread Chris Lamey
SqlMapClient) ? > > Trung > > 2007/5/22, Chris Lamey < [EMAIL PROTECTED]>: > Hello, > > I also use Spring's DataSource txn mgr with this setup (in > fact, I think > the Spring SqlMapClient can't use the iBATIS txn m

Re: How can I change datasource connect info on the fly w/iBATIS and Spring?

2007-05-22 Thread Chris Lamey
> > > > ... > > > > should i have a service for each tx mrg ? > > Thanks in advance! > > Trung > > 2007/5/22, Chris Lamey <[EMAIL PROTECTED]>: > Hello, > > I have a DataSource txn mgr for each Dat

Re: Desktop apps with iBatis

2007-05-24 Thread Chris Lamey
On Thu, 2007-05-24 at 16:31 -0300, Caio Zanchetti wrote: > Tank you very much for reply. I'm sorry for the long time to this > reply. Your welcome and don't worry:) > Chris, can you explain a little bit more about Spring's initialization > in a swing app? How can I do that? Using Spring in a Swi

RE: Nested transactions?

2007-05-31 Thread Chris Lamey
You could look at how Spring implements their declarative transaction handling. On Thu, 2007-05-31 at 08:14 -0500, Sudhir, Sudhir (Contractor) wrote: > Thanks Clinton, > > I am curious about the second approach, I don’t think I quite got what > you are saying there…is there an example that you ca

RE: Desktop apps with iBatis

2007-06-03 Thread Chris Lamey
t: Sun 6/3/2007 4:13 PM To: user-java@ibatis.apache.org; Chris Lamey Subject: Re: Desktop apps with iBatis Hello, tank you for reply. Would be possible to post a some code that shows how to initialize this application context? My application must have an ApplicationContext object with loaded

RE: New to iBatis

2007-06-17 Thread Chris Lamey
Hello, I've been using iBATIS as the db interface for APIs that are used by many different kinds of clients for almost two years now. When I get a request for a new piece of functionality, I first try to implement it using only Java and the Abator generated classes. A good chunk of the "no br

Re: Question on using Transactions with iBatis and Spring

2007-06-25 Thread Chris Lamey
Hello, I think it depends on how you are setting your data source. If you are setting the iBATIS DataSource via the Spring SqlMapClientFactoryBean in a Spring context, you are using an EXTERNAL DataSource as far as iBATIS is concerned. iBATIS at that point wouldn't have anything to do with the c

Re: Suggestion: Extending Models and DAOs ?

2007-07-18 Thread Chris Lamey
Hello, I structured some Abator generated code similar to what you're describing. The Abator generated DAOs are never modified, all my custom code lives in their sub-classes. I did that a long time ago when I first started using iBATIS, when my data model wasn't nailed down and I thought it'd be

RE: Problem with nullpointerException.

2007-07-24 Thread Chris Lamey
Hello, As Ashok said on Sunday, the RowBeheer[] array is never initialized. When you try to assign a value into an uninitialized array, you get a null pointer exception. You need something like this after you get the resultList back from the selectByExample call: rowBeheer = new RowBeheer[result

Re: jUnit test, NodeletException

2007-07-24 Thread Chris Lamey
Hello, Is the file really UTF-16 and if so, is your jvm default encoding UTF-16? I cut and paste your file into one on my filesystem and saw a BOM before the first line. My guess is that the xml parser is choking on that. You either need to set your jvm default encoding correctly (-Dfile.encodin

Re: jUnit test, NodeletException

2007-07-24 Thread Chris Lamey
BTW, if you change the file's encoding from UTF-16 to UTF-8, you will definitely need to get rid of the first two bytes. On Tue, 2007-07-24 at 11:42 -0600, Chris Lamey wrote: > Hello, > > Is the file really UTF-16 and if so, is your jvm default encoding > UTF-16? > > I

Re: jUnit test, NodeletException

2007-07-24 Thread Chris Lamey
ration missing?" (line number may be too low). SqlMapConfig.xml > I created now a new file and put all my staff into and then it worked with > UTF-8. > Maybe I got some UTF-16 characters by copying from a tutorial. > BTW, how did you saw the BOM? > > > > Chris Lame

Re: programmatic transaction management in ibatis

2007-07-30 Thread Chris Lamey
Hello, I'm confused, can't you just code in the transaction support in the class you want and not in the others? Or have you done that already and it's not working? BTW, I would strongly suggest you don't go the programmatic transaction route and instead use Spring's declarative transactions. C

RE: dtd got from the jar file

2007-11-13 Thread Chris Lamey
Hello, As has been explained to you before; you shouldn't have to do anything to get this to work. You should be able to have the DTDs in your xml files pointing to ibatis.apache.org. The xml parser should find the DTDs in the ibatis jar files and not even try going out to the web. I often w

RE: error after adding a field in table

2007-12-25 Thread Chris Lamey
Hm, nothing helpful there. Which log file was that? Are there other log files? If so, do they have any exceptions or errors in them? Also, how is your application handling errors? Can you provide more detail on how the JSPs are invoking the Java code and how exceptions are being caught? ---

RE: How to custom database exception?

2007-12-29 Thread Chris Lamey
Hello, my name is Chris and I've committed this most egregious hack. Many years ago when I was young and easily led down the dark side, a requirement came down from on high that required a custom user message for a specific Oracle error message. The project was already through the development

RE: How to custom database exception?

2007-12-31 Thread Chris Lamey
reason it will just fall through your custom handling piece of code. I am guessing you are rethrowing other types of exceptions that you did not write special handling for, so you should be fine:) Denis From: Chris Lamey [mailto:[EMAIL PROTECTED]

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

2008-01-11 Thread Chris Lamey
Hello, Is this running in an app server? How is the data source wired up to the SqlMapClientTemplate? Can we see the Spring xml doing this binding? Are you using declarative transactions anywhere in the app? Cheers, Chris -Original Message- From: Stéphane Hanser [mailto:[EMAIL PROTE

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

2008-01-12 Thread Chris Lamey
g transaction anywhere in the app. classpath:com/omegames/kilometres/dao/ibatis/maps/ sql-map-config-mysql.xml Thanks, Stéphane Le 12 janv. 08 à 04:03, Chris Lamey a écrit : >

RE: Exit out of rowHandler

2008-01-29 Thread Chris Lamey
I have processed millions of rows with a rowhandler and no memory leaks in several different applications. -Original Message- From: Harvey Kim [mailto:[EMAIL PROTECTED] Sent: Tue 1/29/2008 5:23 PM To: ibatis user Subject: Re: Exit out of rowHandler Thanks, I'm currently throwing an exc

RE: Exit out of rowHandler

2008-01-30 Thread Chris Lamey
Yes, please keep backwards compatability within minor releases. -Original Message- From: Clinton Begin [mailto:[EMAIL PROTECTED] Sent: Wed 1/30/2008 6:11 PM To: user-java@ibatis.apache.org; [EMAIL PROTECTED] Subject: RE: Exit out of rowHandler Hehe... Well, considering how much effort I

RE: select * causing " OutOfMemoryError: Java heap space"

2008-03-13 Thread Chris Lamey
What is you JVM heap size set to and how much data is returned by select * from table? If you're trying to pull back 1G worth of data into a JVM with a heap size set to 64M, you will hit the heap limit pretty quick. -Original Message- From: nch [mailto:[EMAIL PROTECTED] Sent: Thu 3/13/

RE: Problem populating a List using groupBy

2006-06-23 Thread Chris Lamey
Title: RE: Problem populating a List using groupBy Heya, This doesn't address your question directly, but is some background for you.  I am also using iBATIS for the first time in a small but somewhat complex schema.  Along the way I tried using the groupBy support in the SqlMap xml but gave

Re: RE: Problem populating a List using groupBy

2006-06-27 Thread Chris Lamey
p.59 is not completely up to date with regard to the current API as it > contains (Object,List) in the method signature of handleRow which does not > exist anymore (or is deprecated, not sure) in the current API.) > > > Original-Nachricht > Datum: Fri,

RE: Debug iBATIS source code thru myeclipse

2006-06-27 Thread Chris Lamey
Hello, Debugging iBATIS source code is no different than debugging any third party libary in Eclipse. iBATIS doesn't package its source in the jar file distribution, which is good because it'd just be extra disk space for most uses. For iBATIS, here's what I do to step through third party sour

RE: Oracle CONNECT BY parameter issue (bug?)

2006-07-31 Thread Chris Lamey
Title: RE: Oracle CONNECT BY parameter issue (bug?) Hello, To see the SQL iBATIS issues, you can set the "java.sql" category in a log4j config to DEBUG.  For a log4j.properties with FILE appender, it'd look like this:     log4j.category.java.sql=DEBUG, FILE In a JBoss log4j.xml:    

RE: daomanager doesn't rollback transaction?

2006-08-01 Thread Chris Lamey
Title: RE: daomanager doesn't rollback transaction? Hello, In general, at a very high level, it is safe to say that transactions in iBATIS work.  Lots of people are using them regularly without any problems with the right RDBMS configured correctly.  For example, my group successfully uses i

RE: daomanager doesn't rollback transaction?

2006-08-02 Thread Chris Lamey
) != null && p.getChildren().size() >0) { for (Iterator it=p.getChildren().iterator(); it.hasNext(); ) { Child child= (Child)it.next(); child.setParentSeqNum(  p.getSeqNum()); this.myDao.insertChild(child); } }             this.daoManager.commitTransaction(); } finally { this

RE: Abator / oracle pb with CHAR columns

2006-08-03 Thread Chris Lamey
Title: RE: Abator / oracle pb with CHAR columns Hello, Usually, CHARs indicate that you want the field filled out with something meaningful and so doing magic padding by default seems like a bad idea to me.  Most folks don't want to increase the size of their DB with useless data and CHAR fo

RE: Abator / oracle pb with CHAR columns

2006-08-03 Thread Chris Lamey
hink about it, the less I like the idea of Abator doing something automagically.  This could easily be validated and enforced in some other layer of the application. Certainly we wouldn't want to do anything like this by default. Jeff Butler On 8/3/06, Chris Lamey <[EMAIL PROTECTED]&

RE: Spring and Ibatis DAOs, Singleton vs Prototypes

2006-08-04 Thread Chris Lamey
Title: RE: Spring and Ibatis DAOs, Singleton vs Prototypes Hello, I've got all my DAOs and my Spring sqlMapClient defined as singletons in my app context without any problems at all.  I keep my DAOs stateless, so everything's on its own Thread stack and not a big deal...and the sqlMapClient

RE: mysql and jboss support

2006-08-08 Thread Chris Lamey
Title: RE: mysql and jboss support Hello, We use iBATIS and JBoss without any problems.  It looks to me like you don't have a mysql driver jar file in the right place.  More details on your setup would be useful if you want help.  How are you intending to configure your database connection i

RE: mysql and jboss support

2006-08-08 Thread Chris Lamey
the approriate connector (MySQL J/Connector) installed.  Typiclaly you can install this jar in server//lib to give it runtime classloading scope across EARs. -aps On 8/8/06, Chris Lamey <[EMAIL PROTECTED]> wrote: > >  Hello, > > We use iBATIS and JBoss without any problems.  It

RE: mysql and jboss support

2006-08-08 Thread Chris Lamey
things as well). There is a thread about it in the archives in case your interested(thanks again to EVERYONE on the list for giving me feedback)... -aps On 8/8/06, Chris Lamey <[EMAIL PROTECTED]> wrote: > >  Really?  What's the issue?  We use Spring to wire up from either JNDI or

RE: How to Do Transaction with JNDI Datasource and Spring Framework?

2006-08-21 Thread Chris Lamey
Title: RE: How to Do Transaction with JNDI Datasource and Spring Framework? Setting up declarative transactions in Spring is really easy if you're Spring wiring stuff.  All you have to do is specify the strategy in the application content file.  Here are the docs: http://static.springframewo

RE: How to Do Transaction with JNDI Datasource and Spring Framework?

2006-08-21 Thread Chris Lamey
rent.  Take a look at the Spring docs for iBATIS, they've got great examples in xml and java. Cheers, Chris -----Original Message- From: Chris Lamey [mailto:[EMAIL PROTECTED]] Sent: Mon 8/21/2006 7:32 PM To: user-java@ibatis.apache.org; user-java@ibatis.apache.org Subject: RE: H

Re: How to Do Transaction with JNDI Datasource and Spring Framework?

2006-08-22 Thread Chris Lamey
The JavaDoc for the Spring SqlMapClientFactoryBean says: "The default ExternalTransactionConfig is appropriate if there is external transaction management that the SqlMapClient should participate in: be it Spring transaction management, EJB CMT or plain JTA. This should be the typical scenario. If

RE: java.io.NotSerializableException: com.ibatis.db.sqlmap.LazyLoadList

2006-08-23 Thread Chris Lamey
Looks to me like com.ibatis.db.sqlmap.LazyLoadList isn't Serializable, so you can't use it in your distributed cache. If you have the 1.x iBATIS source around, you could verify that. I'm not sure why you're thinking java.lang.Object is the culprit...the method java.util.ArrayList.writeObject is o

RE: java.io.NotSerializableException: com.ibatis.db.sqlmap.LazyLoadList

2006-08-23 Thread Chris Lamey
On Wed, 2006-08-23 at 13:54 -0400, Khanna, Vijay (GE, Corporate, consultant) wrote: > Jboss gave us a utility class as a Listener to find the actual object in > the list causing this concern when stored in the HttpSession. To my > surprise it found one bean/DTO type which is not serializable. I qu

Re: Connection closing after timeout on tomcat

2006-08-25 Thread Chris Lamey
Hello, For what it's worth, sqlMapClients are thread-safe, so you can construct one at webapp init time and share it between all servlets. Creating a new sqlMapClient on every HTTP request is heavyweight and not needed. Also, the way SQLMapper is written, you could have different threads coming i

Re: Retry Logic

2006-08-30 Thread Chris Lamey
Could you please provide more detail about what you're trying to do? Is this retry on exception or some kind of data condition? Is this when one record in a batch fails and you want to keep going? What would change that would cause a retry to succeed? On Wed, 2006-08-30 at 09:20 -0500, Brad Bal

Re: Retry Logic

2006-08-30 Thread Chris Lamey
x27;s update, which initially failed, will succeed. > > This can easily be done programatically, but I don't want to have to > change the code in 50-60 locations per application where an > insert/update/delete occurs. > > I was wondering if something like this was built int

cache admin

2006-08-30 Thread Chris Lamey
Hello, I'm thinking about adding the capability of administering the oscache GeneralCacheAdministrator object used by iBATIS through a UI for operational use. The UI would present things like GeneralCacheAdministrator().getCache().getSize() and pull things from a custom CacheEventListener like st

Re: Bad Performance Using Ibatis?

2006-09-01 Thread Chris Lamey
Are you batching the inserts? If not, then a commit is done after each insert, which is very slow. On Fri, 2006-09-01 at 14:21 +0200, Ralf Assmann wrote: > Hi there, > > making a performance test with ibatis, we got a very slow runtime. > Inserting 10 rows into a table, we took more than tw

RE: List and Axis

2006-09-04 Thread Chris Lamey
Title: RE: List and Axis You probably need to disable GCLIB and Lazy Loading in the sqlmap config if you want to use the model object directly in any kind of de/serialization.  Something like:     lazyLoadingEnabled="false"     enhancementEnabled="false"     [ whatever else your config need

Re: List and Axis

2006-09-05 Thread Chris Lamey
On Tue, 2006-09-05 at 09:11 +0200, Javier Leyba wrote: > org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension to > bean field 'notificationDescription', type [Ljava.lang.Object; > - Exception: > java.lang.ArrayStoreException >From the J2SE Javadoc for ArrayStoreException: Thrown to

Re: SQLMap validation at startup?

2006-09-05 Thread Chris Lamey
I second Larry's motion encouraging you to unit test. You can avoid the long build/deploy/webapp-init/login-to-app/browse/cause-error loop by testing after the build step. Eclipse and IntelliJ both have a button to run a JUnit test, so that's just a single 'Run as JUnit Test' step. And if you're

Re: non-code way to read properties from jndi?

2006-09-11 Thread Chris Lamey
On Mon, 2006-09-11 at 13:35 -0700, Reuben Firmin wrote: > The sqlmap config has a attribute, which can be used to > load common properties. Is there a way I can configure this to point > at a jndi key? > > Alternatively, where does the properties object get built out in the > sqlmap object tree

Re: Populating existing beans...

2006-09-12 Thread Chris Lamey
I think he's saying he wants iBATIS to populate already existing beans in a map rather than create new beans. So basically "Bean b = byId.get(beanId)" rather than "new Bean()". I guess the iBATIS call would be something like populateMap(statementName, parameterObject, key, mapWithExistingObjects)

RE: Populating existing beans...

2006-09-12 Thread Chris Lamey
On Tue, 2006-09-12 at 13:49 -0700, Daniel Pitts wrote: > To clarify more, > I have a bunch of beans of different classes. There is a table for > each class of bean, with columns that correspond directly to bean > properties. This makes it easy to do things like id="getAuthors" resultClass="author

Re: To monitor used cache model size

2006-09-22 Thread Chris Lamey
If you use OSCache, you could implement a listener that logs what you need. I went down this road a while back, and from what I remember, iBATIS doesn't really expose any of the cache details other than a flush() method. On Fri, 2006-09-22 at 17:35 -0400, Zhao, Qintao (Contractor) wrote: > All, >

Re: N+1 problem

2006-09-25 Thread Chris Lamey
What version of iBATIS are you using? On Tue, 2006-09-26 at 10:19 +1000, Zoran Avtarovski wrote: > I’m having an issue with my N+1 resultset. It’s throwing up a quirk I > haven’t seen before. > > I’m building a menu-submenu structure. The resultset I’m getting from > mysql is as expected (see bel

RE: Cache Flush Interval

2006-09-26 Thread Chris Lamey
Title: RE: Cache Flush Interval I believe for the OSCACHE type, the iBATIS config is completely ignored and the OSCache values are used. -Original Message- From: Crocker, Patrick [mailto:[EMAIL PROTECTED]] Sent: Tue 9/26/2006 6:14 PM To: user-java@ibatis.apache.org Subject: Cache Flu

Re: ibatis with Spring performance isssue.

2006-11-09 Thread Chris Lamey
Make sure you don't include Spring's initialization in your test measurements. Building a Spring context takes a lot of CPU time, so it's best to init Sprint and then start gathering data. Cheers, Chris On Thu, 2006-11-09 at 16:17 -0500, [EMAIL PROTECTED] wrote: > We ran performance tests on one

Re: queryForObject deadlock with high concurrent calls

2006-11-13 Thread Chris Lamey
Are you saying you have 100 concurrent threads hitting a database configured with a limit of 50 concurrent connections? I would use dbcp over the builtin iBATIS one to see what happens. On Tue, 2006-11-14 at 02:49 +0800, class acts wrote: > Hi all, > >I'm using Jmeter to create 100 threads t

RE: How to use DaoManager -- single or more

2006-11-17 Thread Chris Lamey
No, it's threadsafe. One rollback/commit on one thread won't affect something going on in another thread. On Fri, 2006-11-17 at 22:23 +0530, Tamilselvan Radha Krishnan wrote: > Tony, > We have already started the work and currently using the DAOManager per > user. I read that it can be loaded on

Re: Fw: ibatis with Spring performance issue.

2006-11-17 Thread Chris Lamey
Both the JDBC test driver and the Spring/iBATIS test driver code would be helpful. I'd also be interested to see how you're initializing your Spring context as well. And if you could get the JMeter CPU utilization chart broken down by Class/Method might help too. Cheers, Chris On Fri, 2006-11-1

Re: Need a custom way for sqlMapConfig.xml to get JDBC properties

2006-11-22 Thread Chris Lamey
Just a suggestion: You could configure iBATIS to use JNDI and then either use your container's JNDI provider or use a standalone one. I'd also ask if the cost of writing your own iBATIS properties loading code is cheaper than copying the right properties file into the right CLASSPATH. That doesn

  1   2   >