ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Beemsterboer Software <h...@beemsterboer-software.nl>
Subject Re: Resource Error when using Datasource name
Date Fri, 21 Apr 2006 20:00:37 GMT
Hi Ali,

The same configuration should work on the Application Server.

Regards,
Hans.
http://beemsterboer-software.nl

Ali, Mohammed (Liquidity & Risk Technology) wrote:
> Hi Hans,
> I could have spend all my life to figure this out. 
>
> Your suggestions works.
>
> When going live with this application, do I need to keep the same
> settings or need changes.
>
> Application will use the datasource from the application server
> configured for connection pooling.
>
> If the datasource settings are same WSAD IDE then the same should work
> on Application server ?
>
> Thanks,
> Ali
> (201) 671-5499
>
>
> -----Original Message-----
> From: Beemsterboer Software [mailto:hans@beemsterboer-software.nl] 
> Sent: Friday, April 21, 2006 1:16 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Resource Error when using Datasource name
>
>
> Ali,
> Welcome to WebSphere configuration fun:
>
> sql-map-config.xml:
> <transactionManager type="EXTERNAL">
>     <dataSource type="JNDI">
>         <property name="DataSource" value="java:comp/env/cams_dev"/>
>     </dataSource>
>   </transactionManager>
>
> web.xml:
>     <resource-ref id="ResourceRef_1">
>         <res-ref-name>cams_dev</res-ref-name>
>         <res-type>javax.sql.DataSource</res-type>
>         <res-auth>CONTAINER</res-auth>
>         <res-sharing-scope>Shareable</res-sharing-scope>
>     </resource-ref>
>
> ibm-web-bnd.xmi:
>   <resRefBindings xmi:id="ResourceRefBinding_1"
> jndiName="jdbc/cams_dev">
>     <bindingResourceRef href="WEB-INF/web.xml#ResourceRef_1"/>
>   </resRefBindings>
>
> ibm-web-ext.xmi:
>   <resourceRefExtensions xmi:id="ResourceRefExtension_1" 
> connectionManagementPolicy="Default">
>     <resourceRef href="WEB-INF/web.xml#ResourceRef_1"/>
>   </resourceRefExtensions>
>
>
> Ali, Mohammed (Liquidity & Risk Technology) wrote:
>   
>> Hi All,
>> I get the following error in SqlConfigCams.xml file. Curiously enough 
>> connects to database and returns result set in WSAD 5.1.2 (WebSphere) 
>> with no problem. 
>>
>> Do I need resource reference in my project web.xml and how to declare 
>> it? I am not able to get the right syntax.
>>
>> _*SqlConfigCams.xml*_
>> <transactionManager type="EXTERNAL" >
>> <property name="DefaultAutoCommit" value="false"/>
>> <property name="SetAutoCommitAllowed" value="false"/>
>> <dataSource type="JNDI">
>> <property name="DataSource" value="jdbc/cams_dev"/>
>>
>>
>> _*Error*_
>> [4/21/06 12:25:53:234 EDT] 3de63de6 ConnectionFac I J2CA0122I: 
>> Resource reference jdbc/cams_dev could not be located, so default 
>> values of the following are used: [Resource-ref settings]
>>
>>         res-auth:                 1 (APPLICATION)
>>         res-isolation-level:      0 (TRANSACTION_NONE)
>>         res-sharing-scope:        true (SHAREABLE)
>>         res-resolution-control:   999 (undefined)
>> [Other attributes]
>>
>> isCMP1_x:                 false (not CMP1.x)
>> isJMS:                 false (not JMS)
>>
>>
>> Thanks,
>> Ali
>>
>>
>>     

Mime
View raw message