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 ramang <ra...@sdgc.com> on 2009/03/30 15:42:51 UTC

DB connection Config in SqlMapConfig

Hi All, 
 I am working on implementing Ibatis framework in Java for vignette portal.
 Typically, my portal application uses the DB connection attributes and
connection pool attributes from 
 Vignette portal properties.

  How can I use the DB connection properties and connection pool from
vignette rather than defining 
  and using the connection DB attributes in SqlMapConfig transactionManager.

   Appreciate any help in this regard.


   Thank you ,
   Raman
-- 
View this message in context: http://www.nabble.com/DB-connection-Config-in-SqlMapConfig-tp22783063p22783063.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: DB connection Config in SqlMapConfig

Posted by Nathan Maves <na...@gmail.com>.
The only way to get access to the pool that Vignette creates would be if
they expose it as JNDI.
I guess you could also extend ibatis to get a connection for the Vignette
pool if you were in the same JVM.

On Mon, Mar 30, 2009 at 1:17 PM, ramang <ra...@sdgc.com> wrote:

>
> Hi all,
> Not sure if anyone have been able to understand the query below.
> let me put it again.
> I have an existing portal application with DB connection properties and
> connection pool that are defined in vignette portal
> (//vignette/portal/config/properties file. The properties are similar to
> the
> SIMPLE JDBC type that we define in ibatis SqlMapConfig as below:
> <properties resource="database.properties"/>
>   <transactionManager type="JDBC">
>                <dataSource type="SIMPLE">
>                      <property name="JDBC.Driver"
> value="${gis.db.driver}"/>
>                      <property name="JDBC.ConnectionURL"
> value="${gis.db.url}"/>
>                      <property name="JDBC.Username"
> value="${gis.db.user}"/>
>                      <property name="JDBC.Password"
> value="${gis.db.password}"/>
>                          <property name="JDBC.DefaultAutoCommit"
> value="true"/>
>                  <property value="15"
> name="Pool.MaximumActiveConnections"/>
>                  <property value="15" name="Pool.MaximumIdleConnections"/>
>              <property value="1000" name="Pool.MaximumWait"/>
>            </dataSource>
>  </transactionManager>
>
>  Now, the question that I have to the group is, how can I use the existing
> connection pool and DB properties , by declaring the datasource type as
> "External"?
>  Do I have to override the Ibatis API classes to use the connection pool of
> the application ? If yes, how can I make Ibatis override the connection
> attributes that I define in the <transactionmanager>?
>
> Appreciate any response.
>
> Thanks
> Raman
> --
>
> ramang wrote:
> >
> > Hi All,
> >  I am working on implementing Ibatis framework in Java for vignette
> > portal.
> >  Typically, my portal application uses the DB connection attributes and
> > connection pool attributes from
> >  Vignette portal properties.
> >
> >   How can I use the DB connection properties and connection pool from
> > vignette rather than defining
> >   and using the connection DB attributes in SqlMapConfig
> > transactionManager.
> >
> >    Appreciate any help in this regard.
> >
> >
> >    Thank you ,
> >    Raman
> >
>
> --
> View this message in context:
> http://www.nabble.com/DB-connection-Config-in-SqlMapConfig-tp22783063p22790819.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Re: DB connection Config in SqlMapConfig

Posted by ramang <ra...@sdgc.com>.
Hi all, 
Not sure if anyone have been able to understand the query below. 
let me put it again.
I have an existing portal application with DB connection properties and
connection pool that are defined in vignette portal
(//vignette/portal/config/properties file. The properties are similar to the
SIMPLE JDBC type that we define in ibatis SqlMapConfig as below:
<properties resource="database.properties"/>
   <transactionManager type="JDBC">
   		<dataSource type="SIMPLE">
		      <property name="JDBC.Driver" value="${gis.db.driver}"/>
		      <property name="JDBC.ConnectionURL" value="${gis.db.url}"/>
		      <property name="JDBC.Username" value="${gis.db.user}"/>
		      <property name="JDBC.Password" value="${gis.db.password}"/>
			  <property name="JDBC.DefaultAutoCommit" value="true"/> 
      		  <property value="15" name="Pool.MaximumActiveConnections"/>
      		  <property value="15" name="Pool.MaximumIdleConnections"/>
      	      <property value="1000" name="Pool.MaximumWait"/>			  
	    </dataSource>
  </transactionManager>

 Now, the question that I have to the group is, how can I use the existing
connection pool and DB properties , by declaring the datasource type as
"External"? 
 Do I have to override the Ibatis API classes to use the connection pool of
the application ? If yes, how can I make Ibatis override the connection
attributes that I define in the <transactionmanager>?

Appreciate any response.

Thanks
Raman
--

ramang wrote:
> 
> Hi All, 
>  I am working on implementing Ibatis framework in Java for vignette
> portal.
>  Typically, my portal application uses the DB connection attributes and
> connection pool attributes from 
>  Vignette portal properties.
> 
>   How can I use the DB connection properties and connection pool from
> vignette rather than defining 
>   and using the connection DB attributes in SqlMapConfig
> transactionManager.
> 
>    Appreciate any help in this regard.
> 
> 
>    Thank you ,
>    Raman
> 

-- 
View this message in context: http://www.nabble.com/DB-connection-Config-in-SqlMapConfig-tp22783063p22790819.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.