ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max_lazz...@tiscali.it
Subject Re: JNDI , WebSphere Datasource question
Date Sat, 11 Jun 2005 06:24:40 GMT
The JNDI Datasource is configured on the WebSphere AS without username and
password, so I need to pass them. I know that the right way to reference
an existing JNDI datasource is the following one:

 transactionManager type="JDBC"
    dataSource type="JNDI"
       property name="DataSource" value="jdbc/JDEdb"/
   /dataSource
 /transactionManager

What I'm looking for is a way to pass, even programmatically, username and
password (that always the same couple for all users using the application).

Is it possible to reference by definition the JNDI Datasource and then programmatically
set username and password?

thx


>-- Messaggio Originale --
>Reply-To: ibatis-user-java@incubator.apache.org
>Date: Thu, 9 Jun 2005 09:57:05 -0400
>From: Andy Thompson <arthomps@gmail.com>
>Reply-To: Andy Thompson <arthomps@gmail.com>
>To: ibatis-user-java@incubator.apache.org, 
>	Brandon Goodin <brandon.goodin@gmail.com>
>Subject: Re: JNDI , WebSphere Datasource question
>
>
>what brandon said.  but i suspect that what you're looking for is
>somethign like:
>
>	<transactionManager type="EXTERNAL" >
>		<dataSource type="JNDI">
>            <property name="context.java.naming.factory.initial"
>value="weblogic.jndi.WLInitialContextFactory"/>
>            <property name="context.java.naming.provider.url"
>value="t3://localhost:7001"/>
>            <property name="DataSource" value="poolName.pool"/>
>		</dataSource>
>	</transactionManager>
>
>where poolName.pool is the name of your pool.
>
>On 6/9/05, Brandon Goodin <brandon.goodin@gmail.com> wrote:
>> That is not an option because that is not how JNDI works. Are you
>> saying that you need to pass a username/password to your datasource
>> for each individual user or do you simply want to configure it
>> dynamically for the whole application? If it is the latter then you
>> are trying to configure your JNDI on the wrong level. iBatis is simply
>> referencing an already configured JNDI context.
>> 
>> Brandon
>> 
>> On 6/9/05, max_lazzari@tiscali.it <max_lazzari@tiscali.it> wrote:
>> > Hi,
>> > I'm using iBatis sqlMap in a J2ee application to be deployed on WebSphere
>> > AppServer 5.1.
>> >
>> > We have to use a JNDI Datasource which needs for username and password.
>> >
>> > How can I configure the Transaction Manager?
>> >
>> > Is the following an option?
>> >
>> > ----------------------------------------------
>> > transactionManager type="JDBC"
>> >    dataSource type="JNDI"
>> >       property name="DataSource" value="jdbc/JDEdb"/
>> >       property name="JDBC.Username" value="${username}"/
>> >       property name="JDBC.Password" value="${password}"/
>> >    /dataSource
>> > /transactionManager
>> >
>> > ----------------------------------------------
>> >
>> >
>> > Thanks in advance,  rgrds
>> >
>> > Max
>> >
>> >
>> > __________________________________________________________________
>> > TISCALI ADSL 1.25 MEGA a soli 19.95 euro/mese
>> > Solo con Tiscali Adsl navighi senza limiti di tempo
>> > a meno di 20 euro al mese e in piu' telefoni senza
>> > pagare il canone Telecom. Scopri come
>> > http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/
>> >
>> >
>> >
>> >
>> 
>
>
>-- 
>Andrew R. Thompson
>Currently in D.C. Consulting


__________________________________________________________________
TISCALI ADSL 1.25 MEGA a soli 19.95 euro/mese
Solo con Tiscali Adsl navighi senza limiti di tempo
a meno di 20 euro al mese e in piu' telefoni senza
pagare il canone Telecom. Scopri come
http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/




Mime
View raw message