iBatis 3 transaction isolation level control

2010-01-13 Thread gshum
Is there a way in iBatis 3 to control the isolation level of transaction? Thanks, Gennady -- View this message in context: http://old.nabble.com/iBatis-3-transaction-isolation-level-control-tp27140959p27140959.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com. ---

Re-2: Logging in iBatis 3

2010-01-13 Thread [e2n] software | Björn Raupach
Exactly. My problem is not the unchecked exception. In fact I believe thats the way to go. Unchecked exceptions for everything that is not recoverable. My only problem is if my apps crashes due to an unexpected exception I would like to know where it happened. Otherwise I am not better of with a c

Re: ibator couldnt find jdbc driver

2010-01-13 Thread olamalam
Sorry, I couldn't get what you mean. should I put this line: to the ibator config xml? then it will look like this: right? Jeff Butler-2 wrote: > > Sorry - you need the entry in your ibatorconfig file - not the > .classpath file. Eclipse plugins

Re: Re-2: Logging in iBatis 3

2010-01-13 Thread Clinton Begin
The log level is controlled by the underlying logging system (we support commons-logging, log4j, slf4j and jdk14 logging). In my environment, I have separate log4j props files for my unit tests and my production code. The kinds of errors you're talking about should never make it to production. C

Re: iBatis 3 transaction isolation level control

2010-01-13 Thread Clinton Begin
Not yet. The plan is to pass it as a parameter to .openSession(). Somehow this feature ended up at the bottom of the priority list. I'll look into it this weekend. Clinton On Wed, Jan 13, 2010 at 1:07 AM, gshum wrote: > > Is there a way in iBatis 3 to control the isolation level of transacti

How to use @SelectProvider

2010-01-13 Thread kruba02
Hi, I am trying to execute a dynamic/custom query using iBATIS (using #SelectProvider) and am facing a couple of issues. 1. I have something like @SelectProvider(method = "selectTest", type = "com.a.b.DynamicSQL") where method is the method-name and type is the name of the class. I get an error

Re: How to use @SelectProvider

2010-01-13 Thread Clinton Begin
@SelectProvider should be applied to your Mapper interface. For example: public interface MyMapper { @Select("SELECT * FROM users") User selectUsers(); } The SelectProvider equivalent of this would be: public interface MyMapper { @SelectProvider(type=com.me.SomeHelperClass,method="getSel

Re: How to use @SelectProvider

2010-01-13 Thread kruba02
Thanks Clinton I am still missing one piece i.e. how to invoke this mapper. Do I use SqlMapClient? An example code will be great. Thanks a lot! Clinton Begin wrote: > > @SelectProvider should be applied to your Mapper interface. For example: > > public interface MyMapper { > @Select("SE

Problem with ibatis3 in jboss5.1 - Not closing connection.

2010-01-13 Thread Stefan Hagström
Hi! I'm new to Ibatis, and have tried to create a simple slsb as a dao with ibatis 3 with jboss 5. However it seems like connection are not closed/returned. Jboss is complaining about connections not beeing closed: 21:32:15,146 INFO [CachedConnectionManager] Closing a connection for

Re: How to use @SelectProvider

2010-01-13 Thread Clinton Begin
Now it's time to read the user guide :-) Clinton On Wed, Jan 13, 2010 at 2:35 PM, kruba02 wrote: > > Thanks Clinton > > I am still missing one piece i.e. how to invoke this mapper. Do I use > SqlMapClient? An example code will be great. > > Thanks a lot! > > > > Clinton Begin wrote: > > >

Re: Problem with ibatis3 in jboss5.1 - Not closing connection.

2010-01-13 Thread Clinton Begin
If it's a managed connection, it will not be closed, even if you call session.close(). The underlying container / transaction manager is responsible for closing it. So the transaction scope for your SLSB should be opening and closing the connection. Otherwise, change the transaction type to JDBC

Re: Problem with ibatis3 in jboss5.1 - Not closing connection.

2010-01-13 Thread Stefan Hagström
Hi, thanks! Its a managed connection (CMT). When using plain JBDC in an SLSB the jdbc connection is opened and closed in each method. When closing a method it is not really closed but rather returned to the connection pool. The container is afaik responsible for commit/rollback of the current tra

Re: Problem with ibatis3 in jboss5.1 - Not closing connection.

2010-01-13 Thread Clinton Begin
It wouldn't be hard to change that, but first, the best thing might be to just write your own transaction manager that works... it's pretty easy. You can pass any class name in place of "MANAGED" in your configuration. For example, here's the Managed connection implementation... public class Man

Re: Problem with ibatis3 in jboss5.1 - Not closing connection.

2010-01-13 Thread Stefan Hagström
Sweet! Thanks! BR Stefan 14 jan 2010 kl. 06.46 skrev Clinton Begin: It wouldn't be hard to change that, but first, the best thing might be to just write your own transaction manager that works... it's pretty easy. You can pass any class name in place of "MANAGED" in your configur