Problem with log4j

2005-10-06 Thread Marco Berri
Hi! My application using ibatis 2.1.5.582 Ibatis NOT WRITE LOG INFORMATIONS!! PLEASE HELP ME Marco Berri Using: log4j 1.2.11 log4j.xml : http://jakarta.apache.org/log4j/";>

Getting connection from ibatis

2005-10-06 Thread Agilan Palani
Hi   Iam using ibatis in my project, with JBoss application server.     I have some taglibs from oracle which uploads ORDImages (Oracle specific objects) to the database These tags either need  a connection or datasource, passed as one of its argument to perform its task. T

RE: Problem with log4j

2005-10-06 Thread Agilan Palani
Change your xml as shown below and try Regards Agilan Palani -Original Message- From: Marco Berri [mailto:[EMAIL PROTECTED] Sent: Thursday, October 06, 2005 4:51 PM To: user-java@ibatis.a

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Clinton Begin
If you are seriously worried about 220ms of time in an enterprise aplication, then iBATIS (and all other frameworks) are not for you.   Stick with JDBC. Performance testing enterprise applications is very complex, and you should avoid drawing conclusions based on simple tests of 10 executions of

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Clinton Begin
PS:  We cannot acknowledge performance test results, nor can we answer questions or do anything about them -- unless you post your test code including database scripts and platform details. Cheers, ClintonOn 10/6/05, Clinton Begin <[EMAIL PROTECTED]> wrote: If you are seriously worried about 220

Re: Getting connection from ibatis

2005-10-06 Thread Larry Meadors
The simplest way is to use JNDI for your datasource / transaction manager. Larry On 10/6/05, Agilan Palani <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > Iam using ibatis in my project, with JBoss application server. > > > > I have some taglibs from oracle which uploads ORDImages (Oracle specific

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Sven.Boden
If it's on Oracle using "inline parameters" will be slower. Regards, Sven >- Oorspronkelijk bericht - >Van: Clinton Begin [mailto:[EMAIL PROTECTED] >Verzonden: donderdag, oktober 6, 2005 01:18 PM >Aan: user-java@ibatis.apache.org >Onderwerp: Re: why does SqlMap ibatis is slower that Jdbc

RE: Getting connection from ibatis

2005-10-06 Thread Agilan Palani
Iam already using a datasource for IBATIS, do you mean I need to lookup that datasource again by-passing IBATIS and pass it to the taglib? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors Sent: Thursday, October 06, 2005 8:12 PM To: user-java

iBATIS strange behaviour

2005-10-06 Thread Pere Torrodellas
I ran into this strange problem that required a lot of time to debug. This is just to try to save trouble for those that run into it. iBATIS version: 2.1.5 This first data map works OK: select ID_OFERTA as iIdOferta, OCUPACIO as stOcupacio, MUNICIPIO as stLocalitat

Re: Getting connection from ibatis

2005-10-06 Thread Larry Meadors
That is what I would do, yes. Larry On 10/6/05, Agilan Palani <[EMAIL PROTECTED]> wrote: > Iam already using a datasource for IBATIS, do you mean I need to lookup that > datasource again by-passing IBATIS and pass it to the taglib? > > > -Original Message- > From: [EMAIL PROTECTED] [mail

Changing a sqlMap dynamically?

2005-10-06 Thread Dan Bradley
Using iBATIS you normally create an XML file with a sqlMap element that defines SQL queries that can be referenced by name. Is it also possible to create these queries dynamically, through Java, instead of hard-coding them all in XML? I'm hoping to build some framework code that will programaticall

Re: Changing a sqlMap dynamically?

2005-10-06 Thread Larry Meadors
$whateverSqlYouWant$ Larry On 10/6/05, Dan Bradley <[EMAIL PROTECTED]> wrote: > Using iBATIS you normally create an XML file with a sqlMap element > that defines SQL queries that can be referenced by name. Is it also > possible to create these queries dynamically, through Java, instead of > ha

RE: Getting connection from ibatis

2005-10-06 Thread Agilan Palani
Thanks, but, do you have any answer to get the connection directly? Another project is running on a web-server which doesn't have a datasource, but uses IBATIS -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors Sent: Thursday, October 06, 200

Re: iBATIS strange behaviour

2005-10-06 Thread Larry Meadors
Hmm, this seems really odd. The code that is in SVN now supports properties named like "sProperty" with mutators like "getsProperty" and "setsProperty". According to the beans specification, getters named "getSProperty" and "setSProperty" define a property named "SProperty", not "sProperty" as you

Re: Changing a sqlMap dynamically?

2005-10-06 Thread Dan Bradley
Hi Larry - Thanks for the reply, but I think you misunderstood the question. I understand that I can put arbitrary SQL into a named select element within a sqlMap file. That then gets called, by name, from SqlMapExecutor/Session. What I'm wondering is if there's either: - a way to (essentially)

Dirty checking

2005-10-06 Thread Dan Bradley
I'm interested in implementing a dirty-checking system. I know that iBATIS doesn't directly do that, but I'm wondering if anyone else has developed or thought of a successful approach. It would be possible of course to add a dirty flag to an entity, then cause each mutator to set that flag to true

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Jan Vissers
Hi Sven, Like to hear from you, how you came to that conclusion. -J Sven.Boden wrote: If it's on Oracle using "inline parameters" will be slower. Regards, Sven - Oorspronkelijk bericht - Van: Clinton Begin [mailto:[EMAIL PROTECTED] Verzonden: donderdag, oktober 6, 2005 01:18 PM

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Sven Boden
Simple... the SQL code executed by the JDBC example and the iBATIS version is not the same. The JDBC examples use parameter markers and proper arguments, while the iBATIS version in the original mail uses inline parameters, the #value# (which means that the SQL generated will contain hardcoded par

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Jan Vissers
Thanks for sharing, I was always under the impression that inline parameters didn't mean hard parses. I'm quite aware of the fact that this might hurt Oracle. Checking... Sven Boden wrote: Simple... the SQL code executed by the JDBC example and the iBATIS version is not the same. The JDBC ex

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Sven Boden
I may be mixing up things... let me check as well ;-) $/#/... Sven On Fri, 07 Oct 2005 00:20:47 +0200, you wrote: >Thanks for sharing, I was always under the impression that inline >parameters didn't mean hard parses. I'm quite aware of the fact that >this might hurt Oracle. > >Checking... >

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Jan Vissers
Point of interest is InlineParameterMapParser. mappingList.add(mapping); newSqlBuffer.append("?"); ... ... newSql = newSqlBuffer.toString(); ParameterMapping[] mappingArray = (ParameterMapping[]) mappingList.toArray(new ParameterMapping[mappingList.size()]); SqlText sqlTe

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Sven Boden
Sorry for that... the difference between # and $... # results in parameter markers. It's getting too late for me (for the developers... at com.ibatis.sqlmap.engine.mapping.parameter.InlineParameterMapParser) Back to the thinking board. Regards, Sven

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Sven Boden
I may be mixing up things... let me check as well ;-) Sven On Fri, 07 Oct 2005 00:20:47 +0200, you wrote: >Thanks for sharing, I was always under the impression that inline >parameters didn't mean hard parses. I'm quite aware of the fact that >this might hurt Oracle. > >Checking... > >Sven Bod

Re: why does SqlMap ibatis is slower that JdbcDaoTemplate

2005-10-06 Thread Jan Vissers
I also checked with the single point of truth - the database. For those interested... Mapping: SELECT REAC_ID as id , REAC_NAME as name , REAC_DESCRIPTION as description , REAC_IND_ACTIVE as active FROM CXF_REGISTERED_ACTIONS WHERE REAC_ID = #value# Mini t

Re: Dirty checking

2005-10-06 Thread Ben Munat
Just have your DAO set the entity's dirty flag to false before handing back the created object. My co-worker wrote a little DTO generator and it creates setter methods like this: public void setFoo(Object foo) { if(((this.foo != null) && !this.foo.equals(foo)) || ((this.foo ==

Sybase selectKey problem

2005-10-06 Thread reubenf
#1 -- I'm trying to use selectKey to create keys for me. DB is Sybase. My insert is as follows: INSERT INTO Deployment (environmentId, deploymentTypeId, userName, deploymentStatusId, deploymentTime, threadCountOverride) VALUES (#environmentId#, #deploymentTypeId#, #userName#,

Re: Sybase selectKey problem

2005-10-06 Thread reubenf
BTW, this *does* work: SELECT MAX(deploymentId) + 1 FROM Deployment INSERT INTO Deployment (deploymentId, environmentId, deploymentTypeId, userName, deploymentStatusId, deploymentTime, threadCountOverride) VALUES (#dep

RE: Getting connection from ibatis

2005-10-06 Thread Agilan Palani
I hope that iam not clear in stating why I need a direct connection from IBATIS, will correctly state is now. My project runs in JBoss in one location and in tomcat in other places. Code base is same. There are some java EOD programs which will also run as separate process using IBATIS. Tomcat

Re: Sybase selectKey problem

2005-10-06 Thread Zarar Siddiqi
Try this as the query. I think you have to select the column as "value". I'm assuming your "deployment" class has a "deploymentId" property. SELECT @@IDENTITY AS value Zarar - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Thursday, October 06, 2005 9:00 P

Re: Sybase selectKey problem

2005-10-06 Thread Larry Meadors
Hmm, what happens when you do the insert from a plain-jane sql client? In this case, the exception is coming *BEFORE* the selectKey element gets executed: > Caused by: com.sybase.jdbc3.jdbc.SybSQLException: The column deploymentId > in table Deployment does not allow null values. The column does

Mutliple database vendor

2005-10-06 Thread Olivier Ziller GMail Lists
hello, my application have to work both with MySql and Oracle. Most of my queries work on both database but a few are specific. Especially those with selectKey... What i've done is to make 3 files for statements : one for generic statements, one for oracle and one for mysql... in the mysql