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 Davy Pulinckx <da...@telenet.be> on 2007/06/13 18:57:58 UTC

JNDI - Weblogic - SqlMApConfig

Hi,

 

Cane anyone explain me how you configured weblogic and sqlmapconfig. 

I use weblogic, I have a datasource and a connectionpool both are well
configured and works fine.

Now, when I begin to write my sqlmapconfig of ibatis I get many problems
with it.

First of all I have developed these 2 sqlmapconfig below for testing, butt
none of them works.

For example lets assume they call ( datasource = DataSourceTest and
connectionpool = ConnectionPoolTest)

How cane I get this to work, I have searched the online documents of ibatis
and internet and I found examples butt they don't work.

If I use just a transactionManagerType = SIMPLE, all works fine, butt when I
use one of these 2 JNDI below it wont work.

Please someone help me.

 

Greets

Davy

 

 

<?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> 

    <transactionManager type="JDBC"> 

        <dataSource type="JNDI"> 

                                   <property name="DataSource"
value="DataSourceTest"/>

                        </dataSource>

    </transactionManager>

    <sqlMap resource="SqlMap.xml"/> 

 </sqlMapConfig>

 

 

<?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> 

    <transactionManager type="JDBC"> 

        <dataSource type="JNDI"> 

                                   <property name="DataSource"
value="java:comp/env/jdbc/DataSourceTest"/>

                        </dataSource>

    </transactionManager>

    <sqlMap resource="SqlMap.xml"/> 

 </sqlMapConfig>

 


RE: JNDI - Weblogic - SqlMApConfig

Posted by Davy Pulinckx <da...@telenet.be>.
Thanks Mike,

 

I will try it tomorrow when I return to the office.

May I ask why there must be jdbc/ for the datasourcename?

I searched on the internet and also in the book "Ibatis in action" butt I
can not find any information why there must be jdbc/ for the datasourcename.

Thanks for your response.

 

Greets

Davy

 

 

  _____  

From: Mike Fagan [mailto:mfagan@tde.com] 
Sent: woensdag 13 juni 2007 19:22
To: user-java@ibatis.apache.org
Subject: Re: JNDI - Weblogic - SqlMApConfig

 

Try,

<dataSource type="JNDI"> 

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

</dataSource>

or whatever the JNDI name is for DataSourceTest in the JDBC Data Sources
Admin Screen.


Regards,
MF



Davy Pulinckx wrote: 

Hi,

 

Cane anyone explain me how you configured weblogic and sqlmapconfig. 

I use weblogic, I have a datasource and a connectionpool both are well
configured and works fine.

Now, when I begin to write my sqlmapconfig of ibatis I get many problems
with it.

First of all I have developed these 2 sqlmapconfig below for testing, butt
none of them works.

For example lets assume they call ( datasource = DataSourceTest and
connectionpool = ConnectionPoolTest)

How cane I get this to work, I have searched the online documents of ibatis
and internet and I found examples butt they don't work.

If I use just a transactionManagerType = SIMPLE, all works fine, butt when I
use one of these 2 JNDI below it wont work.

Please someone help me.

 

Greets

Davy

 

 

<?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>
"http://www.ibatis.com/dtd/sql-map-config-2.dtd"> 

 

<sqlMapConfig> 

    <transactionManager type="JDBC"> 

        <dataSource type="JNDI"> 

                                   <property name="DataSource"
value="DataSourceTest"/>

                        </dataSource>

    </transactionManager>

    <sqlMap resource="SqlMap.xml"/> 

 </sqlMapConfig>

 

 

<?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>
"http://www.ibatis.com/dtd/sql-map-config-2.dtd"> 

 

<sqlMapConfig> 

    <transactionManager type="JDBC"> 

        <dataSource type="JNDI"> 

                                   <property name="DataSource"
value="java:comp/env/jdbc/DataSourceTest"/>

                        </dataSource>

    </transactionManager>

    <sqlMap resource="SqlMap.xml"/> 

 </sqlMapConfig>

 

 


Re: JNDI - Weblogic - SqlMApConfig

Posted by Mike Fagan <mf...@tde.com>.
Try,

<dataSource type="JNDI">

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

</dataSource>

or whatever the JNDI name is for DataSourceTest in the JDBC Data Sources 
Admin Screen.


Regards,
MF



Davy Pulinckx wrote:
>
> Hi,
>
>  
>
> Cane anyone explain me how you configured *weblogic* and *sqlmapconfig*.
>
> I use weblogic, I have a datasource and a connectionpool both are well 
> configured and works fine.
>
> Now, when I begin to write my sqlmapconfig of ibatis I get many 
> problems with it.
>
> First of all I have developed these 2 sqlmapconfig below for testing, 
> butt none of them works.
>
> For example lets assume they call ( datasource = DataSourceTest and 
> connectionpool = ConnectionPoolTest)
>
> How cane I get this to work, I have searched the online documents of 
> ibatis and internet and I found examples butt they don't work.
>
> If I use just a transactionManagerType = SIMPLE, all works fine, butt 
> when I use one of these 2 JNDI below it wont work.
>
> Please someone help me.
>
>  
>
> Greets
>
> Davy
>
>  
>
>  
>
> <?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>
>
>     <transactionManager type="JDBC">
>
>         <dataSource type="JNDI">
>
>                                    <property name="DataSource" 
> value="DataSourceTest"/>
>
>                         </dataSource>
>
>     </transactionManager>
>
>     <sqlMap resource="SqlMap.xml"/>
>
>  </sqlMapConfig>
>
>  
>
>  
>
> <?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>
>
>     <transactionManager type="JDBC">
>
>         <dataSource type="JNDI">
>
>                                    <property name="DataSource" 
> value="java:comp/env/jdbc/DataSourceTest"/>
>
>                         </dataSource>
>
>     </transactionManager>
>
>     <sqlMap resource="SqlMap.xml"/>
>
>  </sqlMapConfig>
>
>  
>