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 Eugeny N Dzhurinsky <eu...@jdevelop.com> on 2005/10/25 16:34:41 UTC

[JNDI] datasource on remote server

Hello! Just a question - I have DataSource, registered in JNDI on some
another server. How should I specify the name and location of that DataSource 
in db.properties/connection tag?

-- 
Eugene N Dzhurinsky

Re: [JNDI] datasource on remote server

Posted by Jeff Butler <je...@gmail.com>.
It's totally dependant on your application server:
 On WebSphere, it's like this:
 java.naming.provider.url=iiop://remote_host:remote_port/
  (remote_port is often 2809 on WebSphere)
  On WebLogic, it's like this:
 java.naming.provider.url=t3://remote_host:remote_port/
  (remote_port is often 7001 on WebLogic)
 Your application server's documentation should have some help about this.
Search for "remote JNDI".
 Jeff Butler

 On 10/26/05, Eugeny N Dzhurinsky <eu...@jdevelop.com> wrote:
>
> On Tue, Oct 25, 2005 at 10:23:54AM -0500, Jeff Butler wrote:
> > Hmmm...another undocumented feature :(
> > From browsing through the source code, it looks like you can do this:
> > <dataSource type="JNDI">
> > <property name="DataSource" value="somevalue"/>
> > <property name="context.java.naming.provider.url"
> > value="urlToYourProvider"/>
> > </dataSource>
> > Any property with the prefix "context." will be passed to the
> constructor
> > of the InitialContext. Try it and let us know if it works - and then
> maybe
> > write a FAQ entry on the WIKI.
>
> Excellent, but which provider I should use? =)
>
> --
> Eugene N Dzhurinsky
>

Re: [JNDI] datasource on remote server

Posted by Eugeny N Dzhurinsky <eu...@jdevelop.com>.
On Tue, Oct 25, 2005 at 10:23:54AM -0500, Jeff Butler wrote:
> Hmmm...another undocumented feature :(
>  From browsing through the source code, it looks like you can do this:
>  <dataSource type="JNDI">
>  <property name="DataSource" value="somevalue"/>
>  <property name="context.java.naming.provider.url"
> value="urlToYourProvider"/>
> </dataSource>
>  Any property with the prefix "context." will be passed to the constructor
> of the InitialContext. Try it and let us know if it works - and then maybe
> write a FAQ entry on the WIKI.

Excellent, but which provider I should use? =)

-- 
Eugene N Dzhurinsky

Re: [JNDI] datasource on remote server

Posted by Jeff Butler <je...@gmail.com>.
Hmmm...another undocumented feature :(
 From browsing through the source code, it looks like you can do this:
 <dataSource type="JNDI">
 <property name="DataSource" value="somevalue"/>
 <property name="context.java.naming.provider.url"
value="urlToYourProvider"/>
</dataSource>
 Any property with the prefix "context." will be passed to the constructor
of the InitialContext. Try it and let us know if it works - and then maybe
write a FAQ entry on the WIKI.
 Jeff Butler

 On 10/25/05, Eugeny N Dzhurinsky <eu...@jdevelop.com> wrote:
>
> Hello! Just a question - I have DataSource, registered in JNDI on some
> another server. How should I specify the name and location of that
> DataSource
> in db.properties/connection tag?
>
> --
> Eugene N Dzhurinsky
>