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 "REMIJAN, MICHAEL J [AG-Contractor/1000]" <mi...@monsanto.com> on 2005/07/13 15:29:03 UTC

Using JNDI programmatically.

Hello List:

I am trying to figure out how I can use the SqlMapClientBuilder.buildSqlMapClient(Reader reader, Properties props) to programmatically tell SqlMap the JNDI lookup name for my datasource.  Our existing application has this information in our own properties file.  I'd like to create the <sqlMapConfig> file with a JNDI <dataSource> type but use the above method and properties file to programmatically pass in the "DataSource" property value.  Is this possible? 

Michael.
_________________________________________________________________________________ 

This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information.  If you have received this e-mail in error, please notify the sender immediately.  Please delete it and all attachments from any servers, hard drives or any other media.  Other use of this e-mail by you is strictly prohibited. 

All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto.  The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware".  Monsanto accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment. 
_________________________________________________________________________________

Re: Using JNDI programmatically.

Posted by Larry Meadors <la...@gmail.com>.
Yes.

Any attributes in in your xml file using ${myValue} notation will be
substituted at runtime with the value in the properties object passed
in that "myValue" is the key to.

Does that makes sense?

Larry


On 7/13/05, REMIJAN, MICHAEL J [AG-Contractor/1000]
<mi...@monsanto.com> wrote:
>  
> 
> Hello List: 
> 
> I am trying to figure out how I can use the
> SqlMapClientBuilder.buildSqlMapClient(Reader reader, Properties props) to
> programmatically tell SqlMap the JNDI lookup name for my datasource.  Our
> existing application has this information in our own properties file.  I'd
> like to create the <sqlMapConfig> file with a JNDI <dataSource> type but use
> the above method and properties file to programmatically pass in the
> "DataSource" property value.  Is this possible? 
> 
> Michael. 
> 
> _________________________________________________________________________________
> 
> This e-mail message may contain privileged and/or confidential information,
> and is intended to be received only by persons entitled to receive such
> information.  If you have received this e-mail in error, please notify the
> sender immediately.  Please delete it and all attachments from any servers,
> hard drives or any other media.  Other use of this e-mail by you is strictly
> prohibited. 
> 
> All e-mails and attachments sent and received are subject to monitoring,
> reading and archival by Monsanto.  The recipient of this e-mail is solely
> responsible for checking for the presence of "Viruses" or other "Malware". 
> Monsanto accepts no liability for any damage caused by any such code
> transmitted by or accompanying this e-mail or any attachment. 
> 
> _________________________________________________________________________________