You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "venkatesh_ngl@rediffmail." <ve...@rediffmail.com> on 2008/01/23 20:50:01 UTC

Default Transaction Manager

Hi,

I  am using IBATIS w/ Spring and wanted to know what would be the default
transaction manager  if there is one not defined in sql-map-config.xml.

All I have is 

<?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"
		enhancementEnabled="true"
		lazyLoadingEnabled="true"
		maxRequests="10"
		maxSessions="1"
		maxTransactions="5"
		useStatementNamespaces="false"
	/>

	<typeAlias alias="abc" type="com.abc.bbc"/>

    <sqlMap resource="/WEB-INF/abc.xml"/>

</sqlMapConfig>

Would container manager transaction come into affect if nothing is defined
in sql-map-config.xml ?


-- 
View this message in context: http://www.nabble.com/Default-Transaction-Manager-tp15050413p15050413.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: Default Transaction Manager

Posted by "venkatesh_ngl@rediffmail." <ve...@rediffmail.com>.


Christopher Lamey wrote:
> 
> As I remember, if you're using the Spring SqlMapClientTemplate, iBATIS
> will
> assume you're using an EXTERNAL transaction manager.  So whatever you have
> defined (or don't have defined in your case) in the sql-map-config.xml
> will
> be ignored.
> 
> On 1/23/08 12:50 PM, "venkatesh_ngl@rediffmail."
> <ve...@rediffmail.com> wrote:
> 
>> 
>> Hi,
>> 
>> I  am using IBATIS w/ Spring and wanted to know what would be the default
>> transaction manager  if there is one not defined in sql-map-config.xml.
>> 
>> All I have is 
>> 
>> <?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"
>> enhancementEnabled="true"
>> lazyLoadingEnabled="true"
>> maxRequests="10"
>> maxSessions="1"
>> maxTransactions="5"
>> useStatementNamespaces="false"
>> />
>> 
>> <typeAlias alias="abc" type="com.abc.bbc"/>
>> 
>>     <sqlMap resource="/WEB-INF/abc.xml"/>
>> 
>> </sqlMapConfig>
>> 
>> Would container manager transaction come into affect if nothing is
>> defined
>> in sql-map-config.xml ?
>> 
> 
> 
> 

Thanks for the response Chris.

I have another question for you. If I have a file where sqlmapconfig.xml I
have mentioned it as 	<transactionManager type="JDBC" >
		<dataSource type="JNDI">
			<property name="DataSource" value="jdbc/abcd"/>
		</dataSource>
	</transactionManager>
Would the connection parameters set in sqlmapconfig.xml would come into
affect ? I tried changing the parameters to default values in setting
section but it caused a major problems with connections. The application was
not able to handle those many connections

The setting was as follows

<settings
		cacheModelsEnabled="false"
		enhancementEnabled="true"
		lazyLoadingEnabled="true"
		errorTracingEnabled="true"
		useStatementNamespaces="false"
                          maxRequests="512"
		maxSessions="128"
		maxTransactions="32"
		
	/>
Which connection parameters would come into affect? The one that is
mentioned in sqlmapconfig.xml or the parameters associated with JNDI
configurations ?

-- 
View this message in context: http://www.nabble.com/Default-Transaction-Manager-tp15050413p15139355.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: Default Transaction Manager

Posted by Christopher Lamey <cl...@localmatters.com>.
As I remember, if you're using the Spring SqlMapClientTemplate, iBATIS will
assume you're using an EXTERNAL transaction manager.  So whatever you have
defined (or don't have defined in your case) in the sql-map-config.xml will
be ignored.

On 1/23/08 12:50 PM, "venkatesh_ngl@rediffmail."
<ve...@rediffmail.com> wrote:

> 
> Hi,
> 
> I  am using IBATIS w/ Spring and wanted to know what would be the default
> transaction manager  if there is one not defined in sql-map-config.xml.
> 
> All I have is 
> 
> <?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"
> enhancementEnabled="true"
> lazyLoadingEnabled="true"
> maxRequests="10"
> maxSessions="1"
> maxTransactions="5"
> useStatementNamespaces="false"
> />
> 
> <typeAlias alias="abc" type="com.abc.bbc"/>
> 
>     <sqlMap resource="/WEB-INF/abc.xml"/>
> 
> </sqlMapConfig>
> 
> Would container manager transaction come into affect if nothing is defined
> in sql-map-config.xml ?
>