ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shannon, Bryan" <BShan...@Tribune.com>
Subject RE: Need Help with JNDI Connection
Date Mon, 17 Apr 2006 17:03:11 GMT
I use multiple datasources...
 
I use separate instances of SqlMapClient, each built from separate config
files... I don't think iBatis supports having a single SqlMapClient with
multiple datasources (it might have in the 1.x series).  But it's a good
idea not to support that from a single SqlMapClient anyway. :-)
 
-Bryan Shannon
 
 

-----Original Message-----
From: Ali, Mohammed (Liquidity & Risk Technology)
[mailto:Mohammed_Ali@ml.com]
Sent: Monday, April 17, 2006 1:00 PM
To: user-java@ibatis.apache.org
Subject: RE: Need Help with JNDI Connection


All Thank You,
Your suggestion worked. Just curios for multiple datasources, do I need
separate config files or add Datasource in the one file ?
 
<transactionManager type="JDBC" >

<dataSource type="JNDI">

<property name="DataSource" value="jdbc/cams_dev"/>

</dataSource>

</transactionManager>

Thanks, 
Ali 
(201) 671-5499 

-----Original Message-----
From: Christopher.Mathrusse@sybase.com
[mailto:Christopher.Mathrusse@sybase.com] 
Sent: Monday, April 17, 2006 12:56 PM
To: user-java@ibatis.apache.org
Subject: Re: Need Help with JNDI Connection



I believe your JNDI reference should read either as: 

<property name="cams" value="java:comp/env/jdbc/cams_dev"/> 

or 

<property name="cams" value="jdbc/cams_dev"/> 

The correct one depends upon your context. 


Chris Mathrusse
christopher.mathrusse@sybase.com
Sybase, Inc
One Sybase Drive
Dublin, CA 94568
(925) 236-5553 




"Ali, Mohammed \(Liquidity & Risk Technology\)" <Mohammed_Ali@ml.com> 


04/17/2006 09:07 AM 


Please respond to
user-java@ibatis.apache.org



To
<user-java@ibatis.apache.org> 

cc

Subject
Need Help with JNDI Connection	

		




Hi, 
Please help me with this error. 

SqlMapConfig.xml 
<transactionManager type="JDBC" > 
<dataSource type="JNDI"> 
<property name="cams" value="java:jdbc/cams_dev"/> 
</dataSource> 
</transactionManager> 


I have connection pooling datasource set on the test server in WSAD v5.1.2.
Datasource connects for sure. 


When using SqlMapClient I get this error. Looks like JDBC connection is nor
working ? 
com.ibatis.common.jdbc.exception.NestedSQLException: Could not start
transaction.  Cause:
com.ibatis.sqlmap.engine.transaction.TransactionException: JdbcTransaction
initialization failed.  DataSource was null. 


Caused by: com.ibatis.sqlmap.engine.transaction.TransactionException:
JdbcTransaction initialization failed.  DataSource was null. 



Thanks, 
Ali 
(201) 671-5499 




  _____  


If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain
or redistribute it.  <http://www.ml.com/email_terms/> Click here for
important additional terms relating to this e-mail.
<http://www.ml.com/email_terms/> http://www.ml.com/email_terms/ 

  _____  




Mime
View raw message